Commit 4b1f78a6 by 胡悦

IP表情zip文件处理,更新组件

1 parent 2c045c6d
...@@ -337,12 +337,20 @@ export default { ...@@ -337,12 +337,20 @@ export default {
// this.addParams.grayscaleUserList = '' // this.addParams.grayscaleUserList = ''
// }, // },
// 限制用户上传的表情包文件格式和大小 // 限制用户上传的表情包文件格式和大小
// beforeUpload_expression(file) {
// console.log(file)
// // const fileType = ['zip']
// const isFileType = file.type.includes('zip')
// // const isSize = file.size / 1024 / 1024 < 1
// !isFileType && this.$message.error('上传表情包文件只能是 zip 格式!')
// // !isSize && this.$message.error('上传表情包文件大小不能超过1MB')
// return isFileType
// },
beforeUpload_expression(file) { beforeUpload_expression(file) {
// const fileType = ['zip'] console.log(file)
const isFileType = file.type.includes('zip') const fileArr = file.name.split('.')
// const isSize = file.size / 1024 / 1024 < 1 const isFileType = fileArr[fileArr.length - 1].includes('zip')
!isFileType && this.$message.error('上传表情包文件只能是 zip 格式!') !isFileType && this.$message.error('上传表情包文件只能是 zip 格式!')
// !isSize && this.$message.error('上传表情包文件大小不能超过1MB')
return isFileType return isFileType
}, },
// 表情包上传成功 // 表情包上传成功
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<gl-select <gl-select
v-model="model.manufacturerName" v-model="model.manufacturerName"
filterable filterable
clearable
placeholder="请选择品牌厂商" placeholder="请选择品牌厂商"
name="manufacturerId" name="manufacturerId"
data-vv-as="品牌厂商" data-vv-as="品牌厂商"
...@@ -47,7 +48,10 @@ ...@@ -47,7 +48,10 @@
:key="item.merchantName" :key="item.merchantName"
:label="item.merchantName" :label="item.merchantName"
:value="item.merchantId" :value="item.merchantId"
/> >
<span style="float: left">{{ item.merchantName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.merchantId }}</span>
</gl-option>
</gl-select> </gl-select>
<!-- <span <!-- <span
v-show="errorBags && errorBags.has('merchantId')" v-show="errorBags && errorBags.has('merchantId')"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!