页面添加监听事件
parent
813a54060c
commit
871c19dec4
|
|
@ -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();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
return {};
|
||||
},
|
||||
},
|
||||
propkey: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -21,6 +25,12 @@
|
|||
style: '',
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propkey(val) {
|
||||
// 初始化
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 () {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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), // 图片的设置
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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(), // 内部样式
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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' : '',
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue