From cd0b65067ed05ea617934746b757689ba4f3aa29 Mon Sep 17 00:00:00 2001
From: sj <1304317391@qq.com>
Date: Wed, 2 Nov 2022 17:06:50 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=A2=9E=E5=8A=A0=E5=B0=8F?=
=?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=BA=95=E9=83=A8=E6=A0=8F=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/bxg/activity/bargain/index.vue | 1 +
src/views/bxg/shop/goods/form.vue | 93 +++++++++++++++---------
2 files changed, 58 insertions(+), 36 deletions(-)
diff --git a/src/views/bxg/activity/bargain/index.vue b/src/views/bxg/activity/bargain/index.vue
index cccf208..72b0c12 100644
--- a/src/views/bxg/activity/bargain/index.vue
+++ b/src/views/bxg/activity/bargain/index.vue
@@ -153,6 +153,7 @@ export default {
price: data.price,
minPrice: data.minPrice,
num: data.num,
+ temp_id: data.temp_id,
bargainMaxPrice: data.bargainMaxPrice,
bargainMinPrice: data.bargainMinPrice,
bargainNum: data.bargainNum,
diff --git a/src/views/bxg/shop/goods/form.vue b/src/views/bxg/shop/goods/form.vue
index bdbcb3d..33d46af 100644
--- a/src/views/bxg/shop/goods/form.vue
+++ b/src/views/bxg/shop/goods/form.vue
@@ -209,29 +209,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 当前栏目标题:
+
+
+
@@ -437,6 +427,9 @@ export default {
components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic },
data() {
return {
+ tabIndex: 0,
+ editableTabsValue: '1',
+ editableTabs:[],
//品牌列表
parameter:[],
brandList:[],
@@ -516,12 +509,7 @@ export default {
id: 0,
spec_type: 0,
temp_id: '',
- config:{
- withoutReason:null,
- withoutReasonPic:'',
- confirmed:null,
- confirmedPic:'',
- },
+ config:[],
attrs: [],
items: [
{
@@ -616,12 +604,49 @@ export default {
if (val) {
this.form.slider_image = val.join(',')
}
- }
+ },
+ editableTabs: {
+ handler(newVal, oldVal) {
+ console.log(newVal, oldVal);
+ this.formValidate.config=this.editableTabs
+ },
+ // 开启深度监听
+ deep: true
+ },
},
mounted () {
this.getInfo();
},
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(){
// console.log('this.formValidate.parameter',this.formValidate.parameter)
if (!this.formValidate.parameter){
@@ -782,13 +807,9 @@ export default {
let brand_id = parseInt(data.brand_id) || 0;
this.attrs = data.items || [];
if (data.config==undefined){
- data['config']={
- withoutReason:null,
- withoutReasonPic:'',
- confirmed:null,
- confirmedPic:'',
- }
+ data['config']=[]
}
+ that.editableTabs=data.config
that.formValidate = data;
that.formValidate.cate_id = cate_id;
that.formValidate.brand_id = brand_id;