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.
@@ -15,7 +15,6 @@ onMounted(async () => {
15
15
  let date = time.value.date.split('-');
16
16
  day.value = date[date.length - 1];
17
17
  year.value = `${date[0]}年${date[1]}月`;
18
- console.log('time', time.value);
19
18
  });
20
19
  </script>
21
20
 
@@ -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` | - | - |
@@ -25,6 +25,11 @@ export default {
25
25
  type: String as PropType<'left' | 'right' | 'none'>,
26
26
  default: () => 'none',
27
27
  },
28
+ /** 是否禁用选择框 */
29
+ checkboxDisabled: {
30
+ type: Boolean,
31
+ default: () => false,
32
+ },
28
33
  /** 是否选中 */
29
34
  checked: {
30
35
  type: Boolean,
@@ -27,6 +27,12 @@
27
27
  { "name": "right", "description": "选择框在右侧" }
28
28
  ]
29
29
  },
30
+ {
31
+ "name": "checkboxDisabled",
32
+ "description": "是否禁用选择框",
33
+ "type": "boolean",
34
+ "default": false
35
+ },
30
36
  {
31
37
  "name": "checked",
32
38
  "description": "是否选中",
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stellar-ui-plus",
3
- "version": "1.20.0",
3
+ "version": "1.20.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",