mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix transition callback (#874)
This commit is contained in:
5 files changed
+24
-17
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user