|
@@ -213,7 +213,7 @@
|
|
|
></div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
- <div>
|
|
|
+ <div @click="changeSize">
|
|
|
<img src="../../assets/teacherdev/sfds-tailoring.png" alt="" />
|
|
|
</div>
|
|
|
<el-upload
|
|
@@ -523,6 +523,7 @@ export default {
|
|
|
imgCtx: null,
|
|
|
TUI_selectedItem: null,
|
|
|
TUI_selectedFont: "",
|
|
|
+ instance: null,
|
|
|
};
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -600,6 +601,14 @@ export default {
|
|
|
return Math.abs(Math.abs(this.luminanceNumber) - 100) / 100;
|
|
|
}
|
|
|
},
|
|
|
+ // 裁剪
|
|
|
+ changeSize() {
|
|
|
+ if (!this.instance) {
|
|
|
+ this.$message.warning("请先上传图片");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.instance.ui._actions.crop.cancel();
|
|
|
+ },
|
|
|
initCanvasImage() {
|
|
|
this.loading = this.$loading({
|
|
|
lock: true,
|