@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 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(() => props.items, getData, { immediate: true, deep: true })
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 p-3" v-if="listType === 'list'">
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 p-3 grid-cols-2 gap-2 box-border" v-else-if="listType === '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
- <view class="rounded-md overflow-hidden">
112
- <slot name="item" :item="item">
113
- <lcb-absolute-config-layout
114
- v-if="renderItemAbsoluteConfigLayout"
115
- :blocks="renderItemAbsoluteConfigLayout?.blocks"
116
- :canvas="renderItemAbsoluteConfigLayout?.canvas"
117
- :dataset="{
118
- ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
119
- ...item,
120
- }"
121
- />
122
- <lcb-product-item
123
- v-else
124
- v-bind="{ ...item, ...$props, ...attrs }"
125
- layoutType="vertical"
126
- :coverImgStyle="{
127
- width: '100%',
128
- height: transformValueUnit(imageHeight),
129
- borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
130
- ...(attrs?.coverImgStyle ?? {}),
131
- }"
132
- ></lcb-product-item>
133
- </slot>
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="p-3 whitespace-nowrap overflow-x-auto">
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
- :style="{
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
- <slot name="item" :item="item">
244
- <lcb-absolute-config-layout
245
- v-if="renderItemAbsoluteConfigLayout"
246
- :blocks="renderItemAbsoluteConfigLayout?.blocks"
247
- :canvas="renderItemAbsoluteConfigLayout?.canvas"
248
- :dataset="{
249
- ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
250
- ...item,
251
- }"
252
- />
253
- <lcb-product-item
254
- v-else
255
- v-bind="{ ...item, ...$props, ...attrs }"
256
- :coverImgStyle="{
257
- width: layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
258
- height: layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
259
- minHeight: layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
260
- borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
261
- ...(attrs?.coverImgStyle ?? {}),
262
- }"
263
- ></lcb-product-item>
264
- </slot>
265
- </view>
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
- export interface LcbProductProps {
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></style>
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>
@@ -16,6 +16,7 @@ export interface LcbTitleProps extends LcbBlockProps {
16
16
  hintColor?: string
17
17
  hintFontSize?: number
18
18
  hintVerticalAlign?: 'end' | 'center'
19
+ showTitleLine?: boolean
19
20
 
20
21
  moreColor?: string
21
22
  moreFontSize?: number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.79",
3
+ "version": "0.2.82",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -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
- export interface LcbListProps {
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
@@ -1,4 +1,5 @@
1
- export interface LcbProductProps {
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+ export interface LcbProductProps extends LcbBlockProps {
2
3
  listType?: 'list' | 'horizontal' | 'grid' | 'waterfall'
3
4
  imageWidth?: number
4
5
  imageHeight?: 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'
@@ -15,6 +15,7 @@ export interface LcbTitleProps extends LcbBlockProps {
15
15
  hintColor?: string
16
16
  hintFontSize?: number
17
17
  hintVerticalAlign?: 'end' | 'center'
18
+ showTitleLine?: boolean
18
19
  moreColor?: string
19
20
  moreFontSize?: number
20
21
  moreText?: string