部分优化
This commit is contained in:
@@ -135,7 +135,6 @@
|
||||
:centerBox="option.centerBox"
|
||||
:height="option.height"
|
||||
:infoTrue="option.infoTrue"
|
||||
:limitMinSize="option.limitMinSize"
|
||||
:enlarge="option.enlarge"
|
||||
@real-time="realTime"
|
||||
:autoCropArea="1"
|
||||
@@ -831,7 +830,6 @@ export default defineComponent({
|
||||
this.locationList = JSON.parse(JSON.stringify(this.oldLocationList))
|
||||
// this.locationList = JSON.parse(JSON.stringify(this.locationList))
|
||||
},
|
||||
|
||||
submitPlacement(){
|
||||
// let cropper:any = this.$refs.cropper,
|
||||
// that = this
|
||||
@@ -937,7 +935,6 @@ export default defineComponent({
|
||||
cropper.changeScale(num);
|
||||
},
|
||||
async confrimSubmit(){
|
||||
console.log(this.printObject)
|
||||
let isCovered = true
|
||||
if(this.editOrUpload == 'edit'){
|
||||
await new Promise((resolve, reject) => {
|
||||
@@ -1125,12 +1122,15 @@ export default defineComponent({
|
||||
if(boolean){
|
||||
this.slider = 50
|
||||
let url
|
||||
if(this.printObject.url){
|
||||
if(this.printObject.url && !this.printObject.url.startsWith('blob:')){
|
||||
url = this.printObject.url
|
||||
}else{
|
||||
let cropper:any = this.$refs.cropper
|
||||
await cropper.getCropData(async (value:any) => {
|
||||
url = value
|
||||
url = await new Promise<void>((resolve, reject) => {
|
||||
cropper.getCropData((value:any) => {
|
||||
this.option.img = value
|
||||
resolve(value)
|
||||
})
|
||||
})
|
||||
}
|
||||
this.getImgDetail(url)
|
||||
|
||||
Reference in New Issue
Block a user