Merge branch 'dev-sws' into dev-yxl
commit
fc92dda4d2
|
|
@ -73,10 +73,12 @@
|
|||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
// 是否使用公共样式
|
||||
propIsCommonStyle: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
// 关键key
|
||||
propKey: {
|
||||
type: [String,Number],
|
||||
default: '',
|
||||
|
|
@ -141,6 +143,7 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
|
|||
|
|
@ -25,14 +25,17 @@
|
|||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
// 距离顶部高度
|
||||
propTop: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
// 自定义导航栏高度
|
||||
propCustomNavHeight: {
|
||||
type: Number,
|
||||
default: 33,
|
||||
},
|
||||
// 滚动距离
|
||||
propScrollTop: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
|
|
@ -76,6 +79,7 @@
|
|||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听滚动距离
|
||||
propScrollTop(newVal) {
|
||||
if (newVal + this.propTop + this.custom_nav_height > this.tabs_top + this.nav_safe_space && this.top_up == '1') {
|
||||
let new_style = this.propValue.style || {};
|
||||
|
|
@ -91,12 +95,10 @@
|
|||
this.setData({
|
||||
tabs_background: (new_tabs_background.length > 0 ? new_tabs_background : 'background:#fff;') + new_tabs_background_img,
|
||||
});
|
||||
console.log(1);
|
||||
} else {
|
||||
this.setData({
|
||||
tabs_background: 'background:transparent',
|
||||
});
|
||||
console.log(2);
|
||||
}
|
||||
},
|
||||
propKey(val) {
|
||||
|
|
@ -125,6 +127,7 @@
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
let new_content = this.propValue.content || {};
|
||||
let new_style = this.propValue.style || {};
|
||||
|
|
@ -162,6 +165,7 @@
|
|||
tabs_style: new_tabs_style,
|
||||
});
|
||||
},
|
||||
// tabs切换事件
|
||||
tabs_click_event(index) {
|
||||
let new_data = JSON.parse(JSON.stringify(this.propValue));
|
||||
new_data.content.theme = new_data.content.article_theme;
|
||||
|
|
@ -180,7 +184,8 @@
|
|||
article_tabs: new_data,
|
||||
diy_key: Math.random(),
|
||||
});
|
||||
}, // 获取商品距离顶部的距离
|
||||
},
|
||||
// 获取商品距离顶部的距离
|
||||
getTop() {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
// key
|
||||
propKey: {
|
||||
type: [String,Number],
|
||||
default: '',
|
||||
|
|
@ -37,6 +38,7 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
// 底部选中索引
|
||||
propFooterActiveIndex: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@
|
|||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
// 滚动距离
|
||||
propScrollTop: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
|
|
@ -162,6 +163,7 @@
|
|||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听滚动距离
|
||||
propScrollTop(newVal) {
|
||||
const { up_slide_background_color_list, up_slide_background_direction, up_slide_background_img, up_slide_background_img_style } = this.propValue.style || {};
|
||||
// 渐变
|
||||
|
|
@ -181,12 +183,15 @@
|
|||
},
|
||||
},
|
||||
created() {
|
||||
// 判断是否有值初始化
|
||||
if ((this.propValue || null) !== null) {
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 判断是否为空
|
||||
isEmpty,
|
||||
// 初始化
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
// 是否需要icon
|
||||
propIsTabsIcon: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
|
@ -77,14 +78,17 @@
|
|||
type: String,
|
||||
default: '',
|
||||
},
|
||||
// 层级
|
||||
propZIndex: {
|
||||
type: Number,
|
||||
default: 2,
|
||||
},
|
||||
// 自定义导航栏高度
|
||||
propCustomNavHeight: {
|
||||
type: String,
|
||||
default: '66rpx',
|
||||
},
|
||||
// tabs背景色
|
||||
propTabsBackground: {
|
||||
type: String,
|
||||
default: 'transparent',
|
||||
|
|
@ -138,7 +142,9 @@
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
// 判断是否为空
|
||||
isEmpty,
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
@ -167,6 +173,7 @@
|
|||
tabs_bottom_line_theme: new_style.tabs_one_theme == '1' ? 'tabs-bottom-line-theme' : '',
|
||||
});
|
||||
},
|
||||
// 获取选项卡主题
|
||||
get_tabs_theme(data) {
|
||||
switch (data.tabs_theme) {
|
||||
case '1':
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 样式
|
||||
propStyle: {
|
||||
type: String,
|
||||
default: '',
|
||||
|
|
@ -94,6 +95,7 @@
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
@ -158,6 +160,7 @@
|
|||
const is_micro_page = item.data_type == '0';
|
||||
this.$emit('onTabsTap', tabs_id, is_micro_page);
|
||||
},
|
||||
// 获取 tabs_id
|
||||
get_tabs_id(item, index) {
|
||||
if (item.data_type === '0') {
|
||||
return index !== 0 ? item.micro_page_list?.id : '';
|
||||
|
|
|
|||
|
|
@ -72,7 +72,9 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 判断是否为空
|
||||
isEmpty,
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.setData({
|
||||
form: this.propValue.content,
|
||||
|
|
@ -87,11 +89,13 @@
|
|||
// 样式设置
|
||||
this.set_common_styles();
|
||||
},
|
||||
// 设置关键字
|
||||
set_keyword_list() {
|
||||
this.setData({
|
||||
keyword_list: this.form.keyword_list.filter((item) => item.is_show == '1'),
|
||||
});
|
||||
},
|
||||
// 获取公共样式
|
||||
set_common_styles() {
|
||||
const { keyword_color, keyword_size, right_color, right_size, common_style, title_weight, title_color, title_size } = this.new_style;
|
||||
// 标题样式设置
|
||||
|
|
@ -112,6 +116,7 @@
|
|||
style_img_container: common_img_computer(common_style),
|
||||
});
|
||||
},
|
||||
// 副标题样式设置
|
||||
get_subtitle_style() {
|
||||
let common_styles = '';
|
||||
if (this.new_style.subtitle_weight == 'italic') {
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
const new_content = this.propValue.content || {};
|
||||
const new_style = this.propValue.style || {};
|
||||
|
|
@ -53,6 +54,7 @@
|
|||
style_img_container: common_img_computer(new_style.common_style),
|
||||
});
|
||||
},
|
||||
// 获取视频高度
|
||||
get_video_height(data) {
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue