| | |
| | | height: this.height + "px" |
| | | }, |
| | | cropperDialogVisible: false, |
| | | cropperFile: null |
| | | cropperFile: null, |
| | | hostNew: '' |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.value = this.modelValue |
| | | this.newFile(this.modelValue) |
| | | this.getHost().then(res => { |
| | | this.value = this.modelValue |
| | | this.newFile(this.modelValue) |
| | | }) |
| | | }, |
| | | methods: { |
| | | getHost () { |
| | | if (this.host) return this.hostNew = this.host |
| | | return this.$API.setting.component.getImgHost.get().then(res => { |
| | | this.hostNew = res.data + '/visual/' |
| | | }) |
| | | }, |
| | | newFile(url){ |
| | | if(url){ |
| | | this.file = { |
| | | status: "success", |
| | | url: `${this.host}${url}` |
| | | url: `${this.hostNew}${url}` |
| | | } |
| | | }else{ |
| | | this.file = null |