Commit 23c1a8dc by liuchuanming

fixSaveError

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