diff --git a/components/diy/diy.vue b/components/diy/diy.vue index e674dfcd..3dfb1a1e 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -13,30 +13,30 @@ @@ -116,6 +116,10 @@ type: [String, Number], default: '', }, + propkey: { + type: String, + default: '', + } }, components: { componentDiyHeader, @@ -208,9 +212,19 @@ hack_reset: false, // 底部导航高度 footer_height_value: 0, + diy_key: '', }; }, - created() { + watch: { + propkey(val) { + this.setData({ + diy_key: val + }) + // 初始化 + this.init(); + } + }, + created() { // 初始化配置 this.init_config(); diff --git a/components/diy/goods-list.vue b/components/diy/goods-list.vue index 892805af..720817bc 100644 --- a/components/diy/goods-list.vue +++ b/components/diy/goods-list.vue @@ -187,6 +187,10 @@ type: Boolean, default: true, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -225,6 +229,15 @@ return gradient_handle(this.new_style.shop_button_color, '180deg'); }, }, + watch: { + propkey(val) { + this.setData({ + form: this.propValue.content, + new_style: this.propValue.style, + }); + this.init(); + } + }, created() { this.setData({ form: this.propValue.content, diff --git a/components/diy/goods-tabs.vue b/components/diy/goods-tabs.vue index aa92c1a3..1cd6a318 100644 --- a/components/diy/goods-tabs.vue +++ b/components/diy/goods-tabs.vue @@ -45,6 +45,10 @@ type: Boolean, default: false, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -79,6 +83,11 @@ } }, }, + watch: { + propkey(val) { + this.init(); + } + }, created() { this.init(); }, diff --git a/pages/index/index.vue b/pages/index/index.vue index 371594c7..20e9b30f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -3,8 +3,8 @@ - - + +