ui: fix transition callback (#874)

This commit is contained in:
undefined committed 2024-09-26 00:45:49 +08:00
1 parent 5fdfada595
commit 520c75d1d1
5 files changed
+24 -17

No files matched your search

+5 -3
View File
@@ -5,7 +5,7 @@ import $ from 'jquery';
import { nanoid } from 'nanoid';
import NProgress from 'nprogress';
import Notification from 'vj/components/notification';
import { request, withTransistionCallback } from './base';
import { request, withTransitionCallback } from './base';
const pjax = {};
@@ -115,8 +115,10 @@ pjax.request = async (opt) => {
}
}
$target.trigger('vjContentRemove');
withTransistionCallback(() => $target.replaceWith($el));
$el.trigger('vjContentNew');
await withTransitionCallback(() => {
$target.replaceWith($el);
$el.trigger('vjContentNew');
});
}
} catch (err) {
if (!err.aborted) {