| | |
| | | > |
| | | <GeneralTree |
| | | class="w-1/4 xl:w-1/5" |
| | | v-if="isMounted" |
| | | @select="handleSelect" |
| | | @UnSelect="UnSelect" |
| | | :title="title" |
| | |
| | | const others = ref(getOthersValues(entityName.value, objParams.value.CODE, objParams.value.ID)); |
| | | const prodCode = ref(''); |
| | | const rotType = ref(''); |
| | | const isMounted = ref(false); |
| | | const custImport = ref(null); |
| | | const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | |
| | | * @return {*} |
| | | */ |
| | | function createIcon(params: Recordable<any>) { |
| | | return createIconByType(params, entityName.value); |
| | | const [CreateIcon] = custImport.value.default(); |
| | | return CreateIcon(params); |
| | | } |
| | | |
| | | onMounted(() => { |
| | | fetch(entityName.value); |
| | | onMounted(async () => { |
| | | isMounted.value = false; |
| | | /* 动态import实体名.ts的自定义方法 */ |
| | | try { |
| | | custImport.value = await import(/* @vite-ignore */`../entityts/${entityName.value}`); |
| | | await fetch(entityName.value); |
| | | isMounted.value = true; |
| | | } catch (e) { |
| | | } |
| | | }); |
| | | |
| | | /** |