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

!777 修复打印预览显示重复页的问题
Merge pull request !777 from 酣月十九/next

zuohuaijun 2 лет назад
Родитель
Сommit
055d820be4
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      Web/src/views/system/print/component/hiprint/preview.vue

+ 3 - 0
Web/src/views/system/print/component/hiprint/preview.vue

@@ -28,6 +28,9 @@ const showDialog = (hiprintTemplate: any, printData: {}, width = 210) => {
 	state.hiprintTemplate = hiprintTemplate;
 	state.printData = printData;
 	nextTick(() => {
+		while (previewContentRef.value?.firstChild) {
+			previewContentRef.value.removeChild(previewContentRef.value.firstChild);
+		}
 		const newHtml = hiprintTemplate.getHtml(printData);
 		previewContentRef.value.appendChild(newHtml[0]);
 	});