jeecgboot vue3 ui

This commit is contained in:
zhangdaiscott
2021-10-20 14:32:09 +08:00
parent acc9633d62
commit 5a8812318e
854 changed files with 87119 additions and 199 deletions

View File

@@ -0,0 +1,18 @@
import { nextTick, onMounted, onActivated } from 'vue';
export function onMountedOrActivated(hook: Fn) {
let mounted: boolean;
onMounted(() => {
hook();
nextTick(() => {
mounted = true;
});
});
onActivated(() => {
if (mounted) {
hook();
}
});
}