@tplc/business 0.2.79 → 0.2.82
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 +40 -0
- 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-title/lcb-title.vue +21 -1
- package/components/lcb-title/types.ts +1 -0
- 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/types/components/lcb-title/lcb-title.vue.d.ts +3 -0
- package/types/components/lcb-title/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
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.82](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.80...v0.2.82) (2025-01-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.2.81 ([0cbe3db](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0cbe3dbdb94242830fe0587f276944c2d15bbcb8))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ✨ Features | 新功能
|
|
14
|
+
|
|
15
|
+
* product 支持调整布局 ([d836ffc](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d836ffcba2415c137e7956a18e6ee954e53bbdb4))
|
|
16
|
+
* 新增标签左线 ([2dcf22a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2dcf22a3c8e0d64c696db9a682bf83f374a108d7))
|
|
17
|
+
|
|
18
|
+
### [0.2.81](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.79...v0.2.81) (2025-01-08)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
22
|
+
|
|
23
|
+
* **release:** 0.2.80 ([b282465](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b2824652912725873b76bd8c138bc96e82151b28))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### ✨ Features | 新功能
|
|
27
|
+
|
|
28
|
+
* level判断 ([c2beddd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c2beddd0a181d3b60281bdfddec7f70357668a7f))
|
|
29
|
+
* product 支持调整布局 ([d836ffc](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d836ffcba2415c137e7956a18e6ee954e53bbdb4))
|
|
30
|
+
|
|
31
|
+
### [0.2.80](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.78...v0.2.80) (2025-01-08)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
35
|
+
|
|
36
|
+
* **release:** 0.2.79 ([6b673ac](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6b673ac4e3589421ab8e1863447f693d5c748457))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### ✨ Features | 新功能
|
|
40
|
+
|
|
41
|
+
* level判断 ([c2beddd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c2beddd0a181d3b60281bdfddec7f70357668a7f))
|
|
42
|
+
* watch修改一次 ([865595d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/865595d49e33c135fa2616fb26fa1f0f9c39bcb4))
|
|
43
|
+
* 默认文字大小 ([ffa4f41](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ffa4f41ddc95aac957dcc1f5e822fab0bb26a81d))
|
|
44
|
+
|
|
5
45
|
### [0.2.79](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.53...v0.2.79) (2025-01-07)
|
|
6
46
|
|
|
7
47
|
|
|
@@ -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
|
|
@@ -48,6 +50,8 @@ const getData = async () => {
|
|
|
48
50
|
if (props.items?.length) {
|
|
49
51
|
const { data } = await uni.$lcb.http.post('/productInfo/filteredPage', {
|
|
50
52
|
productIdList: props.items.map((item) => item.productId),
|
|
53
|
+
productType: props.items[0].productType,
|
|
54
|
+
listType: props.listType,
|
|
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
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
:style="{
|
|
10
10
|
fontWeight,
|
|
11
11
|
}"
|
|
12
|
+
:class="{
|
|
13
|
+
'title-line': showTitleLine,
|
|
14
|
+
}"
|
|
12
15
|
>
|
|
13
16
|
{{ title }}
|
|
14
17
|
</view>
|
|
@@ -63,6 +66,23 @@ withDefaults(defineProps<LcbTitleProps>(), {
|
|
|
63
66
|
hintFontSize: 24,
|
|
64
67
|
hintColor: '#666',
|
|
65
68
|
hintVerticalAlign: 'end',
|
|
69
|
+
showTitleLine: false,
|
|
66
70
|
})
|
|
67
71
|
</script>
|
|
68
|
-
<style lang="scss" scoped
|
|
72
|
+
<style lang="scss" scoped>
|
|
73
|
+
@import '@tplc/wot/components/common/abstracts/variable';
|
|
74
|
+
.title-line {
|
|
75
|
+
position: relative;
|
|
76
|
+
padding-left: 10rpx !important;
|
|
77
|
+
&::after {
|
|
78
|
+
content: '';
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 5%;
|
|
81
|
+
left: 0;
|
|
82
|
+
border-radius: 4rpx;
|
|
83
|
+
width: 6rpx;
|
|
84
|
+
height: 90%;
|
|
85
|
+
background-color: $-color-theme;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</style>
|
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
|
|
@@ -15,6 +15,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
15
15
|
hintFontSize: number
|
|
16
16
|
hintColor: string
|
|
17
17
|
hintVerticalAlign: string
|
|
18
|
+
showTitleLine: boolean
|
|
18
19
|
}
|
|
19
20
|
>,
|
|
20
21
|
{},
|
|
@@ -43,6 +44,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
43
44
|
hintFontSize: number
|
|
44
45
|
hintColor: string
|
|
45
46
|
hintVerticalAlign: string
|
|
47
|
+
showTitleLine: boolean
|
|
46
48
|
}
|
|
47
49
|
>
|
|
48
50
|
>
|
|
@@ -62,6 +64,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
62
64
|
hintColor: string
|
|
63
65
|
hintFontSize: number
|
|
64
66
|
hintVerticalAlign: 'end' | 'center'
|
|
67
|
+
showTitleLine: boolean
|
|
65
68
|
moreColor: string
|
|
66
69
|
moreFontSize: number
|
|
67
70
|
moreVerticalAlign: 'end' | 'center'
|