cb-biz-ui 1.3.9 → 1.4.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.
@@ -8,39 +8,44 @@
8
8
  width: width + 'rpx'
9
9
  }"
10
10
  >
11
- <view class="nut-badge"
12
- ><ui-icon :name="icon" :size="22" color="#333"></ui-icon>
13
- <view class="nut-badge__content"
14
- ><ui-badge
11
+ <view class="nut-badge">
12
+ <ui-icon :name="icon" :size="22" color="#333"></ui-icon>
13
+ <view class="nut-badge__content">
14
+ <ui-badge
15
15
  v-if="badge"
16
- type="red"
16
+ :type="badgeType"
17
17
  absolute
18
18
  :scaleRatio="0.8"
19
19
  right="10rpx"
20
- top="-4rpx"
21
- >{{ badge }}</ui-badge
22
- ></view
23
- >
20
+ top="-4rpx">
21
+ {{ badge }}
22
+ </ui-badge>
23
+ </view>
24
24
  </view>
25
25
  <view class="cart-bar-text ui-scale-small">{{ text }}</view>
26
26
  </view>
27
27
  </template>
28
28
  <script setup lang="ts">
29
+ type badgeType = "primary" | "warning" | "green" | "danger" | "white" | "black" | "gray" | "white_red" | 'red'
30
+
29
31
  interface IProps {
30
32
  text: string;
31
33
  icon: string;
32
34
  badge?: number;
33
35
  width: number;
36
+ badgeType: badgeType;
34
37
  }
38
+
35
39
  const props = withDefaults(defineProps<IProps>(), {
36
- width: 130
40
+ width: 130,
41
+ badgeType: "primary"
37
42
  });
38
43
  const emit = defineEmits<{
39
- (e: 'handleClick', data: IProps): void;
44
+ (e: "handleClick", data: IProps): void;
40
45
  }>();
41
46
 
42
47
  const handleClick = () => {
43
- emit('handleClick', props);
48
+ emit("handleClick", props);
44
49
  };
45
50
  </script>
46
51
  <style scoped lang="scss">
@@ -20,7 +20,7 @@
20
20
  <sort-icon
21
21
  :scale="0.8"
22
22
  :type="inventoryType"
23
- borderActivedColor="#FF524F"
23
+ :borderActivedColor="addBtnBgColor"
24
24
  borderColor="#6D7278"
25
25
  />
26
26
  </view>
@@ -29,7 +29,7 @@
29
29
  <sort-icon
30
30
  :scale="0.8"
31
31
  :type="priceType"
32
- borderActivedColor="#FF524F"
32
+ :borderActivedColor="addBtnBgColor"
33
33
  borderColor="#6D7278"
34
34
  />
35
35
  </view>
@@ -45,6 +45,7 @@
45
45
  >
46
46
  <goods-card
47
47
  :goods-count="countData[item.defaultShopSkuId]?.count"
48
+ :addBtnBgColor="addBtnBgColor"
48
49
  @handleClick="goDetails"
49
50
  @countChange="countChange"
50
51
  :entity="item"
@@ -86,6 +87,7 @@ interface IProps {
86
87
  cartItemList?: cartItemListType[];
87
88
  inventoryType?: 'desc' | 'asc' | '';
88
89
  priceType?: 'desc' | 'asc' | '';
90
+ addBtnBgColor: string;
89
91
  }
90
92
 
