Commit e4af5316 by linjinhong

fix:修改问题

parent 205e3d15
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "JomallProductionAssistant", "name": "JomallProductionAssistant",
"productName": "JomallProductionAssistant", "productName": "JomallProductionAssistant",
"description": "", "description": "",
"version": "1.0.27", "version": "1.0.30",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
......
...@@ -749,7 +749,7 @@ export default { ...@@ -749,7 +749,7 @@ export default {
); );
return img?.productionFile; return img?.productionFile;
}, },
getBackFile({ files, size }, callback) { async getBackFile({ files, size }, callback) {
const isCp = this.productMark == "custom_part" ? true : false; const isCp = this.productMark == "custom_part" ? true : false;
let that = this; let that = this;
let bw = document.getElementById("line"); let bw = document.getElementById("line");
...@@ -760,7 +760,7 @@ export default { ...@@ -760,7 +760,7 @@ export default {
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
files[i].url = files[i]?.productionFile || files[i].url; files[i].url = files[i]?.productionFile || files[i].url;
that.$nextTick(async () => { await that.$nextTick();
let w = bw / 2; let w = bw / 2;
let h = bh / 2; let h = bh / 2;
let width_px, height_px, rate, x, y; let width_px, height_px, rate, x, y;
...@@ -821,32 +821,29 @@ export default { ...@@ -821,32 +821,29 @@ export default {
that.selectIndex = that.imgList.length - 1; that.selectIndex = that.imgList.length - 1;
that.showImgSetting = true; that.showImgSetting = true;
isCp ? that.ev("x_center") : that.ev("cover"); isCp ? this.ev("x_center") : this.ev("cover");
if (!size) that.ev("cover"); if (!size || isCut) this.ev("cover");
if (isCut) that.ev("cover"); await this.$nextTick();
this.$nextTick(async () => { const { hasOutsideValidPixel } = await checkImageOutsideGrid();
//等图片铺上网格后判断是否超过网格
const {
isImageBiggerThanGrid,
hasOutsideValidPixel,
} = await checkImageOutsideGrid();
if (isImageBiggerThanGrid && hasOutsideValidPixel) {
//图大于台版且超过台版有素材
this.isOver = hasOutsideValidPixel; this.isOver = hasOutsideValidPixel;
} else if (!isImageBiggerThanGrid) { // this.$nextTick(async () => {
//图小于台版 // //等图片铺上网格后判断是否超过网格
this.isOver = isImageBiggerThanGrid;
} else if (isImageBiggerThanGrid && !hasOutsideValidPixel) { // // if (isImageBiggerThanGrid && hasOutsideValidPixel) {
//图大于台版且超过台版没有有素材 // // //图大于台版且超过台版有素材
this.isOver = hasOutsideValidPixel; // // this.isOver = hasOutsideValidPixel;
} // // } else if (!isImageBiggerThanGrid) {
}); // // //图小于台版
// // this.isOver = isImageBiggerThanGrid;
// // } else if (isImageBiggerThanGrid && !hasOutsideValidPixel) {
// // //图大于台版且超过台版没有有素材
// // this.isOver = hasOutsideValidPixel;
// // }
// });
if (i === files.length - 1) { if (i === files.length - 1) {
callback && callback(); callback && callback();
} }
});
} }
}, },
addFile(file, callback) { addFile(file, callback) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment