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