@tplc/business 0.2.66 → 0.2.68
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 +9 -0
- package/components/lcb-list/lcb-list.vue +6 -25
- package/components/lcb-list/types.ts +4 -1
- package/components/lcb-product/lcb-product.vue +10 -11
- package/components/lcb-product/types.ts +2 -0
- package/components/lcb-product-item/lcb-product-item.vue +15 -30
- package/components/lcb-product-item/types.ts +1 -1
- package/package.json +1 -1
- package/types/components/lcb-list/lcb-list.vue.d.ts +4 -1
- package/types/components/lcb-list/types.d.ts +4 -1
- package/types/components/lcb-product/lcb-product.vue.d.ts +2 -0
- package/types/components/lcb-product/types.d.ts +2 -0
- package/types/components/lcb-product-item/lcb-product-item.vue.d.ts +3 -0
- package/types/components/lcb-product-item/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.68](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.67...v0.2.68) (2025-01-05)
|
|
6
|
+
|
|
7
|
+
### [0.2.67](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.66...v0.2.67) (2025-01-05)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### ✨ Features | 新功能
|
|
11
|
+
|
|
12
|
+
* 新增配置 ([3f75c1f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3f75c1f75f1f86d1f5049700bef7af0b1d1185cd))
|
|
13
|
+
|
|
5
14
|
### [0.2.66](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.65...v0.2.66) (2025-01-05)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -25,46 +25,27 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<FilterList
|
|
28
|
-
v-bind="{ ...info.listInfo, listType, ...
|
|
28
|
+
v-bind="{ ...info.listInfo, listType, ...props }"
|
|
29
29
|
:autoHeight="!isSticky"
|
|
30
30
|
v-model="items"
|
|
31
31
|
v-if="mode === 'list'"
|
|
32
32
|
>
|
|
33
33
|
<slot name="list" :items="items" v-if="$slots.list" />
|
|
34
34
|
<template v-else>
|
|
35
|
-
<lcb-product
|
|
36
|
-
v-bind="{ ...attrs, form }"
|
|
37
|
-
:listType="listType"
|
|
38
|
-
:imageWidth="imageWidth"
|
|
39
|
-
:imageHeight="imageHeight"
|
|
40
|
-
:items="items"
|
|
41
|
-
:titleLineClamp="titleLineClamp"
|
|
42
|
-
:layoutType="layoutType"
|
|
43
|
-
v-if="$slots.item"
|
|
44
|
-
>
|
|
35
|
+
<lcb-product v-bind="{ ...$props, ...attrs, form }" :items="items" v-if="$slots.item">
|
|
45
36
|
<template #item="{ item }">
|
|
46
37
|
<slot name="item" :item="item"></slot>
|
|
47
38
|
</template>
|
|
48
39
|
</lcb-product>
|
|
49
|
-
<lcb-product
|
|
50
|
-
v-bind="{ ...attrs, form }"
|
|
51
|
-
:imageWidth="imageWidth"
|
|
52
|
-
:listType="listType"
|
|
53
|
-
:items="items"
|
|
54
|
-
:imageHeight="imageHeight"
|
|
55
|
-
:layoutType="layoutType"
|
|
56
|
-
:titleLineClamp="titleLineClamp"
|
|
57
|
-
v-else
|
|
58
|
-
/>
|
|
40
|
+
<lcb-product v-bind="{ ...$props, ...attrs, form }" :items="items" v-else />
|
|
59
41
|
</template>
|
|
60
42
|
</FilterList>
|
|
61
|
-
<lcb-map v-else-if="mode === 'map'" v-bind="{ ...info.listInfo, ...attrs }" />
|
|
43
|
+
<lcb-map v-else-if="mode === 'map'" v-bind="{ ...info.listInfo, ...$props, ...attrs }" />
|
|
62
44
|
</template>
|
|
63
|
-
<!-- <lcb-product v-bind="{ ...attrs }" :listType="listType" :items="mockData.data" v-else /> -->
|
|
64
45
|
</template>
|
|
65
46
|
|
|
66
47
|
<script setup lang="ts">
|
|
67
|
-
import { inject, Ref, ref,
|
|
48
|
+
import { inject, Ref, ref, watch, useAttrs } from 'vue'
|
|
68
49
|
import { getFilterDetail, LcbFilterResult } from './api'
|
|
69
50
|
import FilterList from './components/FilterList/index.vue'
|
|
70
51
|
import FilterView from './components/FilterView/index.vue'
|
|
@@ -87,7 +68,7 @@ const titleObj = ref<Record<string, any>>({})
|
|
|
87
68
|
const form = inject<Ref<Record<string, any>>>(FORM_KEY)
|
|
88
69
|
const props = withDefaults(defineProps<LcbListProps>(), {
|
|
89
70
|
pageFilterType: 'hotelTravelFilter',
|
|
90
|
-
|
|
71
|
+
borderRadius: 12,
|
|
91
72
|
styleMode: 'default',
|
|
92
73
|
listType: 'list',
|
|
93
74
|
isSticky: true,
|
|
@@ -4,15 +4,18 @@ import { LcbProductProps } from '../lcb-product/types'
|
|
|
4
4
|
export interface LcbListProps {
|
|
5
5
|
pageFilterType?: string
|
|
6
6
|
pageListProps?: PageListProps
|
|
7
|
-
|
|
7
|
+
borderRadius?: number
|
|
8
8
|
styleMode?: 'default' | 'plain'
|
|
9
9
|
imageWidth?: number
|
|
10
|
+
border?: boolean
|
|
10
11
|
imageHeight?: number
|
|
11
12
|
titleLineClamp?: number
|
|
12
13
|
listType?: LcbProductProps['listType']
|
|
13
14
|
isSticky?: boolean
|
|
14
15
|
mode?: 'map' | 'list'
|
|
15
16
|
layoutType?: 'vertical' | 'horizontal'
|
|
17
|
+
imageRadius?: number
|
|
18
|
+
itemWidth?: number // 列表项宽度
|
|
16
19
|
}
|
|
17
20
|
export interface Option {
|
|
18
21
|
label: string
|
|
@@ -4,7 +4,6 @@ import UWaterfall from 'uview-plus/components/u-waterfall/u-waterfall.vue'
|
|
|
4
4
|
import { LcbProductProps } from './types'
|
|
5
5
|
import { transformValueUnit } from '../../utils/transform'
|
|
6
6
|
|
|
7
|
-
const attrs = useAttrs()
|
|
8
7
|
const uWaterfallRef = ref()
|
|
9
8
|
defineOptions({
|
|
10
9
|
name: 'LcbProduct',
|
|
@@ -15,6 +14,7 @@ defineOptions({
|
|
|
15
14
|
styleIsolation: 'shared',
|
|
16
15
|
},
|
|
17
16
|
})
|
|
17
|
+
const attrs = useAttrs()
|
|
18
18
|
const props = withDefaults(defineProps<LcbProductProps>(), {
|
|
19
19
|
listType: 'list',
|
|
20
20
|
items: [],
|
|
@@ -55,16 +55,15 @@ watch(
|
|
|
55
55
|
/>
|
|
56
56
|
<lcb-product-item
|
|
57
57
|
v-else
|
|
58
|
-
v-bind="{ ...item, ...attrs }"
|
|
58
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
59
59
|
:layoutType="layoutType"
|
|
60
60
|
:coverImgStyle="{
|
|
61
61
|
width: layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
|
|
62
62
|
height: layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
|
|
63
63
|
minHeight: layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
|
|
64
64
|
borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
|
|
65
|
-
...(
|
|
65
|
+
...($props?.coverImgStyle ?? {}),
|
|
66
66
|
}"
|
|
67
|
-
:titleLineClamp="titleLineClamp"
|
|
68
67
|
></lcb-product-item>
|
|
69
68
|
</slot>
|
|
70
69
|
</lcb-action-view>
|
|
@@ -89,7 +88,7 @@ watch(
|
|
|
89
88
|
/>
|
|
90
89
|
<lcb-product-item
|
|
91
90
|
v-else
|
|
92
|
-
v-bind="{ ...item, ...attrs }"
|
|
91
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
93
92
|
layoutType="vertical"
|
|
94
93
|
:coverImgStyle="{
|
|
95
94
|
width: '100%',
|
|
@@ -97,7 +96,6 @@ watch(
|
|
|
97
96
|
borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
|
|
98
97
|
...(attrs?.coverImgStyle ?? {}),
|
|
99
98
|
}"
|
|
100
|
-
:titleLineClamp="titleLineClamp"
|
|
101
99
|
></lcb-product-item>
|
|
102
100
|
</slot>
|
|
103
101
|
</view>
|
|
@@ -126,10 +124,9 @@ watch(
|
|
|
126
124
|
/>
|
|
127
125
|
<lcb-product-item
|
|
128
126
|
v-else
|
|
129
|
-
v-bind="{ ...item, ...attrs }"
|
|
127
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
130
128
|
layoutType="vertical"
|
|
131
129
|
tag-overflow-wrap
|
|
132
|
-
:titleLineClamp="titleLineClamp"
|
|
133
130
|
>
|
|
134
131
|
<template #coverImg="{ value }">
|
|
135
132
|
<image :src="value" class="w-full" mode="widthFix" />
|
|
@@ -159,10 +156,9 @@ watch(
|
|
|
159
156
|
/>
|
|
160
157
|
<lcb-product-item
|
|
161
158
|
v-else
|
|
162
|
-
v-bind="{ ...item, ...attrs }"
|
|
159
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
163
160
|
layoutType="vertical"
|
|
164
161
|
tag-overflow-wrap
|
|
165
|
-
:titleLineClamp="titleLineClamp"
|
|
166
162
|
>
|
|
167
163
|
<template #coverImg="{ value }">
|
|
168
164
|
<image :src="value" class="w-full" mode="widthFix" />
|
|
@@ -181,7 +177,10 @@ watch(
|
|
|
181
177
|
v-for="(item, index) in items"
|
|
182
178
|
:key="`${item?.productId}:${index}`"
|
|
183
179
|
class="inline-block"
|
|
184
|
-
:style="{
|
|
180
|
+
:style="{
|
|
181
|
+
width: `${itemWidth}rpx`,
|
|
182
|
+
marginLeft: index === 0 ? 0 : '24rpx',
|
|
183
|
+
}"
|
|
185
184
|
>
|
|
186
185
|
<slot name="item" :item="item">
|
|
187
186
|
<lcb-absolute-config-layout
|
|
@@ -4,11 +4,13 @@ export interface LcbProductProps {
|
|
|
4
4
|
imageWidth?: number
|
|
5
5
|
imageHeight?: number
|
|
6
6
|
imageRadius?: number
|
|
7
|
+
borderRadius?: number
|
|
7
8
|
itemWidth?: number // 列表项宽度
|
|
8
9
|
items?: Record<string, any>[]
|
|
9
10
|
form?: Record<string, any>
|
|
10
11
|
layoutType?: 'vertical' | 'horizontal' // 布局方式
|
|
11
12
|
titleLineClamp?: number
|
|
13
|
+
coverImgStyle?: Record<string, any>
|
|
12
14
|
renderItemAbsoluteConfigLayout?: {
|
|
13
15
|
dataset?: Record<string, any>
|
|
14
16
|
blocks: any[]
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { provide, useAttrs } from 'vue'
|
|
3
3
|
import { LcbProductItemProps } from './types'
|
|
4
4
|
import ItemValue from './components/ItemValue.vue'
|
|
5
|
+
import { transformValueUnit } from '../../utils/transform'
|
|
5
6
|
defineOptions({
|
|
6
7
|
name: 'LcbProductItem',
|
|
7
8
|
options: {
|
|
@@ -46,6 +47,7 @@ const props = withDefaults(defineProps<LcbProductItemProps>(), {
|
|
|
46
47
|
tagsVisible: true,
|
|
47
48
|
addressIntroVisible: true,
|
|
48
49
|
distanceVisible: true,
|
|
50
|
+
borderRadius: 12,
|
|
49
51
|
})
|
|
50
52
|
const attrs = useAttrs()
|
|
51
53
|
provide('lcb-product-item-props', props)
|
|
@@ -93,7 +95,10 @@ defineSlots<{
|
|
|
93
95
|
<view
|
|
94
96
|
v-if="layoutType === 'horizontal'"
|
|
95
97
|
:class="className"
|
|
96
|
-
class="flex flex-col gap-1 px-2 py-3 bg-white relative"
|
|
98
|
+
class="flex flex-col gap-1 px-2 py-3 bg-white relative overflow-clip"
|
|
99
|
+
:style="{
|
|
100
|
+
borderRadius: transformValueUnit(borderRadius),
|
|
101
|
+
}"
|
|
97
102
|
>
|
|
98
103
|
<slot name="itemSection" />
|
|
99
104
|
<slot name="itemTopSection" />
|
|
@@ -123,33 +128,6 @@ defineSlots<{
|
|
|
123
128
|
<view class="flex flex-col flex-1 text-26rpx overflow-hidden relative">
|
|
124
129
|
<slot name="contentSection" />
|
|
125
130
|
<view class="flex flex-col gap-[5px] overflow-hidden">
|
|
126
|
-
<!-- <template
|
|
127
|
-
v-for="propName in ['productName', 'subTitle', 'addressIntro', 'distance', 'tags']"
|
|
128
|
-
:key="propName"
|
|
129
|
-
>
|
|
130
|
-
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
131
|
-
<template #coverImg="{ value }"><slot name="coverImg" :value="value" /></template>
|
|
132
|
-
<template #productName="{ value }"><slot name="productName" :value="value" /></template>
|
|
133
|
-
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
134
|
-
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
135
|
-
<template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
|
|
136
|
-
<template #priceSuffix="{ value }">
|
|
137
|
-
<slot name="priceSuffix" :value="value" />
|
|
138
|
-
</template>
|
|
139
|
-
<template #scribePrice="{ value }">
|
|
140
|
-
<slot name="scribePrice" :value="value" />
|
|
141
|
-
</template>
|
|
142
|
-
<template #scribePriceUnit="{ value }">
|
|
143
|
-
<slot name="scribePriceUnit" :value="value" />
|
|
144
|
-
</template>
|
|
145
|
-
<template #tags="{ value }"><slot name="tags" :value="value" /></template>
|
|
146
|
-
<template #addressIntro="{ value }">
|
|
147
|
-
<slot name="addressIntro" :value="value" />
|
|
148
|
-
</template>
|
|
149
|
-
<template #distance="{ value }"><slot name="distance" :value="value" /></template>
|
|
150
|
-
</ItemValue>
|
|
151
|
-
<ItemValue :prop="propName" v-else />
|
|
152
|
-
</template> -->
|
|
153
131
|
<view class="text-ellipsis line-clamp-2">
|
|
154
132
|
<ItemValue prop="productName">
|
|
155
133
|
<!-- <template #productName="{ value }"><slot name="productName" :value="value" /></template> -->
|
|
@@ -257,7 +235,14 @@ defineSlots<{
|
|
|
257
235
|
</view>
|
|
258
236
|
|
|
259
237
|
<!-- 竖向布局 -->
|
|
260
|
-
<view
|
|
238
|
+
<view
|
|
239
|
+
v-if="layoutType === 'vertical'"
|
|
240
|
+
class="flex bg-white relative overflow-hidden"
|
|
241
|
+
:class="className"
|
|
242
|
+
:style="{
|
|
243
|
+
borderRadius: transformValueUnit(borderRadius),
|
|
244
|
+
}"
|
|
245
|
+
>
|
|
261
246
|
<slot name="itemSection" />
|
|
262
247
|
<slot name="itemLeftSection" />
|
|
263
248
|
<view class="flex-1 flex flex-col w-full overflow-hidden">
|
package/package.json
CHANGED
|
@@ -20,16 +20,19 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
20
20
|
>,
|
|
21
21
|
{
|
|
22
22
|
mode: 'map' | 'list'
|
|
23
|
+
imageRadius: number
|
|
23
24
|
imageWidth: number
|
|
25
|
+
borderRadius: number
|
|
24
26
|
imageHeight: number
|
|
25
27
|
listType: 'list' | 'horizontal' | 'grid' | 'waterfall'
|
|
26
28
|
pageFilterType: string
|
|
27
29
|
pageListProps: import('./components/FilterList/type').PageListProps
|
|
28
|
-
border: boolean
|
|
29
30
|
styleMode: 'default' | 'plain'
|
|
31
|
+
border: boolean
|
|
30
32
|
titleLineClamp: number
|
|
31
33
|
isSticky: boolean
|
|
32
34
|
layoutType: 'vertical' | 'horizontal'
|
|
35
|
+
itemWidth: number
|
|
33
36
|
},
|
|
34
37
|
{}
|
|
35
38
|
>
|
|
@@ -3,15 +3,18 @@ import { LcbProductProps } from '../lcb-product/types'
|
|
|
3
3
|
export interface LcbListProps {
|
|
4
4
|
pageFilterType?: string
|
|
5
5
|
pageListProps?: PageListProps
|
|
6
|
-
|
|
6
|
+
borderRadius?: number
|
|
7
7
|
styleMode?: 'default' | 'plain'
|
|
8
8
|
imageWidth?: number
|
|
9
|
+
border?: boolean
|
|
9
10
|
imageHeight?: number
|
|
10
11
|
titleLineClamp?: number
|
|
11
12
|
listType?: LcbProductProps['listType']
|
|
12
13
|
isSticky?: boolean
|
|
13
14
|
mode?: 'map' | 'list'
|
|
14
15
|
layoutType?: 'vertical' | 'horizontal'
|
|
16
|
+
imageRadius?: number
|
|
17
|
+
itemWidth?: number
|
|
15
18
|
}
|
|
16
19
|
export interface Option {
|
|
17
20
|
label: string
|
|
@@ -25,11 +25,13 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
25
25
|
imageRadius: number
|
|
26
26
|
items: Record<string, any>[]
|
|
27
27
|
imageWidth: number
|
|
28
|
+
borderRadius: number
|
|
28
29
|
imageHeight: number
|
|
29
30
|
listType: 'list' | 'horizontal' | 'grid' | 'waterfall'
|
|
30
31
|
titleLineClamp: number
|
|
31
32
|
layoutType: 'vertical' | 'horizontal'
|
|
32
33
|
itemWidth: number
|
|
34
|
+
coverImgStyle: Record<string, any>
|
|
33
35
|
renderItemAbsoluteConfigLayout: {
|
|
34
36
|
dataset?: Record<string, any>
|
|
35
37
|
blocks: any[]
|
|
@@ -3,11 +3,13 @@ export interface LcbProductProps {
|
|
|
3
3
|
imageWidth?: number
|
|
4
4
|
imageHeight?: number
|
|
5
5
|
imageRadius?: number
|
|
6
|
+
borderRadius?: number
|
|
6
7
|
itemWidth?: number
|
|
7
8
|
items?: Record<string, any>[]
|
|
8
9
|
form?: Record<string, any>
|
|
9
10
|
layoutType?: 'vertical' | 'horizontal'
|
|
10
11
|
titleLineClamp?: number
|
|
12
|
+
coverImgStyle?: Record<string, any>
|
|
11
13
|
renderItemAbsoluteConfigLayout?: {
|
|
12
14
|
dataset?: Record<string, any>
|
|
13
15
|
blocks: any[]
|
|
@@ -99,6 +99,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
99
99
|
tagsVisible: boolean
|
|
100
100
|
addressIntroVisible: boolean
|
|
101
101
|
distanceVisible: boolean
|
|
102
|
+
borderRadius: number
|
|
102
103
|
}
|
|
103
104
|
>,
|
|
104
105
|
{},
|
|
@@ -148,11 +149,13 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
148
149
|
tagsVisible: boolean
|
|
149
150
|
addressIntroVisible: boolean
|
|
150
151
|
distanceVisible: boolean
|
|
152
|
+
borderRadius: number
|
|
151
153
|
}
|
|
152
154
|
>
|
|
153
155
|
>
|
|
154
156
|
>,
|
|
155
157
|
{
|
|
158
|
+
borderRadius: number
|
|
156
159
|
titleLineClamp: number
|
|
157
160
|
layoutType: 'vertical' | 'horizontal'
|
|
158
161
|
tagOverflowWrap: boolean
|