1.支付宝小程序兼容性优化

master
sws 2024-10-22 14:06:56 +08:00
parent b931266ed5
commit 532b57a4db
3 changed files with 14 additions and 4 deletions

View File

@ -143,6 +143,9 @@
//
this.init();
},
propValue(new_value, old_value) {
this.init();
},
},
created() {
this.init();

View File

@ -236,6 +236,9 @@
propKey(val) {
this.init();
},
propValue(new_value, old_value) {
this.init();
},
},
created() {
this.init();
@ -245,7 +248,7 @@
init() {
const new_form = this.propValue.content || null;
const new_style = this.propValue.style || null;
if(new_form != null && new_style != null) {
if (new_form != null && new_style != null) {
let new_list = [];
//
if (!isEmpty(new_form.data_list) && new_form.data_type == '0') {
@ -289,7 +292,7 @@
price_style: this.trends_config(new_style, 'price'),
sold_number_style: this.trends_config(new_style, 'sold_number'),
score_style: this.trends_config(new_style, 'score'),
button_style: this.trends_config(new_style, 'button', 'buy_button')+button_gradient,
button_style: this.trends_config(new_style, 'button', 'buy_button') + button_gradient,
simple_desc: this.trends_config(new_style, 'simple_desc', 'desc'),
shop_content_list: this.get_shop_content_list(new_list, new_form),
});
@ -406,7 +409,7 @@
} else if (type == 'desc') {
style += `line-height: ${size}px;height: ${size}px;color: ${color};`;
} else {
if(type != 'buy_button') {
if (type != 'buy_button') {
style += `color: ${color};`;
}
}

View File

@ -3,7 +3,6 @@
<uv-sticky :disabled="!propIsTop" :offset-top="propTop" :zIndex="propZIndex" :customNavHeight="propCustomNavHeight">
<view class="tabs-view flex-row gap-10 jc-sb align-c" :style="propStyle + propTabsBackground">
<view class="tabs flex-1 flex-width">
{{ tabs_list }}
<scroll-view :scroll-x="true" :show-scrollbar="false" :scroll-with-animation="true" :scroll-into-view="'one-nav-item-' + active_index" class="wh-auto">
<view class="flex-row">
<view v-for="(item, index) in tabs_list" :key="index" :id="'one-nav-item-' + index" class="item nowrap flex-col jc-c align-c gap-4" :class="tabs_theme + (index == active_index ? ' active' : '') + ((tabs_theme_index == '0' && tabs_theme_1_style) || tabs_theme_index == '1' || tabs_theme_index == '2' ? ' pb-0' : '')" :style="'margin-left:' + (index == 0 ? '0' : tabs_spacing) + 'rpx;margin-right:' + (index - 1 == tabs_list ? '0' : tabs_spacing) + 'rpx;'" :data-index="index" @tap="handle_event">
@ -125,6 +124,11 @@
tabs_bottom_line_theme: '',
};
},
watch: {
propValue(new_value, old_value) {
this.init();
},
},
mounted() {
this.init();
},