限制输入框的字数
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
accept=".png, .jpg"
|
||||
:action="useOss ? ossUploadUrl : minioUploadUrl"
|
||||
:data="useOss ? dataObj : null"
|
||||
list-type="picture"
|
||||
@ -95,6 +96,17 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1);
|
||||
// const whiteList = ['pdf', 'doc', 'docx', 'xls', 'xlsx'];
|
||||
// if (whiteList.indexOf(fileSuffix) === -1) {
|
||||
// this.$msg('上传文件只能是 pdf、doc、docx、xls、xlsx格式', 'error');
|
||||
// return false;
|
||||
// }
|
||||
// const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
// if (!isLt2M) {
|
||||
// this.$msg('上传文件大小不能超过 2MB', 'error');
|
||||
// return false;
|
||||
// }
|
||||
let _self = this;
|
||||
if (!this.useOss) {
|
||||
//不使用oss不需要获取策略
|
||||
|
Reference in New Issue
Block a user