提交 173a6249 编写于 作者: bo.dang's avatar bo.dang

裁剪缩放优化

上级 409e3a9f
...@@ -171,21 +171,21 @@ ...@@ -171,21 +171,21 @@
// }); // });
}, },
cropstart:(event) => { // cropstart:(event) => {
console.log(event.detail.originalEvent); // console.log(event.detail.originalEvent);
console.log(event.detail.action); // console.log(event.detail.action);
//
if(this.cropOption.aspectRatio == 0){ // if(this.cropOption.aspectRatio == 0){
if(event.detail.action == "w" // if(event.detail.action == "w"
|| event.detail.action == "e" // || event.detail.action == "e"
|| event.detail.action == "se" // || event.detail.action == "se"
|| event.detail.action == "sw" // || event.detail.action == "sw"
|| event.detail.action == "ne" // || event.detail.action == "ne"
|| event.detail.action == "nw"){ // || event.detail.action == "nw"){
event.preventDefault(); // event.preventDefault();
} // }
} // }
}, // },
// zoom: function (event) { // zoom: function (event) {
// // Keep the image in its natural size // // Keep the image in its natural size
......
...@@ -267,7 +267,9 @@ ...@@ -267,7 +267,9 @@
} }
else if(_this.width > fileLimit.width || _this.height > fileLimit.height){ else if(_this.width > fileLimit.width || _this.height > fileLimit.height){
vm.showCropper = true; vm.showCropper = true;
// return; vm.currentOption.cvWidth = _this.width;
vm.currentOption.cvHeight = _this.height;
return;
} }
else { else {
openLoading(vm); openLoading(vm);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册