Ben Lin
2024-06-22 8e288eefbd4e8dbf7d0180dd880ce93256daa7a5
src/views/tigerprojects/system/lowcode/composition/index.vue
@@ -10,6 +10,7 @@
  >
    <GeneralTree
      class="w-1/4 xl:w-1/5"
      v-if="isMounted"
      @select="handleSelect"
      @UnSelect="UnSelect"
      :title="title"
@@ -112,6 +113,8 @@
  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();
@@ -173,11 +176,19 @@
   * @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) {
    }
  });
  /**