You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
4.4 KiB
116 lines
4.4 KiB
1 year ago
|
'use strict';
|
||
|
Object.defineProperty(exports, '__esModule', {
|
||
|
value: true
|
||
|
});
|
||
|
var nextTick_js_1 = require('./nextTick.js');
|
||
|
exports.default = {
|
||
|
data: {},
|
||
|
methods: {
|
||
|
animeBaseOut: function (id, params, time) {
|
||
|
var that = this;
|
||
|
return new Promise(function (roslove) {
|
||
|
// #ifdef MP-WEIXIN
|
||
|
that.$scope.animate(id, params, time, function () {
|
||
|
return __awaiter(that, void 0, void 0, function () {
|
||
|
return __generator(this, function (_a) {
|
||
|
switch (_a.label) {
|
||
|
case 0:
|
||
|
roslove();
|
||
|
return [4, nextTick_js_1.default(100)];
|
||
|
case 1:
|
||
|
_a.sent();
|
||
|
this.clearAnimation(id, function () {});
|
||
|
return [2];
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
// #endif
|
||
|
// #ifndef MP-WEIXIN
|
||
|
that.animate(id, params, time, function () {
|
||
|
return __awaiter(that, void 0, void 0, function () {
|
||
|
return __generator(this, function (_a) {
|
||
|
switch (_a.label) {
|
||
|
case 0:
|
||
|
roslove();
|
||
|
return [4, nextTick_js_1.default(100)];
|
||
|
case 1:
|
||
|
_a.sent();
|
||
|
this.clearAnimation(id, function () {});
|
||
|
return [2];
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
// #endif
|
||
|
});
|
||
|
},
|
||
|
animeFadeOut: function (id, time) {
|
||
|
if (time === void 0) {
|
||
|
time = 350;
|
||
|
}
|
||
|
return __awaiter(this, void 0, void 0, function () {
|
||
|
return __generator(this, function (_a) {
|
||
|
switch (_a.label) {
|
||
|
case 0:
|
||
|
return [
|
||
|
4,
|
||
|
this.animeBaseOut(
|
||
|
id,
|
||
|
[
|
||
|
{
|
||
|
opacity: 1,
|
||
|
ease: 'ease-out'
|
||
|
},
|
||
|
{
|
||
|
opacity: 0,
|
||
|
ease: 'ease-out'
|
||
|
}
|
||
|
],
|
||
|
time
|
||
|
)
|
||
|
];
|
||
|
case 1:
|
||
|
_a.sent();
|
||
|
return [2];
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
},
|
||
|
animeFadeOutDown: function (id, time) {
|
||
|
if (time === void 0) {
|
||
|
time = 350;
|
||
|
}
|
||
|
return __awaiter(this, void 0, void 0, function () {
|
||
|
return __generator(this, function (_a) {
|
||
|
switch (_a.label) {
|
||
|
case 0:
|
||
|
return [
|
||
|
4,
|
||
|
this.animeBaseOut(
|
||
|
id,
|
||
|
[
|
||
|
{
|
||
|
opacity: 1,
|
||
|
translateY: 0,
|
||
|
ease: 'ease-out'
|
||
|
},
|
||
|
{
|
||
|
opacity: 0,
|
||
|
translateY: 300,
|
||
|
ease: 'ease-out'
|
||
|
}
|
||
|
],
|
||
|
time
|
||
|
)
|
||
|
];
|
||
|
case 1:
|
||
|
_a.sent();
|
||
|
return [2];
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
};
|