页面添加监听事件

master
于肖磊 2024-10-08 14:48:12 +08:00
parent 813a54060c
commit 871c19dec4
24 changed files with 271 additions and 49 deletions

View File

@ -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();
},

View File

@ -3,7 +3,7 @@
<view class="article-tabs ou" :style="style_container">
<componentDiyModulesTabsView :propValue="article_tabs" :propIsTop="top_up == '1'" :propTop="propTop" :propStyle="tabs_style + 'padding-bottom:24rpx;'" :propCustomNavHeight="propCustomNavHeight * 2 + 'rpx'" :propTabsBackground="tabs_background" @tabs-click="tabs_click_event"></componentDiyModulesTabsView>
<view class="oh">
<componentDiyArticleList v-if="hackReset" :propValue="article_tabs" :propIsCommonStyle="false"></componentDiyArticleList>
<componentDiyArticleList v-if="hackReset" :propkey="diy_key" :propValue="article_tabs" :propIsCommonStyle="false"></componentDiyArticleList>
</view>
</view>
</template>
@ -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();

View File

@ -14,6 +14,10 @@
return {};
},
},
propkey: {
type: String,
default: '',
}
},
data() {
return {
@ -21,6 +25,12 @@
style: '',
};
},
watch: {
propkey(val) {
//
this.init();
}
},
created() {
this.init();
},

View File

@ -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();
},

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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',

View File

@ -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();

View File

@ -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 () {

View File

@ -2,7 +2,7 @@
<view class="goods-tabs ou" :style="style_container">
<componentDiyModulesTabsView :propValue="goods_tabs" :propIsTop="top_up == '1'" :propTop="propTop" :propStyle="tabs_style + 'padding-bottom:24rpx;'" :propCustomNavHeight="propCustomNavHeight * 2 + 'rpx'" :propTabsBackground="tabs_background" @tabs-click="tabs_click_event"></componentDiyModulesTabsView>
<view class="oh">
<componentGoodsList v-if="hackReset" :propValue="goods_tabs" :propIsCommonStyle="false"></componentGoodsList>
<componentGoodsList v-if="hackReset" :propkey="diy_key" :propValue="goods_tabs" :propIsCommonStyle="false"></componentGoodsList>
</view>
</view>
</template>
@ -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();
}
},

View File

@ -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) {

View File

@ -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();
},

View File

@ -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() {

View File

@ -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), //

View File

@ -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();
},

View File

@ -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();
},

View File

@ -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(), //

View File

@ -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)) {

View File

@ -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() {

View File

@ -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() {

View File

@ -7,18 +7,23 @@
<image :src="form.img_src[0].url" class="title-img" mode="heightFix"></image>
</template>
<template v-else-if="!isEmpty(form.icon_class)">
<iconfont :name="'icon-' + form.icon_class" :size="new_style.icon_size * 2 + 'rpx'" :color="new_style.icon_color"></iconfont>
<iconfont :name="'icon-' + form.icon_class" :size="new_style.icon_size * 2 + 'rpx'"
:color="new_style.icon_color"></iconfont>
</template>
<view class="pr-15 nowrap" :style="title_style">{{ form.title || '标题' }}</view>
</view>
<view class="flex-row gap-10 align-c right-0 pa">
<template v-if="form.keyword_show == '1'">
<view v-for="item in keyword_list" :key="item.id" :style="keyword_style" :data-value="item.link.page" @tap="url_event">
<view v-for="item in keyword_list" :key="item.id" :style="keyword_style"
:data-value="item.link.page" @tap="url_event">
{{ item.title }}
</view>
</template>
<view v-if="form.right_show == '1'" class="nowrap flex-row align-c" :style="right_style" :data-value="form.right_link.page" @tap="url_event">{{ form.right_title }}
<iconfont name="icon-arrow-right" :color="new_style.right_color" :size="new_style.right_size * 2 + 'rpx'"></iconfont>
<view v-if="form.right_show == '1'" class="nowrap flex-row align-c" :style="right_style"
:data-value="form.right_link.page" @tap="url_event">{{ form.right_title }}
<iconfont name="icon-arrow-right" :color="new_style.right_color"
:size="new_style.right_size * 2 + 'rpx'">
</iconfont>
</view>
</view>
</view>
@ -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' : '',

View File

@ -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();
},

View File

@ -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();
},