mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: disable transistion on record_main
This commit is contained in:
1 file changed
+12
-14
@@ -20,20 +20,18 @@ const page = new NamedPage('record_main', async () => {
|
||||
sock.onmessage = (_, data) => {
|
||||
const msg = JSON.parse(data);
|
||||
const $newTr = $(msg.html);
|
||||
withTransitionCallback(() => {
|
||||
const $oldTr = $(`.record_main__table tr[data-rid="${$newTr.attr('data-rid')}"]`);
|
||||
if ($oldTr.length) {
|
||||
$oldTr.trigger('vjContentRemove');
|
||||
dd.apply($oldTr[0], dd.diff($oldTr[0], $newTr[0]));
|
||||
$oldTr.trigger('vjContentNew');
|
||||
} else {
|
||||
if (+new URLSearchParams(window.location.search).get('page') > 1
|
||||
|| new URLSearchParams(window.location.search).get('nopush')) return;
|
||||
$('.record_main__table tbody').prepend($newTr);
|
||||
$('.record_main__table tbody tr:last').remove();
|
||||
$newTr.trigger('vjContentNew');
|
||||
}
|
||||
});
|
||||
const $oldTr = $(`.record_main__table tr[data-rid="${$newTr.attr('data-rid')}"]`);
|
||||
if ($oldTr.length) {
|
||||
$oldTr.trigger('vjContentRemove');
|
||||
dd.apply($oldTr[0], dd.diff($oldTr[0], $newTr[0]));
|
||||
$oldTr.trigger('vjContentNew');
|
||||
} else {
|
||||
if (+new URLSearchParams(window.location.search).get('page') > 1
|
||||
|| new URLSearchParams(window.location.search).get('nopush')) return;
|
||||
$('.record_main__table tbody').prepend($newTr);
|
||||
$('.record_main__table tbody tr:last').remove();
|
||||
$newTr.trigger('vjContentNew');
|
||||
}
|
||||
};
|
||||
UserSelectAutoComplete.getOrConstruct($('[name="uidOrName"]'), {
|
||||
clearDefaultValue: false,
|
||||
|
||||
Reference in new issue
Block a user