Merge branch 'dev-yxl' of gitee.com:zongzhige/shopxo-uniapp into dev-sws

master
sws 2024-09-25 13:56:04 +08:00
commit 3248f6de48
2 changed files with 17 additions and 15 deletions

View File

@ -58,7 +58,7 @@
<block v-if="form.shop_type == 'text'">
<view class="plr-11 ptb-3 round" :style="button_style + ('color:' + new_style.shop_button_text_color)">{{ form.shop_button_text }}</view>
</block>
<view v-else class="round plr-6 ptb-5" :style="button_gradient()">
<view v-else class="round plr-6 ptb-5" :style="button_gradient">
<iconfont :name="'icon-' + (!isEmpty(form.shop_button_icon_class) ? form.shop_button_icon_class : 'cart')" :color="new_style.shop_icon_color" :size="new_style.shop_icon_size * 2 + 'rpx'"></iconfont>
</view>
<view v-if="form.shop_button_effect == '1'" class="cart-badge-icon pa badge-style">
@ -88,7 +88,7 @@
<block v-if="form.shop_type == 'text'">
<view class="plr-11 ptb-3 round" :style="button_style + ('color:' + new_style.shop_button_text_color)">{{ form.shop_button_text }}</view>
</block>
<view v-else class="round plr-6 ptb-5" :style="button_gradient()">
<view v-else class="round plr-6 ptb-5" :style="button_gradient">
<iconfont :name="'icon-' + (!isEmpty(form.shop_button_icon_class) ? form.shop_button_icon_class : 'cart')" :color="new_style.shop_icon_color" :size="new_style.shop_icon_size * 2 + 'rpx'"></iconfont>
</view>
<view v-if="form.shop_button_effect == '1'" class="cart-badge-icon pa badge-style">
@ -140,7 +140,7 @@
<block v-if="form.shop_type == 'text'">
<view class="plr-11 ptb-3 round" :style="button_style + ('color:' + new_style.shop_button_text_color)">{{ form.shop_button_text }}</view>
</block>
<view v-else class="round plr-6 ptb-5" :style="button_gradient()">
<view v-else class="round plr-6 ptb-5" :style="button_gradient">
<iconfont :name="'icon-' + (!isEmpty(form.shop_button_icon_class) ? form.shop_button_icon_class : 'cart')" :color="new_style.shop_icon_color" :size="new_style.shop_icon_size * 2 + 'rpx'"></iconfont>
</view>
<view v-if="form.shop_button_effect == '1'" class="cart-badge-icon pa badge-style">
@ -254,6 +254,12 @@
button_style: '',
};
},
computed: {
//
button_gradient() {
return gradient_handle(this.new_style.shop_button_color, '180deg');
}
},
created() {
this.setData({
form: this.value.content,
@ -417,16 +423,12 @@
style_config(typeface, size, color, type) {
let style = `font-weight:${typeface}; font-size: ${size * 2}rpx;`;
if (type == 'gradient') {
style += this.button_gradient();
style += this.button_gradient;
} else {
style += `color: ${color};`;
}
return style;
},
//
button_gradient() {
return gradient_handle(this.new_style.shop_button_color, '180deg');
},
// icon
icon_style(item) {
let style = `background: ${item.bg_color};color: ${item.color};`;

View File

@ -86,7 +86,7 @@
<template v-if="form.shop_type == 'text'">
<view class="plr-11 ptb-3 round cr-white" :style="button_style + 'color:' + new_style.shop_button_text_color">{{ form.shop_button_text }}</view>
</template>
<view v-else class="round plr-6 ptb-5" :styles="button_gradient()">
<view v-else class="round plr-6 ptb-5" :styles="button_gradient">
<iconfont :name="'icon-' + (!isEmpty(form.shop_button_icon_class) ? form.shop_button_icon_class : 'cart')" :color="new_style.shop_icon_color" :size="new_style.shop_icon_size * 2 + 'rpx'"></iconfont>
</view>
</view>
@ -149,7 +149,7 @@
<template v-if="form.shop_type == 'text'">
<view class="plr-11 ptb-3 round cr-white" :style="button_style + 'color:' + new_style.shop_button_text_color">{{ form.shop_button_text }}</view>
</template>
<view v-else class="round plr-6 ptb-5" :styles="button_gradient()">
<view v-else class="round plr-6 ptb-5" :styles="button_gradient">
<iconfont :name="'icon-' + (!isEmpty(form.shop_button_icon_class) ? form.shop_button_icon_class : 'cart')" :color="new_style.shop_icon_color" :size="new_style.shop_icon_size * 2 + 'rpx'"></iconfont>
</view>
</view>
@ -237,6 +237,10 @@
icon_time_check() {
return `${this.time_bg};line-height: 1;background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;`;
},
//
button_gradient() {
return gradient_handle(this.new_style.shop_button_color, '180deg');
}
},
created() {
this.setData({
@ -444,16 +448,12 @@
style_config(typeface, size, color, type) {
let style = `font-weight:${typeface}; font-size: ${size * 2}rpx;`;
if (type == 'gradient') {
style += this.button_gradient();
style += this.button_gradient;
} else {
style += `color: ${color};`;
}
return style;
},
//
button_gradient() {
return gradient_handle(this.new_style.shop_button_color, '180deg');
},
get_multicolumn_columns_width() {
let model_number = this.form.carousel_col;
if (this.form.shop_style_type == '1') {