Commit 23c1a8dc by liuchuanming

fixSaveError

1 parent 78779864
......@@ -357,6 +357,7 @@ export default {
qrCodeHandler () {
// let codeUrl = 'https://images.gitee.com/uploads/images/2020/1231/234016_20fdd151_1480777.png';
this.activateImageMode();
// 暂时写死二维码
this.addImage(qrCodeImage, 3);
},
clearObjects () {
......@@ -511,7 +512,8 @@ export default {
this.editorInstance.addImageObject(imgPath).then(objectProps => {
let target = {}
target.url = imgPath;
// 二维码是占位符,所以可以写死
target.url = type === 3 ? 'http://www.linkwechat.cn/static/img/qrCodeImage.a6d01316.png' : imgPath;
target.randomId = objectProps.id;
target.objType = type;
// 将图片数据传给父组件保存
......
......@@ -346,7 +346,7 @@ export default {
// },
// 获取子组件传来的数据
getImgData(data) {
this.imgList.id = data
this.imgList[data.randomId] = data
},
// 选择素材确认按钮
submitSelectMaterial(text, image, file) {
......@@ -427,8 +427,8 @@ export default {
fontId: isText ? i : null, // 字体ID 与imgPath互斥
fontSize: vo.fontSize,
fontTextAlign: align, // 1 2 3 left center right
left: vo.left,
top: vo.top,
left: parseInt(vo.left),
top: parseInt(vo.top),
width: vo.width,
height: vo.height,
imgPath: vo.url || '',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!