diff --git a/dist.zip b/dist.zip deleted file mode 100644 index a9b9f1a..0000000 Binary files a/dist.zip and /dev/null differ diff --git a/src/option/user/info.js b/src/option/user/info.js index e198ead..37ee09b 100644 --- a/src/option/user/info.js +++ b/src/option/user/info.js @@ -1,4 +1,5 @@ -import website from "../../config/website" +import website from "../../config/website"; +import { Message } from 'element-ui'; export default { tabs: true, tabsActive: 1, @@ -8,6 +9,7 @@ export default { prop: 'info', column: [{ label: '头像', + prop: 'avatar', type: 'upload', listType: 'picture-img', propsHttp: { @@ -15,15 +17,31 @@ export default { res: 'data', url: 'link', }, - canvasOption: { - text: ' ', - ratio: 0.1 - }, + // canvasOption: { + // text: ' ', + // ratio: 0.1 + // }, + fileType: 'img',//img/video/audio, + accept: 'image/png, image/jpeg', action: '/api/blade-resource/oss/endpoint/put-file', tip: '只能上传jpg/png用户头像,且不超过500kb', span: 12, row: true, - prop: 'avatar' + prop: 'avatar', + tip: '只能上传jpg/png用户头像,且不超过500kb', + action: '/api/blade-resource/oss/endpoint/put-file', + uploadBefore: (file, done, loading) => { + if (['image/png', 'image/jpeg'].indexOf(file.type) == -1) { + Message({ + message: '只能上传jpg/png用户头像', + type: 'error' + }); + loading(); + } + else { + done(); + } + } }, { label: '姓名', span: 12, diff --git a/src/views/system/dept.vue b/src/views/system/dept.vue index 900357a..ca6ad6d 100644 --- a/src/views/system/dept.vue +++ b/src/views/system/dept.vue @@ -16,8 +16,8 @@