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 f4a92ba1..5468ed8f 100644
--- a/components/diy/custom.vue
+++ b/components/diy/custom.vue
@@ -43,6 +43,10 @@
return {};
},
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -61,16 +65,22 @@
};
},
},
+ 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,
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/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-tabs.vue b/components/diy/goods-tabs.vue
index 1cd6a318..b11e9284 100644
--- a/components/diy/goods-tabs.vue
+++ b/components/diy/goods-tabs.vue
@@ -2,7 +2,7 @@
-
+
@@ -60,6 +60,7 @@
tabs_top: 0,
tabs_background: 'background:transparent',
custom_nav_height: 33,
+ diy_key: '',
};
},
watch: {
@@ -82,9 +83,11 @@
this.tabs_background = 'background:transparent';
}
},
- },
- watch: {
propkey(val) {
+ // 初始化
+ this.setData({
+ diy_key: val
+ })
this.init();
}
},
diff --git a/components/diy/header.vue b/components/diy/header.vue
index 26d0c735..703a55cc 100644
--- a/components/diy/header.vue
+++ b/components/diy/header.vue
@@ -81,6 +81,10 @@
type: Number,
default: 0,
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
components: {
componentDiySearch,
@@ -138,6 +142,11 @@
}
}
},
+ propkey(val) {
+ if ((this.propValue || null) !== null) {
+ this.init();
+ }
+ }
},
created() {
if ((this.propValue || null) !== null) {
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/nav-group.vue b/components/diy/nav-group.vue
index bcd395d3..24cc6982 100644
--- a/components/diy/nav-group.vue
+++ b/components/diy/nav-group.vue
@@ -43,6 +43,10 @@
return {};
},
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -58,17 +62,21 @@
nav_content_list: [],
};
},
- created() {
- this.setData({
- form: this.propValue.content,
- new_style: this.propValue.style,
- });
+ watch: {
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
},
mounted() {
this.init();
},
methods: {
init() {
+ this.setData({
+ form: this.propValue.content,
+ new_style: this.propValue.style,
+ });
this.setData({
style_container: common_styles_computer(this.new_style.common_style), // 用于样式显示
img_style: radius_computer(this.new_style), // 图片的设置
diff --git a/components/diy/notice.vue b/components/diy/notice.vue
index 9f85c5f6..c30dd9c6 100644
--- a/components/diy/notice.vue
+++ b/components/diy/notice.vue
@@ -63,6 +63,10 @@
type: Object,
default: () => ({}),
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -94,6 +98,12 @@
notice_list: [],
};
},
+ watch: {
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
+ },
created() {
this.init();
},
diff --git a/components/diy/rich-text.vue b/components/diy/rich-text.vue
index 0d992a83..7e27595b 100644
--- a/components/diy/rich-text.vue
+++ b/components/diy/rich-text.vue
@@ -13,6 +13,10 @@
type: Object,
default: () => ({}),
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -20,6 +24,12 @@
content: '',
};
},
+ watch: {
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
+ },
created() {
this.init();
},
diff --git a/components/diy/search.vue b/components/diy/search.vue
index 4f81009e..92920a16 100644
--- a/components/diy/search.vue
+++ b/components/diy/search.vue
@@ -80,6 +80,10 @@
propIsClick: {
type: Boolean,
default: false,
+ },
+ propkey: {
+ type: String,
+ default: '',
}
},
data() {
@@ -103,18 +107,22 @@
});
},
immediate: true
+ },
+ 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 { search_button_radius, common_style } = this.new_style;
this.setData({
style: this.get_style(), // 内部样式
diff --git a/components/diy/seckill.vue b/components/diy/seckill.vue
index ec0113a5..26b719ed 100644
--- a/components/diy/seckill.vue
+++ b/components/diy/seckill.vue
@@ -178,6 +178,10 @@
return {};
},
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -230,11 +234,13 @@
return gradient_handle(this.new_style.shop_button_color, '180deg');
},
},
+ watch: {
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
+ },
created() {
- this.setData({
- form: this.propValue.content,
- new_style: this.propValue.style,
- });
this.init();
},
beforeDestroy() {
@@ -246,6 +252,10 @@
methods: {
isEmpty,
init() {
+ this.setData({
+ form: this.propValue.content,
+ new_style: this.propValue.style,
+ });
const data = this.form.data;
let new_list = [];
if (data && !isEmpty(data.current)) {
diff --git a/components/diy/tabs-carousel.vue b/components/diy/tabs-carousel.vue
index 10c2c74f..922cfa23 100644
--- a/components/diy/tabs-carousel.vue
+++ b/components/diy/tabs-carousel.vue
@@ -35,6 +35,10 @@
type: Boolean,
default: false,
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -64,6 +68,10 @@
propTabsIsTop(value, old_value) {
this.init();
},
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
},
methods: {
init() {
diff --git a/components/diy/tabs.vue b/components/diy/tabs.vue
index b44545a0..12f097c8 100644
--- a/components/diy/tabs.vue
+++ b/components/diy/tabs.vue
@@ -45,6 +45,10 @@
type: String,
default: '',
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
components: {
componentDiyModulesTabsView,
@@ -82,6 +86,10 @@
this.get_tabs_height();
});
},
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
},
methods: {
init() {
diff --git a/components/diy/title.vue b/components/diy/title.vue
index f8c35886..2bcd873a 100644
--- a/components/diy/title.vue
+++ b/components/diy/title.vue
@@ -7,18 +7,23 @@
-
+
{{ form.title || '标题' }}
-
+
{{ item.title }}
- {{ form.right_title }}
-
+ {{ form.right_title }}
+
+
@@ -38,6 +43,10 @@ export default {
return {};
},
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -52,18 +61,22 @@ export default {
right_size: '',
};
},
+ watch: {
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
+ },
created() {
- this.setData({
- form: this.propValue.content,
- new_style: this.propValue.style,
- });
- console.log(this.propValue);
-
this.init();
},
methods: {
isEmpty,
init() {
+ this.setData({
+ form: this.propValue.content,
+ new_style: this.propValue.style,
+ });
// 是否居中
this.setData({
title_center: this.form.is_title_center == '1' ? 'jc-c' : '',
diff --git a/components/diy/user-info.vue b/components/diy/user-info.vue
index f1db7c9a..3facdb15 100644
--- a/components/diy/user-info.vue
+++ b/components/diy/user-info.vue
@@ -38,6 +38,10 @@
type: Object,
default: () => ({}),
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -77,6 +81,12 @@
},
};
},
+ watch: {
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
+ },
created() {
this.init();
},
diff --git a/components/diy/video.vue b/components/diy/video.vue
index 1f24cd94..1cc6a6b6 100644
--- a/components/diy/video.vue
+++ b/components/diy/video.vue
@@ -15,6 +15,10 @@
type: Object,
default: () => ({}),
},
+ propkey: {
+ type: String,
+ default: '',
+ }
},
data() {
return {
@@ -24,6 +28,12 @@
video: '',
};
},
+ watch: {
+ propkey(val) {
+ // 初始化
+ this.init();
+ }
+ },
created() {
this.init();
},