@tplc/business 0.2.36 → 0.2.38

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,48 @@
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.38](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.47...v0.2.38) (2024-12-26)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 图片支持渐进式 ([08523e0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/08523e0eb244da1da3b46dca4d999360600edcf5))
11
+
12
+ ### [0.2.37](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.31...v0.2.37) (2024-12-26)
13
+
14
+
15
+ ### 🐛 Bug Fixes | Bug 修复
16
+
17
+ * 修复autoheight 高度不对 ([4fae567](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4fae5676f56e7027effb29c625842757af32dcc3))
18
+ * 修改布局高度 ([cf41a37](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/cf41a37f9d87e8e72309e0a8bde18c37d047fb45))
19
+ * 修改样式错误 ([a4d5aab](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a4d5aab85ac0e92fba75a964846eb62045b18239))
20
+ * 暂时修复item不显示 ([398caf8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/398caf81ff428f3c730083cb3ce133e0887b0a09))
21
+
22
+
23
+ ### 🚀 Chore | 构建/工程依赖/工具
24
+
25
+ * **release:** 0.1.43 ([55bcaa2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/55bcaa2b152c2098578f135ac3e4ec78ea797398))
26
+ * **release:** 0.1.44 ([4ef1b40](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4ef1b40f4d85368bac2ce9b68a5e395570b1c2e6))
27
+ * **release:** 0.1.45 ([0d9142a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0d9142a59759483bf60de74a23e86ae19a257eb9))
28
+ * **release:** 0.1.46 ([1980bab](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1980bab5ac24c12f98fd21dc48a6b420f45d1624))
29
+ * **release:** 0.2.32 ([f9f6116](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f9f6116f2b541e45bb0e6e12a5c3aa14752ed61a))
30
+ * **release:** 0.2.33 ([4060e50](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4060e5066eaf6b4972eb2e2c9abc2964c37cfd05))
31
+ * **release:** 0.2.34 ([9c2df6c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9c2df6cf8c114611785278db03afcbecc8f9831e))
32
+ * **release:** 0.2.35 ([5cb3f60](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5cb3f6032bc53550f0ee91879cab12abcb182e27))
33
+ * **release:** 0.2.36 ([caa1e07](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/caa1e07fa35d2a9c9fe979f4fc4d3dbe379ad29b))
34
+
35
+
36
+ ### ✨ Features | 新功能
37
+
38
+ * calendar 尺寸 ([5670ca5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5670ca5fa482d9d0e57d32f15b9f7ab369210c3d))
39
+ * height 兼容h5 ([dac82fa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dac82fa388f71112663e4b3d124eb7ed968ab03d))
40
+ * home-search 新增配置 ([9a2f148](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9a2f1482f0f813f4d310c57b1cc865d9c8cb9793))
41
+ * version update ([7c02961](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7c02961426faa5f1c6628e8222777bc406bdca78))
42
+ * 增加 lcb-product-item 图片展示类型选择 ([24706b3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/24706b3e87aee2fc6d02961e35a82147974199c4))
43
+ * 更新calendar 尺寸 ([7faa15a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7faa15a4ba24a1743a7b7f8a9f6dc200fdf6fa57))
44
+ * 更新getWindowInfo ([8f6c362](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8f6c362b39fbcae9525bde3607faf75257aea67e))
45
+ * 调整 windowinfo ([c9f5b91](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c9f5b910b666ca64c5d37c3c0d8b1f9de9d7dbcb))
46
+
5
47
  ### [0.2.36](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.45...v0.2.36) (2024-12-26)
6
48
 
7
49
  ### [0.2.35](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.34...v0.2.35) (2024-12-26)
@@ -32,12 +32,17 @@
32
32
  >
33
33
  <slot name="list" :items="items" v-if="$slots.list" />
34
34
  <template v-else>
