Explorar el Código

😁修复打印编辑第一次打开为空白页的问题

PieCat hace 2 años
padre
commit
73afa82d05
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      Web/src/views/system/print/component/editPrint.vue

+ 4 - 2
Web/src/views/system/print/component/editPrint.vue

@@ -65,7 +65,7 @@
 </template>
 
 <script lang="ts" setup name="sysEditPrint">
-import { onMounted, reactive, ref } from 'vue';
+import { onMounted, reactive, ref, nextTick } from 'vue';
 import HiprintDesign from '/@/views/system/print/component/hiprint/index.vue';
 
 import { getAPI } from '/@/utils/axios-utils';
@@ -93,7 +93,9 @@ const openDialog = (row: any) => {
 	state.isShowDialog = true;
 	ruleFormRef.value?.resetFields();
 
-	if (hiprintDesignRef.value != undefined) loadTemplate();
+	nextTick(() => {
+		loadTemplate();
+	});
 };
 
 // 加载模板