Commit 11276510 by linjinhong

图片编辑title添加单位以及添加打印时尺寸提示

parent 37efd092
......@@ -2,7 +2,7 @@
"name": "JomallProductionAssistant",
"productName": "JomallProductionAssistant",
"description": "",
"version": "1.0.7",
"version": "1.0.8",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
......
......@@ -370,7 +370,13 @@ export default {
y = this.numberToStr4(y);
w = this.numberToStr4(w);
h = this.numberToStr4(h);
console.log("print", x, y, w, h);
console.log("print", w, h);
if (w > 4100 || h > 4500) {
return this.$message.warning(
"打印图片素材宽度不能超过410mm,长度不能超过450mm"
);
}
// console.log(x, "x");
// console.log(y, "y");
......
......@@ -16,27 +16,27 @@ export default {
y: 0,
w: 0,
h: 0,
r: 0
}
r: 0,
},
};
},
props: {
visible: {
type: Boolean,
default: false
default: false,
},
item: {
type: Object,
default: () => {}
}
default: () => {},
},
},
watch: {
visible: {
handler() {
this.drawerShow = this.visible;
},
immediate: true
immediate: true,
},
item: {
handler() {
......@@ -71,8 +71,8 @@ export default {
}
},
immediate: true,
deep: true
}
deep: true,
},
},
methods: {
pxToUnit,
......@@ -80,13 +80,12 @@ export default {
formChange(t) {
if (t && t === "w") {
this.form.h = this.form.w * this.form.rate;
}
if (t && t === "h") {
this.form.w = this.form.h * this.form.rate;
}
this.form.h = this.form.h? Math.abs(this.form.h):this.form.h
this.form.w = this.form.w? Math.abs(this.form.w):this.form.w
this.form.h = this.form.h ? Math.abs(this.form.h) : this.form.h;
this.form.w = this.form.w ? Math.abs(this.form.w) : this.form.w;
let f = JSON.parse(JSON.stringify(this.form));
f.y = Number(f.y) + Number(f.h) / 2;
f.x = Number(f.x) + Number(f.w) / 2;
......@@ -125,15 +124,15 @@ export default {
this.form.w = this.form.h * this.form.rate;
}
this.formChange();
}
}
},
},
};
</script>
<template>
<div class="drawer" :style="{ animation: `ltr-drawer-in .3s 1ms` }">
<div class="title">
图片编辑
图片编辑(单位:{{ $dataStore.get("setting").unit }}
</div>
<div class="img-form">
<el-form
......
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