| | |
| | | // 打开弹出层结束时的回调 |
| | | modalOpened() { |
| | | this.visible = true; |
| | | if (!this.resizeHandler) { |
| | | this.resizeHandler = debounce(() => { |
| | | this.refresh() |
| | | }, 100) |
| | | } |
| | | // if (!this.resizeHandler) { |
| | | // this.resizeHandler = debounce(() => { |
| | | // this.refresh() |
| | | // }, 100) |
| | | // } |
| | | window.addEventListener("resize", this.resizeHandler) |
| | | }, |
| | | // 刷新组件 |
| | |
| | | // 上传图片 |
| | | uploadImg() { |
| | | this.$refs.cropper.getCropBlob(data => { |
| | | console.log(data); |
| | | let formData = new FormData(); |
| | | formData.append("avatarfile", data, this.options.filename); |
| | | uploadAvatar(formData).then(response => { |