商品增加小程序底部栏配置
This commit is contained in:
@@ -153,6 +153,7 @@ export default {
|
|||||||
price: data.price,
|
price: data.price,
|
||||||
minPrice: data.minPrice,
|
minPrice: data.minPrice,
|
||||||
num: data.num,
|
num: data.num,
|
||||||
|
temp_id: data.temp_id,
|
||||||
bargainMaxPrice: data.bargainMaxPrice,
|
bargainMaxPrice: data.bargainMaxPrice,
|
||||||
bargainMinPrice: data.bargainMinPrice,
|
bargainMinPrice: data.bargainMinPrice,
|
||||||
bargainNum: data.bargainNum,
|
bargainNum: data.bargainNum,
|
||||||
|
|||||||
@@ -209,29 +209,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="24">
|
||||||
<el-form-item label="无理由退款(天):">
|
<el-form-item label="底部栏目配置" >
|
||||||
<div class="acea-row">
|
<el-tabs v-model="editableTabsValue" type="card" editable @edit="handleTabsEdit">
|
||||||
<el-input-number v-model="formValidate.config.withoutReason"></el-input-number>
|
<el-tab-pane
|
||||||
</div>
|
:key="item.name"
|
||||||
</el-form-item>
|
v-for="(item, index) in editableTabs"
|
||||||
</el-col>
|
:label="item.title"
|
||||||
<el-col :span="12">
|
:name="item.name"
|
||||||
<el-form-item label="价保(天):" >
|
>
|
||||||
<div class="acea-row">
|
<span style="display: flex;margin-bottom:10px">当前栏目标题:<el-input style="width:300px" v-model="item.content"></el-input></span>
|
||||||
<el-input-number v-model="formValidate.config.confirmed"></el-input-number>
|
<single-pic v-model="item.configuration" type="image" :num="1" :width="150" :height="150" />
|
||||||
</div>
|
</el-tab-pane>
|
||||||
</el-form-item>
|
</el-tabs>
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="无理由退款图标:" prop="image">
|
|
||||||
<single-pic v-model="formValidate.config.withoutReasonPic" type="image" :num="1" :width="150" :height="150" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="价保图标:" prop="image">
|
|
||||||
<single-pic v-model="formValidate.config.confirmedPic" type="image" :num="1" :width="150" :height="150" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -437,6 +427,9 @@ export default {
|
|||||||
components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic },
|
components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tabIndex: 0,
|
||||||
|
editableTabsValue: '1',
|
||||||
|
editableTabs:[],
|
||||||
//品牌列表
|
//品牌列表
|
||||||
parameter:[],
|
parameter:[],
|
||||||
brandList:[],
|
brandList:[],
|
||||||
@@ -516,12 +509,7 @@ export default {
|
|||||||
id: 0,
|
id: 0,
|
||||||
spec_type: 0,
|
spec_type: 0,
|
||||||
temp_id: '',
|
temp_id: '',
|
||||||
config:{
|
config:[],
|
||||||
withoutReason:null,
|
|
||||||
withoutReasonPic:'',
|
|
||||||
confirmed:null,
|
|
||||||
confirmedPic:'',
|
|
||||||
},
|
|
||||||
attrs: [],
|
attrs: [],
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
@@ -616,12 +604,49 @@ export default {
|
|||||||
if (val) {
|
if (val) {
|
||||||
this.form.slider_image = val.join(',')
|
this.form.slider_image = val.join(',')
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
editableTabs: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
console.log(newVal, oldVal);
|
||||||
|
this.formValidate.config=this.editableTabs
|
||||||
|
},
|
||||||
|
// 开启深度监听
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleTabsEdit(targetName, action) {
|
||||||
|
if (action === 'add') {
|
||||||
|
let newTabName = ++this.tabIndex + '';
|
||||||
|
this.editableTabs.push({
|
||||||
|
title: 'New Tab',
|
||||||
|
name: newTabName,
|
||||||
|
content: 'New Tab content',
|
||||||
|
configuration:''
|
||||||
|
});
|
||||||
|
this.editableTabsValue = newTabName;
|
||||||
|
}
|
||||||
|
if (action === 'remove') {
|
||||||
|
let tabs = this.editableTabs;
|
||||||
|
let activeName = this.editableTabsValue;
|
||||||
|
if (activeName === targetName) {
|
||||||
|
tabs.forEach((tab, index) => {
|
||||||
|
if (tab.name === targetName) {
|
||||||
|
let nextTab = tabs[index + 1] || tabs[index - 1];
|
||||||
|
if (nextTab) {
|
||||||
|
activeName = nextTab.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.editableTabsValue = activeName;
|
||||||
|
this.editableTabs = tabs.filter(tab => tab.name !== targetName);
|
||||||
|
}
|
||||||
|
},
|
||||||
addParameter(){
|
addParameter(){
|
||||||
// console.log('this.formValidate.parameter',this.formValidate.parameter)
|
// console.log('this.formValidate.parameter',this.formValidate.parameter)
|
||||||
if (!this.formValidate.parameter){
|
if (!this.formValidate.parameter){
|
||||||
@@ -782,13 +807,9 @@ export default {
|
|||||||
let brand_id = parseInt(data.brand_id) || 0;
|
let brand_id = parseInt(data.brand_id) || 0;
|
||||||
this.attrs = data.items || [];
|
this.attrs = data.items || [];
|
||||||
if (data.config==undefined){
|
if (data.config==undefined){
|
||||||
data['config']={
|
data['config']=[]
|
||||||
withoutReason:null,
|
|
||||||
withoutReasonPic:'',
|
|
||||||
confirmed:null,
|
|
||||||
confirmedPic:'',
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
that.editableTabs=data.config
|
||||||
that.formValidate = data;
|
that.formValidate = data;
|
||||||
that.formValidate.cate_id = cate_id;
|
that.formValidate.cate_id = cate_id;
|
||||||
that.formValidate.brand_id = brand_id;
|
that.formValidate.brand_id = brand_id;
|
||||||
|
|||||||
Reference in New Issue
Block a user