我正在应用这个名为 noty 的库,我想解决这个承诺。这是代码。
var bouncejsClose = function (promise) {
var n = this;
new Bounce()
.translate({
from: { x: 0, y: 0 }, to: { x: 450, y: 0 },
easing: 'bounce',
duration: 500,
bounces: 4,
stiffness: 1
})
.applyTo(n.barDom, {
onComplete: function () {
promise(function (resolve) {
resolve();
});
}
});
};