@tplc/business 0.2.33 → 0.2.34

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.2.34](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.33...v0.2.34) (2024-12-25)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * version update ([7c02961](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7c02961426faa5f1c6628e8222777bc406bdca78))
11
+
5
12
  ### [0.2.33](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.32...v0.2.33) (2024-12-25)
6
13
 
7
14
 
@@ -17,11 +17,11 @@ const itemProps: any = inject('lcb-product-item-props')
17
17
  const props = withDefaults(
18
18
  defineProps<{
19
19
  prop: string
20
- className?: string
20
+ customClass?: string
21
21
  }>(),
22
22
  {},
23
23
  )
24
-
24
+ console.log('itemProps', itemProps, props)
25
25
  defineSlots<{
26
26
  coverImg(props: { value: any }): any
27
27
  productName(props: { value: any }): any
@@ -49,7 +49,7 @@ const visible = computed(() => {
49
49
  return itemProps?.[`${props?.prop}Visible`] ?? true
50
50
  })
51
51
  const className = computed(() => {
52
- return `${itemProps?.[`${props?.prop}Class`] ?? ''} ${props?.className}`
52
+ return `${itemProps?.[`${props?.prop}Class`] ?? ''} ${props?.customClass}`
53
53
  })
54
54
  const style = computed(() => {
55
55
  return itemProps?.[`${props?.prop}Style`] ?? ''
@@ -77,8 +77,16 @@ const value = computed(() => {
77
77
  >
78
78
  <!-- 图片 -->
79
79
  <slot :value="value" v-if="prop === 'coverImg'" name="coverImg">
80
- <view :class="className" :style="style">
80
+ <view :class="`relative ${className}`" :style="style">
81
81
  <image :src="value" class="w-full h-full" mode="aspectFill" />
82
+ <!-- imgBottomIcon -->
83
+ <view class="absolute bottom-0 left-0 w-full z-1" v-if="itemProps.imgBottomIcon">
84
+ <image :src="itemProps.imgBottomIcon" class="w-full h-auto block" mode="widthFix" />
85
+ </view>
86
+ <!-- imgCornerIcon -->
87
+ <view class="absolute top-0 left-0 h-8 z-1" v-if="itemProps.imgCornerIcon">
88
+ <image :src="itemProps.imgCornerIcon" class="w-auto h-full block" mode="heightFix" />
89
+ </view>
82
90
  <slot></slot>
83
91
  </view>
84
92
  </slot>
@@ -255,18 +263,6 @@ const value = computed(() => {
255
263
  </view>
256
264
  </slot>
257
265
 
258
- <slot :value="value" v-if="prop === 'imgCornerIcon'" name="imgCornerIcon">
259
- <view :class="className" :style="style" class="">
260
- <view>{{ value }}</view>
261
- </view>
262
- </slot>
263
-
264
- <slot :value="value" v-if="prop === 'imgBottomIcon'" name="imgBottomIcon">
265
- <view :class="className" :style="style" class="">
266
- <view>{{ value }}</view>
267
- </view>
268
- </slot>
269
-
270
266
  <slot :value="value" v-if="prop === 'orderTips'" name="orderTips">
271
267
  <view :class="className" :style="style" class="text-22rpx text-gray-500">
272
268
  <view>{{ value }}</view>
@@ -99,7 +99,7 @@ defineSlots<{
99
99
  <ItemValue
100
100
  v-if="!!$slots?.['coverImg']"
101
101
  prop="coverImg"
102
- className="w-1/3 h-[360rpx] bg-gray-100 rounded-sm overflow-hidden relative"
102
+ customClass="w-1/3 h-[360rpx] bg-gray-100 rounded-sm overflow-hidden relative"
103
103
  >
104
104
  <template #default>
105
105
  <slot name="coverImgSection" />
@@ -111,7 +111,7 @@ defineSlots<{
111
111
  <ItemValue
112
112
  v-else
113
113
  prop="coverImg"
114
- className="w-1/3 h-[360rpx] bg-gray-100 rounded-sm overflow-hidden relative"
114
+ customClass="w-1/3 h-[360rpx] bg-gray-100 rounded-sm overflow-hidden relative"
115
115
  >
116
116
  <template #default>
117
117
  <slot name="coverImgSection" />
@@ -159,7 +159,7 @@ defineSlots<{
159
159
  </ItemValue>
160
160
  </view>
161
161
 
162
- <view className="flex gap-1 items-center">
162
+ <view class="flex gap-1 items-center">
163
163
  <ItemValue prop="scoreAvg">
164
164
  <!-- <template #scoreAvg="{ value }"><slot name="scoreAvg" :value="value" /></template> -->
165
165
  </ItemValue>
@@ -255,7 +255,11 @@ defineSlots<{
255
255
  <slot name="itemLeftSection" />
256
256
  <view class="flex-1 flex flex-col w-full overflow-hidden">
257
257
  <slot name="itemTopSection" />
258
- <ItemValue v-if="!!$slots?.['coverImg']" prop="coverImg" className="overflow-hidden relative">
258
+ <ItemValue
259
+ v-if="!!$slots?.['coverImg']"
260
+ prop="coverImg"
261
+ customClass="overflow-hidden relative"
262
+ >
259
263
  <template #default>
260
264
  <slot name="coverImgSection" />
261
265
  </template>
@@ -263,7 +267,7 @@ defineSlots<{
263
267
  <slot name="coverImg" :value="value" />
264
268
  </template>
265
269
  </ItemValue>
266
- <ItemValue v-else prop="coverImg" className="overflow-hidden relative">
270
+ <ItemValue v-else prop="coverImg" customClass="overflow-hidden relative">
267
271
  <template #default>
268
272
  <slot name="coverImgSection" />
269
273
  </template>
@@ -310,7 +314,7 @@ defineSlots<{
310
314
  </ItemValue>
311
315
  </view>
312
316
 
313
- <view className="flex gap-1 items-center">
317
+ <view class="flex gap-1 items-center">
314
318
  <ItemValue prop="scoreAvg">
315
319
  <!-- <template #="{ value }"><slot name="scoreAvg" :value="value" /></template> -->
316
320
  </ItemValue>
@@ -16,7 +16,7 @@ export interface LcbProductItemProps {
16
16
  distanceUnit?: string
17
17
 
18
18
  coverImg?: any
19
- title?: any
19
+ productName?: any
20
20
  subTitle?: any
21
21
  price?: any
22
22
  priceUnit?: any
@@ -28,7 +28,7 @@ export interface LcbProductItemProps {
28
28
  tags?: any
29
29
  addressIntro?: any
30
30
  distance?: any
31
- score?: any
31
+ scoreAvg?: any
32
32
  scoreTips?: any
33
33
  level?: any
34
34
  imgCornerIcon?: any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -45,7 +45,7 @@ declare const __VLS_component: import('vue').DefineComponent<
45
45
  __VLS_WithDefaults<
46
46
  __VLS_TypePropsToOption<{
47
47
  prop: string
48
- className?: string
48
+ customClass?: string
49
49
  }>,
50
50
  {}
51
51
  >,
@@ -63,7 +63,7 @@ declare const __VLS_component: import('vue').DefineComponent<
63
63
  __VLS_WithDefaults<
64
64
  __VLS_TypePropsToOption<{
65
65
  prop: string
66
- className?: string
66
+ customClass?: string
67
67
  }>,
68
68
  {}
69
69
  >
@@ -13,7 +13,7 @@ export interface LcbProductItemProps {
13
13
  tagRound?: boolean
14
14
  distanceUnit?: string
15
15
  coverImg?: any
16
- title?: any
16
+ productName?: any
17
17
  subTitle?: any
18
18
  price?: any
19
19
  priceUnit?: any
@@ -25,7 +25,7 @@ export interface LcbProductItemProps {
25
25
  tags?: any
26
26
  addressIntro?: any
27
27
  distance?: any
28
- score?: any
28
+ scoreAvg?: any
29
29
  scoreTips?: any
30
30
  level?: any
31
31
  imgCornerIcon?: any