diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue index 03e23d9..f74bedd 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue @@ -63,7 +63,6 @@
-
主题风格:
{ that.sizeInfo = that.pageConfig.editArea // true, conf.pageConfig, conf.data, test draftDesignEditRef.value.init(false, that.pageConfig, that.data, that.propInfo) - showPng(); + loading.value = true + setTimeout(()=>{ + showPng(); + },300) queryUseLabel(); } const queryUseLabel = (label) => { diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/index.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/index.vue index eda2701..4d917f3 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/index.vue +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/index.vue @@ -698,27 +698,24 @@ const toPngUrl = (callback: (url: string) => void, options?: { } }) => { - setTimeout(()=>{ - //处理图片等待加载完成 - let widthScale = options && options.widthScale ? options.widthScale : 5 - let heightScale = options && options.heightScale ? options.heightScale : 5 - graph.toPNG((dataUri) => { - that.previewUrl = dataUri; - callback(that.previewUrl) - }, { - backgroundColor: that.pageConfig.background.areaColor, - width: that.pageConfig.width * (widthScale), - height: that.pageConfig.height * (heightScale), - padding: { - top: 0, - left: 0, - right: 0, - bottom: 0 - }, - quality: 1, - ...options - }) - },500) + let widthScale = options && options.widthScale ? options.widthScale : 5 + let heightScale = options && options.heightScale ? options.heightScale : 5 + graph.toPNG((dataUri) => { + that.previewUrl = dataUri; + callback(that.previewUrl) + }, { + backgroundColor: that.pageConfig.background.areaColor, + width: that.pageConfig.width * (widthScale), + height: that.pageConfig.height * (heightScale), + padding: { + top: 0, + left: 0, + right: 0, + bottom: 0 + }, + quality: 1, + ...options + }) } const setPropList = (propDataInfo) => { const keys = Object.keys(propDataInfo)