@tplc/business 0.7.72 → 0.7.73
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 +18 -0
- package/components/lcb-action-view/types.ts +1 -1
- package/components/lcb-calendar-filter/components/CalendarItem/index.vue +8 -10
- package/components/lcb-calendar-filter/lcb-calendar-filter.vue +2 -3
- package/components/lcb-map/lcb-map.vue +1 -1
- package/components/lcb-product/lcb-product.vue +76 -38
- package/components/lcb-product/types.ts +2 -0
- package/components/lcb-product-item/components/ItemValue.vue +6 -6
- package/components/lcb-product-item/types.ts +1 -0
- package/package.json +1 -1
- package/types/components/lcb-action-view/types.d.ts +1 -1
- package/types/components/lcb-calendar-filter/components/CalendarItem/index.vue.d.ts +1 -1
- package/types/components/lcb-product/lcb-product.vue.d.ts +3 -0
- package/types/components/lcb-product/types.d.ts +2 -0
- package/types/components/lcb-product-item/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
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.7.73](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.72...v0.7.73) (2026-01-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
9
|
+
|
|
10
|
+
* **lcb-action-view:** rename memberRole to userLevelRole in jumpTypeMap for clarity ([9d52eaf](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/9d52eaf956d8a7e9d931d1f6ceb256ed0cf3ce4e))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ✨ Features | 新功能
|
|
14
|
+
|
|
15
|
+
* **lcb-action-view:** add MemberRolePopup component and update jump type handling for member role ([82e094a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/82e094a20e121ce7b960d94a46a80e2a77722df7))
|
|
16
|
+
* **lcb-product:** add support for configurable row count in horizontal layout and implement row-based rendering ([d6d773d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d6d773da60a5a65d2dba4e47aed5969e6b22399b))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### ♻️ Code Refactoring | 代码重构
|
|
20
|
+
|
|
21
|
+
* **lcb-calendar-filter:** simplify CalendarItem component and update styles for better consistency ([b63b489](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/b63b4893313cba648c1f2b62618e2ccb06e567af))
|
|
22
|
+
|
|
5
23
|
### [0.7.72](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.69...v0.7.72) (2026-01-17)
|
|
6
24
|
|
|
7
25
|
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
|
-
class="gap-0.25 flex flex-col p-2 justify-center border-solid border-1 border
|
|
3
|
+
class="gap-0.25 flex flex-col p-2 justify-center border-solid border-1 border-[var(--wot-color-theme)] rounded-1 relative"
|
|
4
4
|
@click="date?.status !== 0 ? (currentDate = date?.date) : undefined"
|
|
5
5
|
:class="{
|
|
6
|
-
'bg-[var(--
|
|
7
|
-
currentDate === date?.date,
|
|
6
|
+
'bg-[var(--wot-color-theme)] text-white': currentDate === date?.date,
|
|
8
7
|
'opacity-50': date?.status === 0,
|
|
9
|
-
[customClass]: true,
|
|
8
|
+
[customClass ?? '']: true,
|
|
10
9
|
}"
|
|
11
10
|
>
|
|
12
11
|
<template v-if="date">
|
|
13
|
-
<
|
|
14
|
-
{{ date.topTextOutside }}
|
|
15
|
-
</
|
|
16
|
-
<view class="text-[var(--font1-color)]">{{ date.buttomText }}</view>
|
|
12
|
+
<view class="whitespace-nowrap">
|
|
13
|
+
{{ date.topTextOutside }}
|
|
14
|
+
</view>
|
|
15
|
+
<view class="text-[var(--font1-color)]" v-if="date.buttomText">{{ date.buttomText }}</view>
|
|
17
16
|
<view v-if="date.floorText" class="text-[var(--font2-color)]">
|
|
18
17
|
{{ date.floorText }}
|
|
19
18
|
</view>
|
|
@@ -30,13 +29,12 @@
|
|
|
30
29
|
</view>
|
|
31
30
|
</template>
|
|
32
31
|
<script setup lang="ts">
|
|
33
|
-
import dayjs from 'dayjs/esm'
|
|
34
32
|
import { HolidayInfo } from '../../types'
|
|
35
33
|
|
|
36
34
|
defineProps<{
|
|
37
35
|
date?: HolidayInfo
|
|
38
36
|
showAll?: boolean
|
|
39
|
-
customClass
|
|
37
|
+
customClass?: string
|
|
40
38
|
}>()
|
|
41
39
|
|
|
42
40
|
const currentDate = defineModel<string | undefined>()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<lcb-block v-bind="$props">
|
|
3
3
|
<view class="relative flex">
|
|
4
4
|
<!-- 左侧固定的"全部"选项 -->
|
|
5
|
-
<CalendarItem showAll v-model="currentDate"
|
|
5
|
+
<CalendarItem showAll v-model="currentDate" />
|
|
6
6
|
|
|
7
7
|
<scroll-view
|
|
8
8
|
scroll-x
|
|
@@ -17,13 +17,12 @@
|
|
|
17
17
|
:key="date.date"
|
|
18
18
|
:id="`id_${date.date}`"
|
|
19
19
|
:date="date"
|
|
20
|
-
custom-class="mt-3 !justify-start"
|
|
21
20
|
v-model="currentDate"
|
|
22
21
|
/>
|
|
23
22
|
</view>
|
|
24
23
|
</scroll-view>
|
|
25
24
|
<view
|
|
26
|
-
class="flex flex-col justify-center items-center
|
|
25
|
+
class="rounded-1 flex flex-col justify-center items-center ml-2 px-1 py-1 w-8 text-primary !border-[var(--wot-color-theme)] border-solid border-1"
|
|
27
26
|
@click="onMore"
|
|
28
27
|
v-if="showMore"
|
|
29
28
|
>
|
|
@@ -208,7 +208,7 @@ const fetchMapData = async (regionInfo: {
|
|
|
208
208
|
mapScale: currentScale.value,
|
|
209
209
|
mapCornerLongitude: regionInfo.southwest?.longitude,
|
|
210
210
|
mapCornerLatitude: regionInfo.southwest?.latitude,
|
|
211
|
-
|
|
211
|
+
mapSearchParamList: selectedTag.value.length ? selectedTag.value : undefined,
|
|
212
212
|
},
|
|
213
213
|
true,
|
|
214
214
|
)) as {
|
|
@@ -31,6 +31,7 @@ const props = withDefaults(defineProps<LcbProductProps>(), {
|
|
|
31
31
|
paddingVertical: 24,
|
|
32
32
|
sourceMode: 1,
|
|
33
33
|
gap: 16,
|
|
34
|
+
rows: 1,
|
|
34
35
|
})
|
|
35
36
|
const { form } = useSyncForm({ dynamicScope: props.dynamicScope })
|
|
36
37
|
const loading = ref(false)
|
|
@@ -178,6 +179,27 @@ const blockProps = computed(() => {
|
|
|
178
179
|
reset,
|
|
179
180
|
]
|
|
180
181
|
})
|
|
182
|
+
|
|
183
|
+
// 计算 horizontal 模式下的分行数据
|
|
184
|
+
const horizontalRows = computed(() => {
|
|
185
|
+
if (props.listType !== 'horizontal' || !renderList.value.length) {
|
|
186
|
+
return []
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const rows: any[][] = []
|
|
190
|
+
const totalItems = renderList.value.length
|
|
191
|
+
const itemsPerRow = Math.ceil(totalItems / props.rows)
|
|
192
|
+
|
|
193
|
+
for (let i = 0; i < props.rows; i++) {
|
|
194
|
+
const start = i * itemsPerRow
|
|
195
|
+
const end = Math.min(start + itemsPerRow, totalItems)
|
|
196
|
+
if (start < totalItems) {
|
|
197
|
+
rows.push(renderList.value.slice(start, end))
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return rows
|
|
202
|
+
})
|
|
181
203
|
</script>
|
|
182
204
|
|
|
183
205
|
<template>
|
|
@@ -190,7 +212,7 @@ const blockProps = computed(() => {
|
|
|
190
212
|
shadowSize: blockShadowSize,
|
|
191
213
|
blurSize: blockBlurSize,
|
|
192
214
|
}"
|
|
193
|
-
:custom-class="`${listType == 'horizontal' ? '!gap-0 h-fit
|
|
215
|
+
:custom-class="`${listType == 'horizontal' ? '!gap-0 h-fit w-full' : ''}`"
|
|
194
216
|
>
|
|
195
217
|
<!-- 单列 -->
|
|
196
218
|
<view
|
|
@@ -391,46 +413,62 @@ const blockProps = computed(() => {
|
|
|
391
413
|
</view>
|
|
392
414
|
<!-- 单列滚动 -->
|
|
393
415
|
<template v-else-if="listType == 'horizontal'">
|
|
394
|
-
<
|
|
395
|
-
v-for="(item, index) in renderList"
|
|
396
|
-
:key="`${item?.productId}:${index}`"
|
|
397
|
-
custom-class="flex-shrink-0 w-fit !h-auto"
|
|
398
|
-
v-bind="item.link"
|
|
399
|
-
render-mode="view"
|
|
400
|
-
>
|
|
416
|
+
<view class="overflow-x-auto w-full" style="padding: 12rpx 0">
|
|
401
417
|
<view
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
marginLeft: index === 0 ? 0 : `${gap}rpx`,
|
|
405
|
-
height: '100%',
|
|
406
|
-
}"
|
|
418
|
+
class="flex flex-col"
|
|
419
|
+
:style="{ gap: rows > 1 ? `${gap}rpx` : undefined, margin: '0 -12rpx' }"
|
|
407
420
|
>
|
|
408
|
-
<
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}"
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
421
|
+
<view
|
|
422
|
+
v-for="(row, rowIndex) in horizontalRows"
|
|
423
|
+
:key="`row-${rowIndex}`"
|
|
424
|
+
class="flex whitespace-nowrap"
|
|
425
|
+
style="padding: 0 12rpx"
|
|
426
|
+
>
|
|
427
|
+
<lcb-action-view
|
|
428
|
+
v-for="(item, index) in row"
|
|
429
|
+
:key="`${item?.productId}:${index}`"
|
|
430
|
+
custom-class="flex-shrink-0 w-fit !h-auto"
|
|
431
|
+
v-bind="item.link"
|
|
432
|
+
render-mode="view"
|
|
433
|
+
>
|
|
434
|
+
<view
|
|
435
|
+
:style="{
|
|
436
|
+
width: `${itemWidth}rpx`,
|
|
437
|
+
marginLeft: index === 0 ? 0 : `${gap}rpx`,
|
|
438
|
+
height: '100%',
|
|
439
|
+
}"
|
|
440
|
+
>
|
|
441
|
+
<slot name="item" :item="item">
|
|
442
|
+
<lcb-absolute-config-layout
|
|
443
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
444
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
445
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
446
|
+
:dataset="{
|
|
447
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
448
|
+
...item,
|
|
449
|
+
}"
|
|
450
|
+
/>
|
|
451
|
+
<lcb-product-item
|
|
452
|
+
v-else
|
|
453
|
+
className="h-full box-border"
|
|
454
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
455
|
+
:coverImgStyle="{
|
|
456
|
+
width:
|
|
457
|
+
layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
|
|
458
|
+
height:
|
|
459
|
+
layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
|
|
460
|
+
minHeight:
|
|
461
|
+
layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
|
|
462
|
+
borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
|
|
463
|
+
...(attrs?.coverImgStyle ?? {}),
|
|
464
|
+
}"
|
|
465
|
+
></lcb-product-item>
|
|
466
|
+
</slot>
|
|
467
|
+
</view>
|
|
468
|
+
</lcb-action-view>
|
|
469
|
+
</view>
|
|
432
470
|
</view>
|
|
433
|
-
</
|
|
471
|
+
</view>
|
|
434
472
|
</template>
|
|
435
473
|
</lcb-block>
|
|
436
474
|
</ProductSkeleton>
|
|
@@ -27,6 +27,7 @@ export interface LcbProductProps extends LcbBlockProps {
|
|
|
27
27
|
layoutType?: 'vertical' | 'horizontal' // 布局方式
|
|
28
28
|
titleLineClamp?: number
|
|
29
29
|
coverImgStyle?: Record<string, any>
|
|
30
|
+
headImgStyle?: Record<string, any>
|
|
30
31
|
filterList?: boolean
|
|
31
32
|
renderItemAbsoluteConfigLayout?: {
|
|
32
33
|
dataset?: Record<string, any>
|
|
@@ -45,4 +46,5 @@ export interface LcbProductProps extends LcbBlockProps {
|
|
|
45
46
|
borderMode?: 'full' | 'content'
|
|
46
47
|
itemVerticalPadding?: number
|
|
47
48
|
itemHorizontalPadding?: number
|
|
49
|
+
rows?: number // horizontal 模式下的行数,默认为 1
|
|
48
50
|
}
|
|
@@ -62,7 +62,6 @@ const style = computed(() => {
|
|
|
62
62
|
const fontSize = itemAttrs?.[`${props?.prop}FontSize`]
|
|
63
63
|
const fontWeight = itemAttrs?.[`${props?.prop}Bold`] === true ? 'bold' : 'normal'
|
|
64
64
|
const color = itemAttrs?.[`${props?.prop}Color`]
|
|
65
|
-
|
|
66
65
|
return {
|
|
67
66
|
fontSize: fontSize ? `${fontSize}rpx` : '',
|
|
68
67
|
fontWeight,
|
|
@@ -374,11 +373,12 @@ const coverImgWidth = computed(() => {
|
|
|
374
373
|
</slot>
|
|
375
374
|
|
|
376
375
|
<slot :value="value" v-else-if="prop === 'headImg'" name="headImg">
|
|
377
|
-
<img
|
|
378
|
-
:src="value
|
|
379
|
-
|
|
380
|
-
:
|
|
381
|
-
|
|
376
|
+
<wd-img
|
|
377
|
+
:src="value"
|
|
378
|
+
:width="style.width || 16"
|
|
379
|
+
:height="style.height || 16"
|
|
380
|
+
custom-class="block rounded-full"
|
|
381
|
+
:radius="style.borderRadius || 1000"
|
|
382
382
|
mode="aspectFill"
|
|
383
383
|
/>
|
|
384
384
|
</slot>
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
17
17
|
paddingVertical: number
|
|
18
18
|
sourceMode: number
|
|
19
19
|
gap: number
|
|
20
|
+
rows: number
|
|
20
21
|
}
|
|
21
22
|
>,
|
|
22
23
|
{
|
|
@@ -44,6 +45,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
44
45
|
paddingVertical: number
|
|
45
46
|
sourceMode: number
|
|
46
47
|
gap: number
|
|
48
|
+
rows: number
|
|
47
49
|
}
|
|
48
50
|
>
|
|
49
51
|
>
|
|
@@ -58,6 +60,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
58
60
|
listType: 'list' | 'horizontal' | 'grid' | 'waterfall'
|
|
59
61
|
titleLineClamp: number
|
|
60
62
|
sourceMode: 1 | 2
|
|
63
|
+
rows: number
|
|
61
64
|
},
|
|
62
65
|
{}
|
|
63
66
|
>
|
|
@@ -24,6 +24,7 @@ export interface LcbProductProps extends LcbBlockProps {
|
|
|
24
24
|
layoutType?: 'vertical' | 'horizontal'
|
|
25
25
|
titleLineClamp?: number
|
|
26
26
|
coverImgStyle?: Record<string, any>
|
|
27
|
+
headImgStyle?: Record<string, any>
|
|
27
28
|
filterList?: boolean
|
|
28
29
|
renderItemAbsoluteConfigLayout?: {
|
|
29
30
|
dataset?: Record<string, any>
|
|
@@ -41,4 +42,5 @@ export interface LcbProductProps extends LcbBlockProps {
|
|
|
41
42
|
borderMode?: 'full' | 'content'
|
|
42
43
|
itemVerticalPadding?: number
|
|
43
44
|
itemHorizontalPadding?: number
|
|
45
|
+
rows?: number
|
|
44
46
|
}
|