Skip to content

Commit dca8ba8

Browse files
authored
fix image crop compress
1 parent 270645a commit dca8ba8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vue-core-image-upload.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
let self = this;
153153
const cropBox = this.$refs.cropBox;
154154
const targetImage = cropBox.getCropImage();
155-
this.data.comprose = 100 - this.compress;
155+
this.data.compress = 100 - this.compress;
156156
return canvasHelper.rotate(targetImage, 1, (src) => {
157157
self.__initImage(src)
158158
})
@@ -162,7 +162,7 @@
162162
let self = this;
163163
const cropBox = this.$refs.cropBox;
164164
const targetImage = cropBox.getCropImage();
165-
this.data.comprose = 100 - this.compress;
165+
this.data.compress = 100 - this.compress;
166166
return canvasHelper.rotate(targetImage, -1, (src) => {
167167
self.__initImage(src)
168168
})
@@ -174,7 +174,7 @@
174174
const upload = this.__setUpload(e.target);
175175
if (this.crop === 'local') {
176176
const targetImage = cropBox.getCropImage();
177-
this.data.comprose = 100 - this.compress;
177+
this.data.compress = 100 - this.compress;
178178
return canvasHelper.crop(targetImage, this.data, (code) => {
179179
upload(code);
180180
this.__dispatch('imagechanged', code);
@@ -189,7 +189,7 @@
189189
const upload = this.__setUpload(e.target);
190190
if (this.resize === 'local') {
191191
const targetImage = cropBox.getCropImage();
192-
this.data.comprose = 100 - this.compress;
192+
this.data.compress = 100 - this.compress;
193193
return canvasHelper.resize(targetImage, this.data, (code) => {
194194
upload(code);
195195
this.__dispatch('imagechanged', code);

0 commit comments

Comments
 (0)