Просмотр исходного кода

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

PieCat 2 лет назад
Родитель
Сommit
73afa82d05
1 измененных файлов с 4 добавлено и 2 удалено
  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();
+	});
 };
 
 // 加载模板