修改商品显示逻辑

v1.0.0
于肖磊 2024-08-27 18:42:27 +08:00
parent 2134860e13
commit 703736258e
1 changed files with 9 additions and 10 deletions

View File

@ -3,10 +3,10 @@
<div class="mb-12">显示内容</div>
<el-form-item label="是否显示">
<el-checkbox-group v-model="form.is_show">
<el-checkbox v-for="item in base_list.list_show_list" :key="item.value" :value="item.value">{{ item.name }}</el-checkbox>
<el-checkbox v-for="item in base_list.list_show_list.filter(item => item.type.includes(form.theme))" :key="item.value" :value="item.value">{{ item.name }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="价格独行">
<el-form-item v-if="['0', '1', '2'].includes(form.theme)" label="价格独行">
<el-switch v-model="form.is_price_solo"></el-switch>
</el-form-item>
</card-container>
@ -49,17 +49,16 @@ const state = reactive({
});
// 使toRefs
const { form } = toRefs(state);
const base_list = {
list_show_list: [
{ name: '商品名称', value: 'title' },
{ name: '商品标签', value: 'plugins_view_icon' },
{ name: '商品售价', value: 'price' },
{ name: '商品销量', value: 'sales_count' },
{ name: '商品名称', value: 'title', type:['0', '1', '2', '3', '4', '5', '6']},
{ name: '商品标签', value: 'plugins_view_icon', type:['0', '1', '2'] },
{ name: '商品售价', value: 'price', type:['0', '1', '2', '3', '4', '5', '6'] },
{ name: '商品销量', value: 'sales_count', type:['0', '1', '2'] },
// { name: '', value: '4' },
{ name: '商品原价', value: 'original_price' },
{ name: '售价单位', value: 'price_unit' },
{ name: '原价单位', value: 'original_price_unit' },
{ name: '商品原价', value: 'original_price', type:['0', '1', '2'] },
{ name: '售价单位', value: 'price_unit', type:['0', '1', '2', '3', '4', '5', '6'] },
{ name: '原价单位', value: 'original_price_unit', type:['0', '1', '2'] },
],
shopping_button_list: [
{ name: '文字', value: 'text' },