Commit 61e48da354f5f3014c6055497b402cbc43bdf2fc
1 parent
3755597c
规避上传头像控制台异常
Showing
1 changed file
with
5 additions
and
2 deletions
ruoyi-ui/src/views/system/user/profile/userAvatar.vue
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | <br /> |
| 25 | 25 | <el-row> |
| 26 | 26 | <el-col :lg="2" :md="2"> |
| 27 | - <el-upload :show-file-list="false" :before-upload="beforeUpload"> | |
| 27 | + <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload"> | |
| 28 | 28 | <el-button size="small"> |
| 29 | 29 | 上传 |
| 30 | 30 | <i class="el-icon-upload el-icon--right"></i> |
| ... | ... | @@ -44,7 +44,7 @@ |
| 44 | 44 | <el-button icon="el-icon-refresh-right" size="small" @click="rotateRight()"></el-button> |
| 45 | 45 | </el-col> |
| 46 | 46 | <el-col :lg="{span: 2, offset: 6}" :md="2"> |
| 47 | - <el-button type="primary" size="small" @click="uploadImg()">上 传</el-button> | |
| 47 | + <el-button type="primary" size="small" @click="uploadImg()">提 交</el-button> | |
| 48 | 48 | </el-col> |
| 49 | 49 | </el-row> |
| 50 | 50 | </el-dialog> |
| ... | ... | @@ -84,6 +84,9 @@ export default { |
| 84 | 84 | editCropper() { |
| 85 | 85 | this.open = true; |
| 86 | 86 | }, |
| 87 | + // 覆盖默认的上传行为 | |
| 88 | + requestUpload() { | |
| 89 | + }, | |
| 87 | 90 | // 向左旋转 |
| 88 | 91 | rotateLeft() { |
| 89 | 92 | this.$refs.cropper.rotateLeft(); | ... | ... |