@tplc/business 0.2.78 → 0.2.80
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 +36 -0
- package/components/lcb-list/components/FilterList/index.vue +3 -18
- package/components/lcb-list/types.ts +2 -1
- package/components/lcb-product/lcb-product.vue +80 -58
- package/components/lcb-product/types.ts +3 -1
- package/components/lcb-product-item/components/ItemValue.vue +1 -1
- package/package.json +1 -1
- package/types/components/lcb-list/lcb-list.vue.d.ts +28 -3
- package/types/components/lcb-list/types.d.ts +2 -1
- package/types/components/lcb-product/lcb-product.vue.d.ts +6 -0
- package/types/components/lcb-product/types.d.ts +2 -1
- package/types/components/lcb-product-item/lcb-product-item.vue.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
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.80](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.78...v0.2.80) (2025-01-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.2.79 ([6b673ac](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6b673ac4e3589421ab8e1863447f693d5c748457))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ✨ Features | 新功能
|
|
14
|
+
|
|
15
|
+
* level判断 ([c2beddd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c2beddd0a181d3b60281bdfddec7f70357668a7f))
|
|
16
|
+
* watch修改一次 ([865595d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/865595d49e33c135fa2616fb26fa1f0f9c39bcb4))
|
|
17
|
+
* 默认文字大小 ([ffa4f41](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ffa4f41ddc95aac957dcc1f5e822fab0bb26a81d))
|
|
18
|
+
|
|
19
|
+
### [0.2.79](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.53...v0.2.79) (2025-01-07)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
23
|
+
|
|
24
|
+
* 修改横向滚动不支持圆角 ([363ca00](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/363ca008f08c552aa888c3ebe1274a3063ab2760))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
28
|
+
|
|
29
|
+
* **release:** 0.2.76 ([ab99f27](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ab99f27a3e01db706809ee81f94731efb1ff67e9))
|
|
30
|
+
* **release:** 0.2.77 ([b1da5ad](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b1da5adbdcf8082bc57ce592a86e109658620818))
|
|
31
|
+
* **release:** 0.2.78 ([ac485d8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ac485d80335ab735eb060539f05e7514323b0911))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### ✨ Features | 新功能
|
|
35
|
+
|
|
36
|
+
* img block ([abbbb87](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/abbbb871b340d33e071dc78cc67e313aa3f4932b))
|
|
37
|
+
* watch修改一次 ([865595d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/865595d49e33c135fa2616fb26fa1f0f9c39bcb4))
|
|
38
|
+
* 图标处理 ([d17d2aa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d17d2aab174fcdcac3bf60b68325c15abf64c9c5))
|
|
39
|
+
* 默认文字大小 ([ffa4f41](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ffa4f41ddc95aac957dcc1f5e822fab0bb26a81d))
|
|
40
|
+
|
|
5
41
|
### [0.2.78](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.77...v0.2.78) (2025-01-07)
|
|
6
42
|
|
|
7
43
|
### [0.2.77](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.76...v0.2.77) (2025-01-07)
|
|
@@ -46,25 +46,10 @@ const modelValue = defineModel<unknown[]>({
|
|
|
46
46
|
watchEffect(() => {
|
|
47
47
|
modelValue.value = dataList.value
|
|
48
48
|
})
|
|
49
|
-
|
|
50
|
-
watch(
|
|
51
|
-
() => props.url,
|
|
52
|
-
async (val) => {
|
|
53
|
-
if (val) {
|
|
54
|
-
paging.value?.reload()
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
immediate: true,
|
|
59
|
-
deep: true,
|
|
60
|
-
},
|
|
61
|
-
)
|
|
62
49
|
watch(
|
|
63
|
-
() => form?.value,
|
|
64
|
-
async (
|
|
65
|
-
|
|
66
|
-
paging.value?.reload()
|
|
67
|
-
}
|
|
50
|
+
() => [props.url, props.baseParam, form?.value],
|
|
51
|
+
async () => {
|
|
52
|
+
paging.value?.reload()
|
|
68
53
|
},
|
|
69
54
|
{
|
|
70
55
|
immediate: true,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PageListProps } from './components/FilterList/type'
|
|
2
2
|
import { LcbProductProps } from '../lcb-product/types'
|
|
3
|
+
import { LcbBlockProps } from '../lcb-block/types'
|
|
3
4
|
|
|
4
|
-
export interface LcbListProps {
|
|
5
|
+
export interface LcbListProps extends LcbBlockProps {
|
|
5
6
|
pageFilterType?: string
|
|
6
7
|
pageListProps?: PageListProps
|
|
7
8
|
borderRadius?: number
|
|
@@ -23,6 +23,8 @@ const props = withDefaults(defineProps<LcbProductProps>(), {
|
|
|
23
23
|
imageHeight: 250,
|
|
24
24
|
titleLineClamp: 2,
|
|
25
25
|
column: 2,
|
|
26
|
+
paddingHorizontal: 24,
|
|
27
|
+
paddingVertical: 24,
|
|
26
28
|
})
|
|
27
29
|
const renderList = ref<Record<string, any>[]>([])
|
|
28
30
|
const screenWidth = isH5 ? window.innerWidth : uni.getWindowInfo().screenWidth
|
|
@@ -46,8 +48,10 @@ watch(
|
|
|
46
48
|
const getData = async () => {
|
|
47
49
|
if (props.filterList) return
|
|
48
50
|
if (props.items?.length) {
|
|
51
|
+
console.log('props.items', props.items)
|
|
49
52
|
const { data } = await uni.$lcb.http.post('/productInfo/filteredPage', {
|
|
50
53
|
productIdList: props.items.map((item) => item.productId),
|
|
54
|
+
productType: props.items[0].productType,
|
|
51
55
|
})
|
|
52
56
|
renderList.value = data as Record<string, any>[]
|
|
53
57
|
} else {
|
|
@@ -55,7 +59,18 @@ const getData = async () => {
|
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
|
|
58
|
-
watch(
|
|
62
|
+
watch(
|
|
63
|
+
() => props.items,
|
|
64
|
+
(newValue, oldValue) => {
|
|
65
|
+
if (
|
|
66
|
+
newValue?.map((item) => item.productId).join(',') !==
|
|
67
|
+
oldValue?.map((item) => item.productId).join(',')
|
|
68
|
+
) {
|
|
69
|
+
getData()
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{ immediate: true, deep: true },
|
|
73
|
+
)
|
|
59
74
|
const columnWidth = (screenWidth - 12 * (1 + props.column)) / 2
|
|
60
75
|
defineExpose({
|
|
61
76
|
clear: () => {
|
|
@@ -70,7 +85,7 @@ defineExpose({
|
|
|
70
85
|
<template>
|
|
71
86
|
<lcb-block v-bind="$props">
|
|
72
87
|
<!-- 单列 -->
|
|
73
|
-
<view class="flex flex-col gap-2
|
|
88
|
+
<view class="flex flex-col gap-2" v-if="listType === 'list'">
|
|
74
89
|
<lcb-action-view
|
|
75
90
|
v-for="(item, index) in renderList"
|
|
76
91
|
:key="`${item?.productId}:${index}`"
|
|
@@ -102,36 +117,36 @@ defineExpose({
|
|
|
102
117
|
</lcb-action-view>
|
|
103
118
|
</view>
|
|
104
119
|
<!-- 双列 -->
|
|
105
|
-
<view class="grid
|
|
120
|
+
<view class="grid grid-cols-2 gap-2 box-border" v-else-if="listType === 'grid'">
|
|
106
121
|
<lcb-action-view
|
|
107
122
|
v-for="(item, index) in renderList"
|
|
108
123
|
:key="`${item?.productId}:${index}`"
|
|
109
124
|
v-bind="item.link"
|
|
125
|
+
custom-class="h-full rounded-md overflow-hidden"
|
|
110
126
|
>
|
|
111
|
-
<
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
</view>
|
|
127
|
+
<slot name="item" :item="item">
|
|
128
|
+
<lcb-absolute-config-layout
|
|
129
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
130
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
131
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
132
|
+
:dataset="{
|
|
133
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
134
|
+
...item,
|
|
135
|
+
}"
|
|
136
|
+
/>
|
|
137
|
+
<lcb-product-item
|
|
138
|
+
v-else
|
|
139
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
140
|
+
layoutType="vertical"
|
|
141
|
+
className="h-full"
|
|
142
|
+
:coverImgStyle="{
|
|
143
|
+
width: '100%',
|
|
144
|
+
height: transformValueUnit(imageHeight),
|
|
145
|
+
borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
|
|
146
|
+
...(attrs?.coverImgStyle ?? {}),
|
|
147
|
+
}"
|
|
148
|
+
></lcb-product-item>
|
|
149
|
+
</slot>
|
|
135
150
|
</lcb-action-view>
|
|
136
151
|
</view>
|
|
137
152
|
|
|
@@ -229,40 +244,47 @@ defineExpose({
|
|
|
229
244
|
</u-waterfall>
|
|
230
245
|
</view>
|
|
231
246
|
|
|
232
|
-
<scroll-view v-else-if="listType == 'horizontal'" scroll-x>
|
|
233
|
-
<view class="
|
|
234
|
-
<view
|
|
247
|
+
<scroll-view v-else-if="listType == 'horizontal'" scroll-x class="h-fit">
|
|
248
|
+
<view class="whitespace-nowrap overflow-x-auto flex items-stretch">
|
|
249
|
+
<lcb-action-view
|
|
235
250
|
v-for="(item, index) in renderList"
|
|
236
251
|
:key="`${item?.productId}:${index}`"
|
|
237
|
-
class="inline-block"
|
|
238
|
-
|
|
239
|
-
width: `${itemWidth}rpx`,
|
|
240
|
-
marginLeft: index === 0 ? 0 : '24rpx',
|
|
241
|
-
}"
|
|
252
|
+
custom-class="inline-block flex-shrink-0 w-fit !h-auto"
|
|
253
|
+
v-bind="item.link"
|
|
242
254
|
>
|
|
243
|
-
<
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
255
|
+
<view
|
|
256
|
+
:style="{
|
|
257
|
+
width: `${itemWidth}rpx`,
|
|
258
|
+
marginLeft: index === 0 ? 0 : '24rpx',
|
|
259
|
+
}"
|
|
260
|
+
class="h-full"
|
|
261
|
+
>
|
|
262
|
+
<slot name="item" :item="item">
|
|
263
|
+
<lcb-absolute-config-layout
|
|
264
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
265
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
266
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
267
|
+
:dataset="{
|
|
268
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
269
|
+
...item,
|
|
270
|
+
}"
|
|
271
|
+
/>
|
|
272
|
+
<lcb-product-item
|
|
273
|
+
v-else
|
|
274
|
+
className="h-full"
|
|
275
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
276
|
+
:coverImgStyle="{
|
|
277
|
+
width: layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
|
|
278
|
+
height: layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
|
|
279
|
+
minHeight:
|
|
280
|
+
layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
|
|
281
|
+
borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
|
|
282
|
+
...(attrs?.coverImgStyle ?? {}),
|
|
283
|
+
}"
|
|
284
|
+
></lcb-product-item>
|
|
285
|
+
</slot>
|
|
286
|
+
</view>
|
|
287
|
+
</lcb-action-view>
|
|
266
288
|
</view>
|
|
267
289
|
</scroll-view>
|
|
268
290
|
</lcb-block>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { LcbBlockProps } from '../lcb-block/types'
|
|
2
|
+
|
|
3
|
+
export interface LcbProductProps extends LcbBlockProps {
|
|
2
4
|
// Define the component's prop types here
|
|
3
5
|
listType?: 'list' | 'horizontal' | 'grid' | 'waterfall' // 1列表 2 左右滑动 3一行两个 4瀑布流
|
|
4
6
|
imageWidth?: number
|
|
@@ -145,7 +145,7 @@ const value = computed(() => {
|
|
|
145
145
|
</view>
|
|
146
146
|
</slot>
|
|
147
147
|
|
|
148
|
-
<slot :value="value" v-if="prop === 'level'" name="level">
|
|
148
|
+
<slot :value="value" v-if="prop === 'level' && value && Number(value)" name="level">
|
|
149
149
|
<view :class="className" :style="style" class="inline pl-1 relative top-[-3px]">
|
|
150
150
|
<wd-rate
|
|
151
151
|
:model-value="Number(value)"
|
package/package.json
CHANGED
|
@@ -20,19 +20,44 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
20
20
|
>,
|
|
21
21
|
{
|
|
22
22
|
mode: 'map' | 'list'
|
|
23
|
+
backgroundColor: string
|
|
24
|
+
color: string
|
|
25
|
+
customClass: string
|
|
26
|
+
radius: number
|
|
23
27
|
imageRadius: number
|
|
28
|
+
marginHorizontal: number
|
|
29
|
+
paddingHorizontal: number
|
|
30
|
+
paddingVertical: number
|
|
31
|
+
backgroundImage: string
|
|
32
|
+
floatUp: number
|
|
33
|
+
shadowColor: string
|
|
34
|
+
shadowSize: number
|
|
35
|
+
blurSize: number
|
|
36
|
+
opacity: number
|
|
37
|
+
paddingTop: number
|
|
38
|
+
paddingBottom: number
|
|
39
|
+
paddingLeft: number
|
|
40
|
+
paddingRight: number
|
|
41
|
+
fontSize: number
|
|
42
|
+
topRadius: number
|
|
43
|
+
bottomRadius: number
|
|
44
|
+
backgroundRepeat: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'
|
|
45
|
+
backgroundSize: string
|
|
46
|
+
backgroundPosition: string
|
|
47
|
+
borderColor: string
|
|
48
|
+
textAlign: 'left' | 'center' | 'right'
|
|
24
49
|
imageWidth: number
|
|
25
50
|
borderRadius: number
|
|
26
51
|
imageHeight: number
|
|
27
52
|
listType: 'list' | 'horizontal' | 'grid' | 'waterfall'
|
|
53
|
+
itemWidth: number
|
|
54
|
+
layoutType: 'vertical' | 'horizontal'
|
|
55
|
+
titleLineClamp: number
|
|
28
56
|
pageFilterType: string
|
|
29
57
|
pageListProps: import('./components/FilterList/type').PageListProps
|
|
30
58
|
styleMode: 'default' | 'plain'
|
|
31
59
|
border: boolean
|
|
32
|
-
titleLineClamp: number
|
|
33
60
|
isSticky: boolean
|
|
34
|
-
layoutType: 'vertical' | 'horizontal'
|
|
35
|
-
itemWidth: number
|
|
36
61
|
},
|
|
37
62
|
{}
|
|
38
63
|
>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PageListProps } from './components/FilterList/type'
|
|
2
2
|
import { LcbProductProps } from '../lcb-product/types'
|
|
3
|
-
|
|
3
|
+
import { LcbBlockProps } from '../lcb-block/types'
|
|
4
|
+
export interface LcbListProps extends LcbBlockProps {
|
|
4
5
|
pageFilterType?: string
|
|
5
6
|
pageListProps?: PageListProps
|
|
6
7
|
borderRadius?: number
|
|
@@ -13,6 +13,8 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
13
13
|
imageHeight: number
|
|
14
14
|
titleLineClamp: number
|
|
15
15
|
column: number
|
|
16
|
+
paddingHorizontal: number
|
|
17
|
+
paddingVertical: number
|
|
16
18
|
}
|
|
17
19
|
>,
|
|
18
20
|
{
|
|
@@ -36,11 +38,15 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
36
38
|
imageHeight: number
|
|
37
39
|
titleLineClamp: number
|
|
38
40
|
column: number
|
|
41
|
+
paddingHorizontal: number
|
|
42
|
+
paddingVertical: number
|
|
39
43
|
}
|
|
40
44
|
>
|
|
41
45
|
>
|
|
42
46
|
>,
|
|
43
47
|
{
|
|
48
|
+
paddingHorizontal: number
|
|
49
|
+
paddingVertical: number
|
|
44
50
|
imageWidth: number
|
|
45
51
|
imageHeight: number
|
|
46
52
|
column: number
|
|
@@ -156,8 +156,8 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
156
156
|
>,
|
|
157
157
|
{
|
|
158
158
|
borderRadius: number
|
|
159
|
-
titleLineClamp: number
|
|
160
159
|
layoutType: 'vertical' | 'horizontal'
|
|
160
|
+
titleLineClamp: number
|
|
161
161
|
tagOverflowWrap: boolean
|
|
162
162
|
priceUnit: any
|
|
163
163
|
scribePriceUnit: any
|