91
93
  const props = withDefaults(defineProps<IProps>(), {
@@ -94,7 +96,8 @@ const props = withDefaults(defineProps<IProps>(), {
94
96
  goodsList: [],
95
97
  nullData: { url: '', text: '' },
96
98
  cartItemList: [],
97
- loading: false
99
+ loading: false,
100
+ addBtnBgColor: 'rgba(255, 82, 79, 1)'
98
101
  });
99
102
 
100
103
  const countData = computed<{ [key: number]: any }>(() => {
@@ -97,7 +97,7 @@
97
97
  v-if="!goodsCount"
98
98
  class="goods-card_info_add_icon"
99
99
  >
100
- <ui-icon name="add" :size="19" color="red"></ui-icon>
100
+ <ui-icon name="add" :size="19" :color="addBtnBgColor"></ui-icon>
101
101
  </view>
102
102
  <view v-else class="number-box" @tap.stop="() => {}">
103
103
  <!-- <uni-number-box
@@ -135,6 +135,7 @@
135
135
  v-if="bezier"
136
136
  right="0"
137
137
  bottom="0"
138
+ :backgroundColor="addBtnBgColor"
138
139
  :windowWidth="state.windowWidth"
139
140
  :windowHeight="state.windowHeight"
140
141
  :position="{ right: 110, bottom: 15 }"
@@ -181,6 +182,7 @@ interface IProps {
181
182
  price: string;
182
183
  numberBoxBg?: string;
183
184
  };
185
+ addBtnBgColor: string;
184
186
  }
185
187
 
186
188
  const props = withDefaults(defineProps<IProps>(), {
@@ -206,7 +208,8 @@ const props = withDefaults(defineProps<IProps>(), {
206
208
  preferentialPrice: 0,
207
209
  status: 0,
208
210
  unit: "份"
209
- }
211
+ },
212
+ addBtnBgColor: 'rgba(255, 82, 79, 1)'
210
213
  });
211
214
 
212
215
  const emit = defineEmits<{
@@ -30,7 +30,7 @@
30
30
  <ui-checkbox
31
31
  :trigger-group="false"
32
32
  borderColor="#6D7278"
33
- color="#FF524F"
33
+ :color="primaryColor"
34
34
  :scaleRatio="0.8"
35
35
  :value="item.id"
36
36
  :checked="item.selected"
@@ -48,6 +48,7 @@
48
48
  image-placeholder="https://shop-cdn.cbyzx.com/shop23n05y18abcd/img/50fbba9d9b4e4184b9ab7e2fbb43c645.png"
49
49
  :textFontSize="props.goodTextStyles"
50
50
  :goodsCount="item.count"
51
+ :add-btn-bg-color="primaryColor"
51
52
  :bezier="false"
52
53
  @countChange="(val) => countChange(val, item)"
53
54
  @handleClick="(goodsInfo) => goDetails(goodsInfo, item)"
@@ -71,6 +72,7 @@
71
72
  :is-all="isAll"
72
73
  :loading="payLoading"
73
74
  :priceData="props.priceData"
75
+ :primaryColor="primaryColor"
74
76
  @buyPlay="buyPlay"
75
77
  @checkAll="checkAll"
76
78
  />
@@ -110,6 +112,7 @@ interface IProps {
110
112
  price: string;
111
113
  numberBoxBg: string;
112
114
  };
115
+ primaryColor: string;
113
116
  payLoading?: boolean;
114
117
  }
115
118
 
@@ -131,7 +134,8 @@ const props = withDefaults(defineProps<IProps>(), {
131
134
  preferentialPrice: '31rpx',
132
135
  price: '23rpx',
133
136
  numberBoxBg: '#fff'
134
- }
137
+ },
138
+ primaryColor: '#6D7278'
135
139
  });
136
140
 
137
141
  const actions = [
@@ -3,7 +3,7 @@
3
3
  <view class="ui-checkAll">
4
4
  <ui-label class="ui-checkbox" width="100%" height="100%" isFull>
5
5
  <ui-checkbox
6
- borderColor="#6D7278"
6
+ :borderColor="primaryColor"
7
7
  color="#FF524F"
8
8
  :scaleRatio="0.8"
9
9
  @change="checkAll"
@@ -27,7 +27,7 @@
27
27
  height="85rpx"
28
28
  size="32"
29
29
  padding="27rpx 70rpx"
30
- background="#FF524F"
30
+ :background="primaryColor"
31
31
  :loading="loading"
32
32
  @click="btnPay"
33
33
  >去结算</ui-form-button
@@ -42,6 +42,7 @@ interface IProps {
42
42
  isAll: boolean;
43
43
  priceData: priceDataType;
44
44
  loading: boolean;
45
+ primaryColor: string;
45
46
  }
46
47
  const emit = defineEmits<{
47
48
  (e: 'buyPlay'): void;
@@ -57,7 +58,8 @@ const props = withDefaults(defineProps<IProps>(), {
57
58
  marketPriceTotalShow: '0.00',
58
59
  platformPriceTotal: 0,
59
60
  platformPriceTotalShow: '0.00'
60
- }
61
+ },
62
+ primaryColor: '#6D7278'
61
63
  });
62
64
  const btnPay = () => {
63
65
  emit('buyPlay');
@@ -20,7 +20,7 @@
20
20
  .active::before {
21
21
  content: '';
22
22
  position: absolute;
23
- border-left: 3rpx solid #ff524f;
23
+ border-left: 3rpx solid $uni-color-primary;
24
24
  height: 110rpx;
25
25
  left: 0;
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cb-biz-ui",
3
- "version": "1.3.9",
3
+ "version": "1.4.1",
4
4
  "description": "cb-biz-ui",
5
5
  "main": "index.js",
6
6
  "keywords": [