Browse Source

分类图片改为非必填项

master
dy-hu 1 year ago
parent
commit
48498e83d6
  1. 14
      src/views/commodity/commdityClass/Edit.vue

14
src/views/commodity/commdityClass/Edit.vue

@ -30,7 +30,7 @@
> >
<div class="content"> <div class="content">
<el-input <el-input
v-model="data.classifyName_ZH" v-model="data.classifyName_ZH"
class="input" class="input"
:disabled="isCheck" :disabled="isCheck"
@ -39,7 +39,7 @@
:placeholder="data.classifyLevel | placeholderTips" :placeholder="data.classifyLevel | placeholderTips"
/> />
<el-input <el-input
v-model="data.classifyName_EN" v-model="data.classifyName_EN"
class="input" class="input"
:disabled="isCheck" :disabled="isCheck"
@ -65,10 +65,10 @@
<div v-else> <div v-else>
<i class="el-icon-plus" /> <span style="display:none; font-size: 10px; color: #909399 !important;">建议尺寸:1252*356</span> <i class="el-icon-plus" /> <span style="display:none; font-size: 10px; color: #909399 !important;">建议尺寸:1252*356</span>
</div> </div>
</el-upload> </el-upload>
<!-- <template v-if="data.classifyLevel < 3"> <!-- <template v-if="data.classifyLevel < 3">
</template> </template>
<template v-else> <template v-else>
<div <div
@ -411,10 +411,10 @@ export default {
if(treeData.classifyImageArray && treeData.classifyImageArray.length){ if(treeData.classifyImageArray && treeData.classifyImageArray.length){
treeData.classifyImage = treeData.classifyImageArray[0].url treeData.classifyImage = treeData.classifyImageArray[0].url
} }
if (!treeData.classifyImage) {
/*if (!treeData.classifyImage) {
this.$message.error('分类\"' + treeData.classifyName + '\"请上传分类图片') this.$message.error('分类\"' + treeData.classifyName + '\"请上传分类图片')
throw new Error('未上传分类图片') throw new Error('未上传分类图片')
}
}*/
if(treeData.childs && treeData.childs.length){ if(treeData.childs && treeData.childs.length){
for (const index in treeData.childs) { for (const index in treeData.childs) {
this.resetImage(treeData.childs[index]) this.resetImage(treeData.childs[index])
@ -424,7 +424,7 @@ export default {
}, },
async addGroup () { async addGroup () {
const params = this.treeData const params = this.treeData
if (params.length === 0) { if (params.length === 0) {
this.$message.error('请添加分类') this.$message.error('请添加分类')
return return

Loading…
Cancel
Save