From a890ee52c7f24598fd93b0d0d0ac12ba6083ddfc Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Wed, 8 Mar 2023 11:34:08 +0800 Subject: [PATCH] =?UTF-8?q?formtabs=E7=BC=BA=E9=99=B7=E6=BC=8F=E6=B4=9E?= =?UTF-8?q?=E8=A1=A5=E5=85=85=EF=BC=8C=E8=A1=A5=E5=85=85=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=89=8D=E6=A0=BC=E5=BC=8F=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/option/user/info.js | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/option/user/info.js b/src/option/user/info.js index d2fcbe0..f33f5c0 100644 --- a/src/option/user/info.js +++ b/src/option/user/info.js @@ -1,6 +1,14 @@ +import { Message } from 'element-ui'; export default { tabs: true, tabsActive: 1, + column: [ + { + label:'tabs', + prop:'tabs', + display: false + } + ], group: [ { label: '个人信息', @@ -13,15 +21,29 @@ 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', + 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,