diff --git a/components/diy/article-list.vue b/components/diy/article-list.vue index 278e8068..bf7f2a9f 100644 --- a/components/diy/article-list.vue +++ b/components/diy/article-list.vue @@ -69,6 +69,10 @@ type: Boolean, default: true, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -114,6 +118,12 @@ article_carousel_list: [], }; }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { this.init(); }, diff --git a/components/diy/article-tabs.vue b/components/diy/article-tabs.vue index b7fa78d6..cdef0077 100644 --- a/components/diy/article-tabs.vue +++ b/components/diy/article-tabs.vue @@ -3,7 +3,7 @@ - + @@ -40,6 +40,10 @@ type: Boolean, default: false, }, + propkey: { + type: String, + default: '', + } }, components: { componentDiyModulesTabsView, @@ -57,6 +61,7 @@ tabs_top: 0, tabs_background: 'background:transparent', custom_nav_height: 33, + diy_key: '', }; }, watch: { @@ -79,6 +84,13 @@ this.tabs_background = 'background:transparent'; } }, + propkey(val) { + this.setData({ + diy_key: val + }) + // 初始化 + this.init(); + } }, created() { this.init(); diff --git a/components/diy/auxiliary-blank.vue b/components/diy/auxiliary-blank.vue index 5bdd9abf..5bcd4e72 100644 --- a/components/diy/auxiliary-blank.vue +++ b/components/diy/auxiliary-blank.vue @@ -14,6 +14,10 @@ return {}; }, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -21,6 +25,12 @@ style: '', }; }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { this.init(); }, diff --git a/components/diy/auxiliary-line.vue b/components/diy/auxiliary-line.vue index 6e18ff8d..6a3f9fcd 100644 --- a/components/diy/auxiliary-line.vue +++ b/components/diy/auxiliary-line.vue @@ -13,6 +13,10 @@ type: Object, default: () => ({}), }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -20,6 +24,12 @@ style: '', }; }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { this.init(); }, diff --git a/components/diy/carousel.vue b/components/diy/carousel.vue index 0a3319d9..02b3d02f 100644 --- a/components/diy/carousel.vue +++ b/components/diy/carousel.vue @@ -77,6 +77,10 @@ type: Boolean, default: true, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -107,16 +111,22 @@ slides_per_group: 1, }; }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { - this.setData({ - form: this.propValue.content, - new_style: this.propValue.style, - }); this.init(); }, methods: { isEmpty, init() { + this.setData({ + form: this.propValue.content, + new_style: this.propValue.style, + }); const { windowWidth } = uni.getSystemInfoSync(); // 将90%的宽度分成16份 const block = (windowWidth * 0.9) / 16; diff --git a/components/diy/coupon.vue b/components/diy/coupon.vue index e6c4a0cd..3beca43d 100644 --- a/components/diy/coupon.vue +++ b/components/diy/coupon.vue @@ -167,6 +167,10 @@ type: Object, default: () => ({}), }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -190,6 +194,12 @@ home_page_url: tabbar_pages[0], }; }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { this.init(); }, @@ -546,9 +556,6 @@ display: flex; align-items: center; - &.long-name { - } - &.short-name { height: 132rpx; justify-content: center; diff --git a/components/diy/custom.vue b/components/diy/custom.vue index 18764aac..5468ed8f 100644 --- a/components/diy/custom.vue +++ b/components/diy/custom.vue @@ -3,16 +3,16 @@ @@ -43,6 +43,10 @@ return {}; }, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -61,24 +65,30 @@ }; }, }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { - this.setData({ - form: this.propValue.content, - new_style: this.propValue.style, - }); this.init(); }, methods: { percentage_count, init() { + this.setData({ + form: this.propValue.content, + new_style: this.propValue.style, + }); this.setData({ style_container: common_styles_computer(this.new_style.common_style) + 'box-sizing: border-box;', // 用于样式显示 div_width: sys_width, - div_height: this.form.height * this.scale, + div_height: this.form.height, }); }, - url_open(link) { - app.globalData.url_event(link); + url_event(e) { + app.globalData.url_event(e); }, }, }; diff --git a/components/diy/data-magic.vue b/components/diy/data-magic.vue index 31fd7508..4f2af4d9 100644 --- a/components/diy/data-magic.vue +++ b/components/diy/data-magic.vue @@ -81,6 +81,10 @@ type: Object, default: () => ({}), }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -112,16 +116,22 @@ }; }, }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { - this.setData({ - form: this.propValue.content, - new_style: this.propValue.style, - }); this.init(); }, methods: { isEmpty, init() { + this.setData({ + form: this.propValue.content, + new_style: this.propValue.style, + }); const density = 4; this.setData({ outer_spacing: this.new_style.image_spacing * 2 + 'rpx', diff --git a/components/diy/diy.vue b/components/diy/diy.vue index e78e6513..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,8 +212,18 @@ hack_reset: false, // 底部导航高度 footer_height_value: 0, + diy_key: '', }; }, + watch: { + propkey(val) { + this.setData({ + diy_key: val + }) + // 初始化 + this.init(); + } + }, created() { // 初始化配置 this.init_config(); diff --git a/components/diy/float-window.vue b/components/diy/float-window.vue index 58a071a9..271b8c65 100644 --- a/components/diy/float-window.vue +++ b/components/diy/float-window.vue @@ -27,6 +27,10 @@ return {}; }, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -38,15 +42,21 @@ color: '', }; }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { - this.setData({ - form: this.propValue.content, - new_style: this.propValue.style, - }); this.init(); }, methods: { init() { + this.setData({ + form: this.propValue.content, + new_style: this.propValue.style, + }); const { float_style, float_style_color, display_location, offset_number_percentage } = this.propValue.style; const { windowWidth, windowHeight } = uni.getSystemInfoSync(); diff --git a/components/diy/footer.vue b/components/diy/footer.vue index 9e5d4229..3fc366dc 100644 --- a/components/diy/footer.vue +++ b/components/diy/footer.vue @@ -43,6 +43,10 @@ type: Number, default: 0, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -73,6 +77,10 @@ propFooterActiveIndex(value, old_value) { this.init(); }, + propkey(val) { + // 初始化 + this.init(); + } }, // 页面被展示 created: function () { 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..b11e9284 100644 --- a/components/diy/goods-tabs.vue +++ b/components/diy/goods-tabs.vue @@ -2,7 +2,7 @@ - + @@ -45,6 +45,10 @@ type: Boolean, default: false, }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -56,6 +60,7 @@ tabs_top: 0, tabs_background: 'background:transparent', custom_nav_height: 33, + diy_key: '', }; }, watch: { @@ -78,6 +83,13 @@ this.tabs_background = 'background:transparent'; } }, + propkey(val) { + // 初始化 + this.setData({ + diy_key: val + }) + this.init(); + } }, created() { this.init(); diff --git a/components/diy/header.vue b/components/diy/header.vue index d68ba0dd..bcca6832 100644 --- a/components/diy/header.vue +++ b/components/diy/header.vue @@ -2,23 +2,25 @@ - - + + - - - - {{ form.content.title }} - + + + + + {{ form.content.title }} + + @@ -42,7 +44,7 @@ - + @@ -81,6 +83,10 @@ type: Number, default: 0, }, + propkey: { + type: String, + default: '', + } }, components: { componentDiySearch, @@ -138,6 +144,11 @@ } } }, + propkey(val) { + if ((this.propValue || null) !== null) { + this.init(); + } + } }, created() { if ((this.propValue || null) !== null) { @@ -172,7 +183,8 @@ position: new_style.up_slide_display == '1' ? 'position:fixed;' : 'position:relative;', is_positon_realative: new_style.up_slide_display == '1' ? false : true, roll_style: new_roll_style, - text_style: `font-weight:${new_style.header_background_title_typeface}; font-size: ${new_style.header_background_title_size * 2}rpx; color: ${new_style.header_background_title_color};`, + text_style: `font-weight:${new_style.header_background_title_typeface}; font-size: ${new_style.header_background_title_size * 2}rpx; color: ${new_style.header_background_title_color};right:-${custom.width + 10}px;`, + position_class: new_content.indicator_location == 'center' ? `indicator-center` : '', header_style: menuButtonInfo, header_background_type: header_background_type, is_immersion_model: header_background_type !== 'color_image' && immersive_style == '1', @@ -206,6 +218,9 @@ is_click: false, }); }, + user_back_choice_location(e) { + console.log('选择位置', e); + }, url_event(e) { app.globalData.url_event(e); }, @@ -236,23 +251,36 @@ } } .model-head { + height: 66rpx; overflow: hidden; + .model-head-content { + height: 66rpx; + top: -6rpx; + } } .model-head-icon { position: absolute; right: 0; bottom: 0; - height: 64rpx; + height: 66rpx; .function-icon { - height: 64rpx; + height: 66rpx; } } .logo-outer-style { - height: 64rpx; + height: 66rpx; .logo-style { - height: 64rpx; - width: 64rpx; + height: 66rpx; + width: 66rpx; } } } + .indicator-center { + position: absolute; + left: 0; + right: 0; + text-align: center; + top: 0; + padding-left: 0; + } diff --git a/components/diy/hot-zone.vue b/components/diy/hot-zone.vue index 4dfeec6b..25bc4159 100644 --- a/components/diy/hot-zone.vue +++ b/components/diy/hot-zone.vue @@ -17,6 +17,10 @@ type: Object, default: () => ({}), }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -35,6 +39,12 @@ h_scale2: 1, }; }, + watch: { + propkey(val) { + // 初始化 + this.init(); + } + }, created() { this.init(); }, diff --git a/components/diy/img-magic.vue b/components/diy/img-magic.vue index 1ac4bb83..48397225 100644 --- a/components/diy/img-magic.vue +++ b/components/diy/img-magic.vue @@ -38,6 +38,10 @@ type: Object, default: () => ({}), }, + propkey: { + type: String, + default: '', + } }, data() { return { @@ -53,10 +57,14 @@ container_size: '', }; }, - created() { - this.$nextTick(() => { + watch: { + propkey(val) { + // 初始化 this.init(); - }); + } + }, + created() { + this.init(); }, methods: { init() { diff --git a/components/diy/modules/custom/model-icon.vue b/components/diy/modules/custom/model-icon.vue index eb16308a..9505418f 100644 --- a/components/diy/modules/custom/model-icon.vue +++ b/components/diy/modules/custom/model-icon.vue @@ -1,10 +1,10 @@