stellar-ui-plus 1.20.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ste-date-user/ste-date-user.vue +0 -1
- package/components/ste-goods-info/ATTRIBUTES.md +1 -0
- package/components/ste-goods-info/props.ts +5 -0
- package/components/ste-goods-info/ste-goods-info.easycom.json +6 -0
- package/components/ste-goods-info/ste-goods-info.vue +3 -2
- package/components/ste-price/ste-price.vue +2 -2
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
| `data` | 商品数据 | `{ image: string; title: string; tag?: string; barCode: string; code: string; price: string / number; originalPrice?: string / number }` | `{}` | - | - |
|
|
5
5
|
| `tagBg` | 标签背景色 | `string` | `主题色` | - | - |
|
|
6
6
|
| `checkbox` | 选择框位置 | `string` | `none` | `none`:不显示选择框<br/>`left`:选择框在左侧<br/>`right`:选择框在右侧 | - |
|
|
7
|
+
| `checkboxDisabled` | 是否禁用选择框 | `boolean` | `false` | - | - |
|
|
7
8
|
| `checked` | 是否选中 | `boolean` | `false` | - | - |
|
|
8
9
|
| `watermark` | 水印URL | `string` | `` | - | - |
|
|
9
10
|
| `number` | 数量 | `number` | `1` | - | - |
|
|
@@ -70,7 +70,7 @@ const _tagBg = computed(() => (props.tagBg ? props.tagBg : getColor().steThemeCo
|
|
|
70
70
|
</script>
|
|
71
71
|
<template>
|
|
72
72
|
<view class="ste-goods-info-root" :class="rootClass">
|
|
73
|
-
<view class="ste-goods-info-checkbox left" v-if="checkbox === 'left'"><setCheckbox iconSize="30" v-model="_checked" @change="checkboxChange" /></view>
|
|
73
|
+
<view class="ste-goods-info-checkbox left" v-if="checkbox === 'left'"><setCheckbox :disabled="checkboxDisabled" iconSize="30" v-model="_checked" @change="checkboxChange" /></view>
|
|
74
74
|
<view class="ste-goods-info-image">
|
|
75
75
|
<setImage :src="data.image" width="160" height="160" @click="onClick('image')" />
|
|
76
76
|
</view>
|
|
@@ -101,6 +101,7 @@ const _tagBg = computed(() => (props.tagBg ? props.tagBg : getColor().steThemeCo
|
|
|
101
101
|
marginLeft="16"
|
|
102
102
|
fontSize="20"
|
|
103
103
|
@click="onClick('originalPrice')"
|
|
104
|
+
:showUnit="false"
|
|
104
105
|
/>
|
|
105
106
|
</view>
|
|
106
107
|
<view class="ste-goods-info-price-right" v-if="stepper">
|
|
@@ -108,7 +109,7 @@ const _tagBg = computed(() => (props.tagBg ? props.tagBg : getColor().steThemeCo
|
|
|
108
109
|
</view>
|
|
109
110
|
</view>
|
|
110
111
|
</view>
|
|
111
|
-
<view class="ste-goods-info-checkbox right" v-if="checkbox === 'right'"><setCheckbox iconSize="30" v-model="_checked" @change="checkboxChange" /></view>
|
|
112
|
+
<view class="ste-goods-info-checkbox right" v-if="checkbox === 'right'"><setCheckbox :disabled="checkboxDisabled" iconSize="30" v-model="_checked" @change="checkboxChange" /></view>
|
|
112
113
|
</view>
|
|
113
114
|
</template>
|
|
114
115
|
|
|
@@ -66,7 +66,7 @@ const cmpUnitStyle = computed(() => {
|
|
|
66
66
|
style.color = props.linePriceColor;
|
|
67
67
|
style.fontSize = `var(--font-size-${props.fontSize},${utils.formatPx(props.fontSize)})`;
|
|
68
68
|
} else {
|
|
69
|
-
style.fontSize = `var(--font-size-${calcFontSize()},${calcFontSize()})`;
|
|
69
|
+
style.fontSize = `var(--font-size-${Math.floor(utils.px2rpx(Number(calcFontSize().replace('px', ''))))},${calcFontSize()})`;
|
|
70
70
|
}
|
|
71
71
|
return style;
|
|
72
72
|
});
|
|
@@ -94,7 +94,7 @@ const cmpFenPriceStyle = computed(() => {
|
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
function calcFontSize() {
|
|
97
|
-
let size = utils.formatPx(props.fontSize);
|
|
97
|
+
let size: any = utils.formatPx(props.fontSize);
|
|
98
98
|
const fontSize = Number(props.fontSize);
|
|
99
99
|
if (props.styleType == 1) {
|
|
100
100
|
if (fontSize <= 40) {
|