35
- <lcb-product v-bind="{ ...attrs }" :listType="listType" :items="items" v-if="$slots.item">
35
+ <lcb-product
36
+ v-bind="{ ...attrs, form }"
37
+ :listType="listType"
38
+ :items="items"
39
+ v-if="$slots.item"
40
+ >
36
41
  <template #item="{ item }">
37
42
  <slot name="item" :item="item"></slot>
38
43
  </template>
39
44
  </lcb-product>
40
- <lcb-product v-bind="{ ...attrs }" :listType="listType" :items="items" v-else></lcb-product>
45
+ <lcb-product v-bind="{ ...attrs, form }" :listType="listType" :items="items" v-else />
41
46
  </template>
42
47
  </FilterList>
43
48
  </template>
@@ -1,9 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { computed, useAttrs } from 'vue'
2
+ import { ref, useAttrs, watch } from 'vue'
3
3
  import UWaterfall from 'uview-plus/components/u-waterfall/u-waterfall.vue'
4
4
  import { LcbProductProps } from './types'
5
5
 
6
6
  const attrs = useAttrs()
7
+ const uWaterfallRef = ref()
7
8
  defineOptions({
8
9
  name: 'LcbProduct',
9
10
  options: {
@@ -22,6 +23,13 @@ const props = withDefaults(defineProps<LcbProductProps>(), {
22
23
  defineSlots<{
23
24
  item(props: { item: any }): any
24
25
  }>()
26
+ watch(
27
+ () => props.form,
28
+ () => {
29
+ uWaterfallRef.value?.clear?.()
30
+ },
31
+ { deep: true },
32
+ )
25
33
  </script>
26
34
 
27
35
  <template>
@@ -51,33 +59,7 @@ defineSlots<{
51
59
  borderRadius: imageRadius ? `${imageRadius}rpx` : undefined,
52
60
  ...(attrs?.coverImgStyle ?? {}),
53
61
  }"
54
- >
55
- <!-- <template #itemTopSection>
56
- <view class="min-w-10 min-h-10 bg-red-500/50"></view>
57
- </template>
58
- <template #itemBottomSection>
59
- <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
60
- </template>
61
- <template #itemLeftSection>
62
- <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
63
- </template>
64
- <template #itemRightSection>
65
- <view class="min-w-10 min-h-10 bg-green-500/50"></view>
66
- </template> -->
67
-
68
- <!-- <template #imageSection>
69
- <view class="min-w-5 min-h-5 bg-yellow-400 right-1 top-1 absolute z-10"></view>
70
- </template>
71
-
72
- <template #itemSection>
73
- <view class="min-w-10 min-h-10 bg-blue-500/50 right-0 top-0 absolute z-10"></view>
74
- </template>
75
- <template #contentSection>
76
- <view
77
- class="min-w-15 min-h-15 bg-gray-500/20 right-10 top-10 absolute z-10 rounded-full"
78
- ></view>
79
- </template> -->
80
- </lcb-product-item>
62
+ ></lcb-product-item>
81
63
  </slot>
82
64
  </lcb-action-view>
83
65
  </view>
@@ -105,142 +87,83 @@ defineSlots<{
105
87
  height: imageHeight ?? `${imageHeightPercent}%`,
106
88
  ...(attrs?.coverImgStyle ?? {}),
107
89
  }"
108
- >
109
- <!-- <template #itemTopSection>
110
- <view class="min-w-10 min-h-10 bg-red-500/50"></view>
111
- </template>
112
- <template #itemBottomSection>
113
- <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
114
- </template>
115
- <template #itemLeftSection>
116
- <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
117
- </template>
118
- <template #itemRightSection>
119
- <view class="min-w-10 min-h-10 bg-green-500/50"></view>
120
- </template> -->
121
- </lcb-product-item>
90
+ ></lcb-product-item>
122
91
  </slot>
123
92
  </view>
124
93
  </view>
125
94
  </view>
126
95
  </view>
127
96
 
128
- <u-waterfall :modelValue="items" v-if="listType === 'waterfall'" class="flex gap-3 p-3">
129
- <template #left="{ leftList: list }">
130
- <view class="flex flex-col gap-3">
131
- <view
132
- v-for="(item, index) in list"
133
- :key="`${item?.productId}:${index}`"
134
- class="rounded overflow-hidden"
135
- >
136
- <slot name="item" :item="item">
137
- <lcb-absolute-config-layout
138
- v-if="renderItemAbsoluteConfigLayout"
139
- :blocks="renderItemAbsoluteConfigLayout?.blocks"
140
- :canvas="renderItemAbsoluteConfigLayout?.canvas"
141
- :dataset="{
142
- ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
143
- ...item,
144
- }"
145
- />
146
- <lcb-product-item
147
- v-else
148
- v-bind="{ ...item, ...attrs }"
149
- layoutType="vertical"
150
- tag-overflow-wrap
151
- :title-line-clamp="2"
152
- >
153
- <template #coverImg="{ value }">
154
- <image :src="value" class="w-full" mode="widthFix" />
155
- </template>
156
- <!-- <template #itemTopSection>
157
- <view class="min-w-10 min-h-10 bg-red-500/50"></view>
158
- </template>
159
- <template #itemBottomSection>
160
- <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
161
- </template>
162
- <template #itemLeftSection>
163
- <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
164
- </template>
165
- <template #itemRightSection>
166
- <view class="min-w-10 min-h-10 bg-green-500/50"></view>
167
- </template> -->
168
-
169
- <!-- <template #imageSection>
170
- <view class="min-w-5 min-h-5 bg-yellow-400 right-1 top-1 absolute z-10"></view>
171
- </template>
172
-
173
- <template #itemSection>
174
- <view class="min-w-10 min-h-10 bg-blue-500/50 right-0 top-0 absolute z-10"></view>
175
- </template>
176
- <template #contentSection>
177
- <view
178
- class="min-w-15 min-h-15 bg-gray-500/20 right-10 top-10 absolute z-10 rounded-full"
179
- ></view>
180
- </template> -->
181
- </lcb-product-item>
182
- </slot>
97
+ <view class="lcb-product-waterfall">
98
+ <u-waterfall :modelValue="items" v-if="listType === 'waterfall'" ref="uWaterfallRef">
99
+ <template #left="{ leftList: list }">
100
+ <view class="flex flex-col gap-3">
101
+ <lcb-action-view
102
+ v-for="(item, index) in list"
103
+ :key="`${item?.productId}:${index}`"
104
+ custom-class="!rounded !overflow-hidden"
105
+ v-bind="item.link"
106
+ >
107
+ <slot name="item" :item="item">
108
+ <lcb-absolute-config-layout
109
+ v-if="renderItemAbsoluteConfigLayout"
110
+ :blocks="renderItemAbsoluteConfigLayout?.blocks"
111
+ :canvas="renderItemAbsoluteConfigLayout?.canvas"
112
+ :dataset="{
113
+ ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
114
+ ...item,
115
+ }"
116
+ />
117
+ <lcb-product-item
118
+ v-else
119
+ v-bind="{ ...item, ...attrs }"
120
+ layoutType="vertical"
121
+ tag-overflow-wrap
122
+ :title-line-clamp="2"
123
+ >
124
+ <template #coverImg="{ value }">
125
+ <image :src="value" class="w-full" mode="widthFix" />
126
+ </template>
127
+ </lcb-product-item>
128
+ </slot>
129
+ </lcb-action-view>
183
130
  </view>
184
- </view>
185
- </template>
186
- <template #right="{ rightList: list }">
187
- <view class="flex flex-col gap-3">
188
- <view
189
- v-for="(item, index) in list"
190
- :key="`${item?.productId}:${index}`"
191
- class="rounded overflow-hidden"
192
- >
193
- <slot name="item" :item="item">
194
- <lcb-absolute-config-layout
195
- v-if="renderItemAbsoluteConfigLayout"
196
- :blocks="renderItemAbsoluteConfigLayout?.blocks"
197
- :canvas="renderItemAbsoluteConfigLayout?.canvas"
198
- :dataset="{
199
- ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
200
- ...item,
201
- }"
202
- />
203
- <lcb-product-item
204
- v-else
205
- v-bind="{ ...item, ...attrs }"
206
- layoutType="vertical"
207
- tag-overflow-wrap
208
- :title-line-clamp="2"
209
- >
210
- <template #coverImg="{ value }">
211
- <image :src="value" class="w-full" mode="widthFix" />
212
- </template>
213
- <!-- <template #itemTopSection>
214
- <view class="min-w-10 min-h-10 bg-red-500/50"></view>
215
- </template>
216
- <template #itemBottomSection>
217
- <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
218
- </template>
219
- <template #itemLeftSection>
220
- <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
221
- </template>
222
- <template #itemRightSection>
223
- <view class="min-w-10 min-h-10 bg-green-500/50"></view>
224
- </template> -->
225
-
226
- <!-- <template #imageSection>
227
- <view class="min-w-5 min-h-5 bg-yellow-400 right-1 top-1 absolute z-10"></view>
228
- </template>
229
-
230
- <template #itemSection>
231
- <view class="min-w-10 min-h-10 bg-blue-500/50 right-0 top-0 absolute z-10"></view>
232
- </template>
233
- <template #contentSection>
234
- <view
235
- class="min-w-15 min-h-15 bg-gray-500/20 right-10 top-10 absolute z-10 rounded-full"
236
- ></view>
237
- </template> -->
238
- </lcb-product-item>
239
- </slot>
131
+ </template>
132
+ <template #right="{ rightList: list }">
133
+ <view class="flex flex-col gap-3">
134
+ <lcb-action-view
135
+ v-for="(item, index) in list"
136
+ :key="`${item?.productId}:${index}`"
137
+ custom-class="!rounded !overflow-hidden"
138
+ v-bind="item.link"
139
+ >
140
+ <slot name="item" :item="item">
141
+ <lcb-absolute-config-layout
142
+ v-if="renderItemAbsoluteConfigLayout"
143
+ :blocks="renderItemAbsoluteConfigLayout?.blocks"
144
+ :canvas="renderItemAbsoluteConfigLayout?.canvas"
145
+ :dataset="{
146
+ ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
147
+ ...item,
148
+ }"
149
+ />
150
+ <lcb-product-item
151
+ v-else
152
+ v-bind="{ ...item, ...attrs }"
153
+ layoutType="vertical"
154
+ tag-overflow-wrap
155
+ :title-line-clamp="2"
156
+ >
157
+ <template #coverImg="{ value }">
158
+ <image :src="value" class="w-full" mode="widthFix" />
159
+ </template>
160
+ </lcb-product-item>
161
+ </slot>
162
+ </lcb-action-view>
240
163
  </view>
241
- </view>
242
- </template>
243
- </u-waterfall>
164
+ </template>
165
+ </u-waterfall>
166
+ </view>
244
167
 
245
168
  <scroll-view v-if="listType == 'horizontal'" scroll-x>
246
169
  <view class="p-2 flex gap-2 whitespace-nowrap overflow-auto flex-nowrap">
@@ -267,4 +190,12 @@ defineSlots<{
267
190
  </lcb-block>
268
191
  </template>
269
192
 
270
- <style lang="scss" scoped></style>
193
+ <style lang="scss" scoped>
194
+ .lcb-product-waterfall {
195
+ :deep(.u-waterfall) {
196
+ display: flex;
197
+ gap: 24rpx;
198
+ padding: 24rpx;
199
+ }
200
+ }
201
+ </style>
@@ -8,6 +8,7 @@ export interface LcbProductProps {
8
8
  imageRadius?: number
9
9
  itemHeight?: number // 列表项高度
10
10
  items?: Record<string, any>[]
11
+ form?: Record<string, any>
11
12
  renderItemAbsoluteConfigLayout?: {
12
13
  dataset?: Record<string, any>
13
14
  blocks: any[]
@@ -56,7 +56,14 @@ const style = computed(() => {
56
56
  const value = computed(() => {
57
57
  if (props?.prop === 'coverImg') {
58
58
  const imgArr = formatJson(itemProps?.[props?.prop], [])
59
- return imgArr?.[1] || imgArr?.[0]
59
+ const imageIndex =
60
+ {
61
+ vertical: 0,
62
+ horizontal: 1,
63
+ square: 2,
64
+ }[itemProps?.imageType] ?? 0
65
+
66
+ return imgArr?.[imageIndex]
60
67
  }
61
68
 
62
69
  if (props?.prop === 'tags') {
@@ -21,7 +21,7 @@ const props = withDefaults(defineProps<LcbProductItemProps>(), {
21
21
  tagMark: false,
22
22
  tagRound: false,
23
23
  distanceUnit: 'km',
24
-
24
+ imageType: 'vertical',
25
25
  priceUnit: '¥',
26
26
  scribePriceUnit: '¥',
27
27
  coverImgVisible: true,
@@ -14,6 +14,7 @@ export interface LcbProductItemProps {
14
14
  tagMark?: boolean
15
15
  tagRound?: boolean
16
16
  distanceUnit?: string
17
+ imageType?: 'square' | 'vertical' | 'horizontal'
17
18
 
18
19
  coverImg?: any
19
20
  productName?: any
@@ -16,7 +16,6 @@ defineOptions({
16
16
  },
17
17
  })
18
18
  const props = withDefaults(defineProps<LcbRichTextProps>(), {})
19
- console.log('props', props)
20
19
  </script>
21
20
 
22
21
  <style lang="scss" scoped></style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.36",
3
+ "version": "0.2.38",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "vue": ">=3.2.47",
14
- "@tplc/wot": "0.1.45"
14
+ "@tplc/wot": "0.1.47"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",
@@ -21,6 +21,7 @@ declare const __VLS_component: import('vue').DefineComponent<
21
21
  >
22
22
  >,
23
23
  {
24
+ form: Record<string, any>
24
25
  imageRadius: number
25
26
  items: Record<string, any>[]
26
27
  imageWidth: number
@@ -7,6 +7,7 @@ export interface LcbProductProps {
7
7
  imageRadius?: number
8
8
  itemHeight?: number
9
9
  items?: Record<string, any>[]
10
+ form?: Record<string, any>
10
11
  renderItemAbsoluteConfigLayout?: {
11
12
  dataset?: Record<string, any>
12
13
  blocks: any[]
@@ -70,6 +70,7 @@ declare const __VLS_component: import('vue').DefineComponent<
70
70
  tagMark: boolean
71
71
  tagRound: boolean
72
72
  distanceUnit: string
73
+ imageType: string
73
74
  priceUnit: string
74
75
  scribePriceUnit: string
75
76
  coverImgVisible: boolean
@@ -117,6 +118,7 @@ declare const __VLS_component: import('vue').DefineComponent<
117
118
  tagMark: boolean
118
119
  tagRound: boolean
119
120
  distanceUnit: string
121
+ imageType: string
120
122
  priceUnit: string
121
123
  scribePriceUnit: string
122
124
  coverImgVisible: boolean
@@ -155,6 +157,7 @@ declare const __VLS_component: import('vue').DefineComponent<
155
157
  tagMark: boolean
156
158
  tagRound: boolean
157
159
  distanceUnit: string
160
+ imageType: 'square' | 'vertical' | 'horizontal'
158
161
  coverImgVisible: boolean
159
162
  titleVisible: boolean
160
163
  subTitleVisible: boolean
@@ -12,6 +12,7 @@ export interface LcbProductItemProps {
12
12
  tagMark?: boolean
13
13
  tagRound?: boolean
14
14
  distanceUnit?: string
15
+ imageType?: 'square' | 'vertical' | 'horizontal'
15
16
  coverImg?: any
16
17
  productName?: any
17
18
  subTitle?: any