ui: add view-transistions

This commit is contained in:
undefined committed 2024-08-11 23:53:40 +08:00
1 parent 0d2d84d114
commit f86b8f99f8
6 files changed
+49 -24

No files matched your search

+2 -2
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 } from './base';
import { request, withTransistionCallback } from './base';
const pjax = {};
@@ -115,7 +115,7 @@ pjax.request = async (opt) => {
}
}
$target.trigger('vjContentRemove');
$target.replaceWith($el);
withTransistionCallback(() => $target.replaceWith($el));
$el.trigger('vjContentNew');
}
} catch (err) {