chore: desc
This commit is contained in:
parent
8557a31ea1
commit
8e973dd8bc
@ -18,9 +18,9 @@ export function useDescription(
|
||||
const loaded = ref(false);
|
||||
|
||||
function register(instance: DescInstance) {
|
||||
if (unref(loaded)) {
|
||||
return;
|
||||
}
|
||||
// if (unref(loaded) && import.meta.env.PROD) {
|
||||
// return;
|
||||
// }
|
||||
desc.value = instance;
|
||||
props && instance.setDescProps(props);
|
||||
loaded.value = true;
|
||||
|
@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { onBeforeUnmount } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Description, useDescription } from '#/components/description';
|
||||
@ -19,6 +21,8 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
setDescProps({ data }, true);
|
||||
},
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => console.log('before unmount'));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
Loading…
Reference in New Issue
Block a user