修复 稿件预览图片无法显示
This commit is contained in:
parent
f30c3f233a
commit
8c7cd9b152
|
|
@ -63,7 +63,6 @@
|
|||
<el-form label-width="180px">
|
||||
<el-form-item label="风格主题" v-show="that.draftDesignList.length > 1">
|
||||
<div class="flex ml-3">
|
||||
<div style="margin-right: 8px">主题风格:</div>
|
||||
<div>
|
||||
<el-select class="min-w-100" v-model="that.draftDesignId" @change="changeType">
|
||||
<el-option
|
||||
|
|
@ -432,7 +431,10 @@ const loadConfig = (config: object, propData = {}) => {
|
|||
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) => {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue