@tplc/business 0.2.28 → 0.2.29
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 +30 -0
- package/components/lcb-action-view/lcb-action-view.vue +3 -2
- package/components/lcb-action-view/types.ts +2 -2
- package/components/lcb-list/components/FilterList/index.vue +18 -5
- package/components/lcb-product/lcb-product.vue +8 -8
- package/components/lcb-product-item/components/ItemValue.vue +118 -27
- package/components/lcb-product-item/lcb-product-item.vue +255 -174
- package/components/lcb-product-item/readme.md +4 -4
- package/components/lcb-product-item/types.ts +56 -20
- package/package.json +1 -1
- package/types/components/lcb-action-view/types.d.ts +2 -2
- package/types/components/lcb-product-item/components/ItemValue.vue.d.ts +26 -10
- package/types/components/lcb-product-item/lcb-product-item.vue.d.ts +75 -30
- package/types/components/lcb-product-item/types.d.ts +56 -20
|
@@ -23,44 +23,62 @@ const props = withDefaults(defineProps<LcbProductItemProps>(), {
|
|
|
23
23
|
distanceUnit: 'km',
|
|
24
24
|
|
|
25
25
|
priceUnit: '¥',
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
scribePriceUnit: '¥',
|
|
27
|
+
coverImgVisible: true,
|
|
28
28
|
titleVisible: true,
|
|
29
|
-
subTitleVisible:
|
|
29
|
+
subTitleVisible: true,
|
|
30
30
|
priceVisible: true,
|
|
31
|
+
priceTipsVisible: true,
|
|
31
32
|
priceUnitVisible: true,
|
|
32
33
|
priceSuffixVisible: true,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
scribePriceVisible: true,
|
|
35
|
+
scribePriceUnitVisible: true,
|
|
36
|
+
scribePriceSuffixVisible: true,
|
|
37
|
+
scoreVisible: true,
|
|
38
|
+
scoreTipsVisible: true,
|
|
39
|
+
levelVisible: true,
|
|
40
|
+
imgCornerIconVisible: true,
|
|
41
|
+
imgBottomIconVisible: true,
|
|
42
|
+
titleIconVisible: true,
|
|
43
|
+
userInteractionInfoVisible: true,
|
|
44
|
+
orderTipsVisible: true,
|
|
36
45
|
tagsVisible: true,
|
|
37
|
-
|
|
38
|
-
distanceVisible:
|
|
46
|
+
addressIntroVisible: true,
|
|
47
|
+
distanceVisible: true,
|
|
39
48
|
})
|
|
40
49
|
const attrs = useAttrs()
|
|
41
50
|
|
|
42
51
|
provide('lcb-product-item-props', props)
|
|
43
52
|
|
|
44
53
|
defineSlots<{
|
|
45
|
-
|
|
54
|
+
coverImg(props: { value: any }): any
|
|
46
55
|
title(props: { value: any }): any
|
|
47
56
|
subTitle(props: { value: any }): any
|
|
48
57
|
price(props: { value: any }): any
|
|
49
58
|
priceUnit(props: { value: any }): any
|
|
50
59
|
priceSuffix(props: { value: any }): any
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
60
|
+
scribePrice(props: { value: any }): any
|
|
61
|
+
scribePriceUnit(props: { value: any }): any
|
|
62
|
+
scribePriceSuffix(props: { value: any }): any
|
|
54
63
|
tags(props: { value: any }): any
|
|
55
|
-
|
|
64
|
+
addressIntro(props: { value: any }): any
|
|
56
65
|
distance(props: { value: any }): any
|
|
66
|
+
score(props: { value: any }): any
|
|
67
|
+
scoreTips(props: { value: any }): any
|
|
68
|
+
level(props: { value: any }): any
|
|
69
|
+
imgCornerIcon(props: { value: any }): any
|
|
70
|
+
imgBottomIcon(props: { value: any }): any
|
|
71
|
+
titleIcon(props: { value: any }): any
|
|
72
|
+
userInteractionInfo(props: { value: any }): any
|
|
73
|
+
orderTips(props: { value: any }): any
|
|
74
|
+
priceTips(props: { value: any }): any
|
|
57
75
|
|
|
58
76
|
itemSection(): any
|
|
59
77
|
itemTopSection(): any
|
|
60
78
|
itemBottomSection(): any
|
|
61
79
|
itemLeftSection(): any
|
|
62
80
|
itemRightSection(): any
|
|
63
|
-
|
|
81
|
+
coverImgSection(): any
|
|
64
82
|
contentSection(): any
|
|
65
83
|
}>()
|
|
66
84
|
|
|
@@ -79,35 +97,35 @@ defineSlots<{
|
|
|
79
97
|
<view class="flex gap-2">
|
|
80
98
|
<slot name="itemLeftSection" />
|
|
81
99
|
<ItemValue
|
|
82
|
-
v-if="!!$slots?.['
|
|
83
|
-
prop="
|
|
84
|
-
className="w-1/3 h-
|
|
100
|
+
v-if="!!$slots?.['coverImg']"
|
|
101
|
+
prop="coverImg"
|
|
102
|
+
className="w-1/3 h-[360rpx] bg-gray-100 rounded-sm overflow-hidden relative"
|
|
85
103
|
>
|
|
86
104
|
<template #default>
|
|
87
|
-
<slot name="
|
|
105
|
+
<slot name="coverImgSection" />
|
|
88
106
|
</template>
|
|
89
|
-
<template #
|
|
90
|
-
<slot name="
|
|
107
|
+
<template #coverImg="{ value }">
|
|
108
|
+
<slot name="coverImg" :value="value" />
|
|
91
109
|
</template>
|
|
92
110
|
</ItemValue>
|
|
93
111
|
<ItemValue
|
|
94
112
|
v-else
|
|
95
|
-
prop="
|
|
96
|
-
className="w-1/3 h-
|
|
113
|
+
prop="coverImg"
|
|
114
|
+
className="w-1/3 h-[360rpx] bg-gray-100 rounded-sm overflow-hidden relative"
|
|
97
115
|
>
|
|
98
116
|
<template #default>
|
|
99
|
-
<slot name="
|
|
117
|
+
<slot name="coverImgSection" />
|
|
100
118
|
</template>
|
|
101
119
|
</ItemValue>
|
|
102
|
-
<view class="flex flex-col flex-1
|
|
120
|
+
<view class="flex flex-col flex-1 justify-between text-26rpx overflow-hidden relative">
|
|
103
121
|
<slot name="contentSection" />
|
|
104
|
-
<view class="flex flex-col gap-
|
|
105
|
-
<template
|
|
106
|
-
v-for="propName in ['title', 'subTitle', '
|
|
122
|
+
<view class="flex flex-col gap-[5px] overflow-hidden">
|
|
123
|
+
<!-- <template
|
|
124
|
+
v-for="propName in ['title', 'subTitle', 'addressIntro', 'distance', 'tags']"
|
|
107
125
|
:key="propName"
|
|
108
126
|
>
|
|
109
127
|
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
110
|
-
<template #
|
|
128
|
+
<template #coverImg="{ value }"><slot name="coverImg" :value="value" /></template>
|
|
111
129
|
<template #title="{ value }"><slot name="title" :value="value" /></template>
|
|
112
130
|
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
113
131
|
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
@@ -115,82 +133,115 @@ defineSlots<{
|
|
|
115
133
|
<template #priceSuffix="{ value }">
|
|
116
134
|
<slot name="priceSuffix" :value="value" />
|
|
117
135
|
</template>
|
|
118
|
-
<template #
|
|
119
|
-
<slot name="
|
|
136
|
+
<template #scribePrice="{ value }">
|
|
137
|
+
<slot name="scribePrice" :value="value" />
|
|
120
138
|
</template>
|
|
121
|
-
<template #
|
|
122
|
-
<slot name="
|
|
139
|
+
<template #scribePriceUnit="{ value }">
|
|
140
|
+
<slot name="scribePriceUnit" :value="value" />
|
|
123
141
|
</template>
|
|
124
142
|
<template #tags="{ value }"><slot name="tags" :value="value" /></template>
|
|
125
|
-
<template #
|
|
143
|
+
<template #addressIntro="{ value }">
|
|
144
|
+
<slot name="addressIntro" :value="value" />
|
|
145
|
+
</template>
|
|
126
146
|
<template #distance="{ value }"><slot name="distance" :value="value" /></template>
|
|
127
147
|
</ItemValue>
|
|
128
148
|
<ItemValue :prop="propName" v-else />
|
|
129
|
-
</template>
|
|
130
|
-
|
|
149
|
+
</template> -->
|
|
150
|
+
<view class="text-ellipsis line-clamp-2">
|
|
151
|
+
<ItemValue prop="title">
|
|
152
|
+
<template #title="{ value }"><slot name="title" :value="value" /></template>
|
|
153
|
+
</ItemValue>
|
|
154
|
+
<ItemValue prop="level">
|
|
155
|
+
<template #level="{ value }"><slot name="level" :value="value" /></template>
|
|
156
|
+
</ItemValue>
|
|
157
|
+
<ItemValue prop="titleIcon">
|
|
158
|
+
<template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template>
|
|
159
|
+
</ItemValue>
|
|
160
|
+
</view>
|
|
131
161
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<slot name="priceSuffix" :value="value" />
|
|
145
|
-
</template>
|
|
146
|
-
<template #originPrice="{ value }">
|
|
147
|
-
<slot name="originPrice" :value="value" />
|
|
148
|
-
</template>
|
|
149
|
-
<template #originPriceUnit="{ value }">
|
|
150
|
-
<slot name="originPriceUnit" :value="value" />
|
|
151
|
-
</template>
|
|
152
|
-
<template #tags="{ value }"><slot name="tags" :value="value" /></template>
|
|
153
|
-
<template #location="{ value }"><slot name="location" :value="value" /></template>
|
|
154
|
-
<template #distance="{ value }"><slot name="distance" :value="value" /></template>
|
|
155
|
-
</ItemValue>
|
|
156
|
-
<ItemValue :prop="propName" v-else />
|
|
157
|
-
</template>
|
|
162
|
+
<view className="flex gap-1 items-center">
|
|
163
|
+
<ItemValue prop="score">
|
|
164
|
+
<template #score="{ value }"><slot name="score" :value="value" /></template>
|
|
165
|
+
</ItemValue>
|
|
166
|
+
<ItemValue prop="scoreTips">
|
|
167
|
+
<template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template>
|
|
168
|
+
</ItemValue>
|
|
169
|
+
<ItemValue prop="userInteractionInfo">
|
|
170
|
+
<template #userInteractionInfo="{ value }">
|
|
171
|
+
<slot name="userInteractionInfo" :value="value" />
|
|
172
|
+
</template>
|
|
173
|
+
</ItemValue>
|
|
158
174
|
</view>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
<template #originPriceUnit="{ value }">
|
|
182
|
-
<slot name="originPriceUnit" :value="value" />
|
|
183
|
-
</template>
|
|
184
|
-
<template #originPriceSuffix="{ value }">
|
|
185
|
-
<slot name="originPriceSuffix" :value="value" />
|
|
186
|
-
</template>
|
|
187
|
-
<template #tags="{ value }"><slot name="tags" :value="value" /></template>
|
|
188
|
-
<template #location="{ value }"><slot name="location" :value="value" /></template>
|
|
189
|
-
<template #distance="{ value }"><slot name="distance" :value="value" /></template>
|
|
190
|
-
</ItemValue>
|
|
191
|
-
<ItemValue :prop="propName" v-else />
|
|
175
|
+
|
|
176
|
+
<ItemValue prop="addressIntro">
|
|
177
|
+
<template #addressIntro="{ value }">
|
|
178
|
+
<slot name="addressIntro" :value="value" />
|
|
179
|
+
</template>
|
|
180
|
+
</ItemValue>
|
|
181
|
+
|
|
182
|
+
<ItemValue prop="subTitle">
|
|
183
|
+
<template #subTitle="{ value }">
|
|
184
|
+
<slot name="subTitle" :value="value" />
|
|
185
|
+
</template>
|
|
186
|
+
</ItemValue>
|
|
187
|
+
|
|
188
|
+
<ItemValue prop="tags">
|
|
189
|
+
<template #tags="{ value }">
|
|
190
|
+
<slot name="tags" :value="value" />
|
|
191
|
+
</template>
|
|
192
|
+
</ItemValue>
|
|
193
|
+
|
|
194
|
+
<ItemValue prop="orderTips">
|
|
195
|
+
<template #orderTips="{ value }">
|
|
196
|
+
<slot name="orderTips" :value="value" />
|
|
192
197
|
</template>
|
|
198
|
+
</ItemValue>
|
|
199
|
+
</view>
|
|
200
|
+
|
|
201
|
+
<view class="flex flex-col gap-1 items-end">
|
|
202
|
+
<view class="flex gap-1 justify-end">
|
|
203
|
+
<view
|
|
204
|
+
class="flex gap-[2rpx] items-end line-through"
|
|
205
|
+
v-if="scribePriceVisible && isNumber(scribePrice)"
|
|
206
|
+
>
|
|
207
|
+
<template
|
|
208
|
+
v-for="propName in ['scribePriceUnit', 'scribePrice', 'scribePriceSuffix']"
|
|
209
|
+
:key="propName"
|
|
210
|
+
>
|
|
211
|
+
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
212
|
+
<template #scribePrice="{ value }">
|
|
213
|
+
<slot name="scribePrice" :value="value" />
|
|
214
|
+
</template>
|
|
215
|
+
<template #scribePriceUnit="{ value }">
|
|
216
|
+
<slot name="scribePriceUnit" :value="value" />
|
|
217
|
+
</template>
|
|
218
|
+
<template #scribePriceSuffix="{ value }">
|
|
219
|
+
<slot name="scribePriceSuffix" :value="value" />
|
|
220
|
+
</template>
|
|
221
|
+
</ItemValue>
|
|
222
|
+
<ItemValue :prop="propName" v-else />
|
|
223
|
+
</template>
|
|
224
|
+
</view>
|
|
225
|
+
<view class="flex gap-[4rpx] items-end" v-if="priceVisible && isNumber(price)">
|
|
226
|
+
<template v-for="propName in ['priceUnit', 'price', 'priceSuffix']" :key="propName">
|
|
227
|
+
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
228
|
+
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
229
|
+
<template #priceUnit="{ value }">
|
|
230
|
+
<slot name="priceUnit" :value="value" />
|
|
231
|
+
</template>
|
|
232
|
+
<template #priceSuffix="{ value }">
|
|
233
|
+
<slot name="priceSuffix" :value="value" />
|
|
234
|
+
</template>
|
|
235
|
+
</ItemValue>
|
|
236
|
+
<ItemValue :prop="propName" v-else />
|
|
237
|
+
</template>
|
|
238
|
+
</view>
|
|
193
239
|
</view>
|
|
240
|
+
<ItemValue prop="priceTips">
|
|
241
|
+
<template #priceTips="{ value }">
|
|
242
|
+
<slot name="priceTips" :value="value" />
|
|
243
|
+
</template>
|
|
244
|
+
</ItemValue>
|
|
194
245
|
</view>
|
|
195
246
|
</view>
|
|
196
247
|
<slot name="itemRightSection" />
|
|
@@ -204,31 +255,28 @@ defineSlots<{
|
|
|
204
255
|
<slot name="itemLeftSection" />
|
|
205
256
|
<view class="flex-1 flex flex-col w-full overflow-hidden">
|
|
206
257
|
<slot name="itemTopSection" />
|
|
207
|
-
<ItemValue v-if="!!$slots?.['
|
|
258
|
+
<ItemValue v-if="!!$slots?.['coverImg']" prop="coverImg" className="overflow-hidden relative">
|
|
208
259
|
<template #default>
|
|
209
|
-
<slot name="
|
|
260
|
+
<slot name="coverImgSection" />
|
|
210
261
|
</template>
|
|
211
|
-
<template #
|
|
212
|
-
<slot name="
|
|
262
|
+
<template #coverImg="{ value }">
|
|
263
|
+
<slot name="coverImg" :value="value" />
|
|
213
264
|
</template>
|
|
214
265
|
</ItemValue>
|
|
215
|
-
<ItemValue v-else prop="
|
|
266
|
+
<ItemValue v-else prop="coverImg" className="overflow-hidden relative">
|
|
216
267
|
<template #default>
|
|
217
|
-
<slot name="
|
|
268
|
+
<slot name="coverImgSection" />
|
|
218
269
|
</template>
|
|
219
270
|
</ItemValue>
|
|
220
|
-
<view
|
|
221
|
-
:class="'p-2'"
|
|
222
|
-
class="flex flex-col flex-1 gap-2 justify-between text-26rpx overflow-hidden relative"
|
|
223
|
-
>
|
|
271
|
+
<view class="p-2 flex flex-col flex-1 justify-between text-26rpx overflow-hidden relative">
|
|
224
272
|
<slot name="contentSection" />
|
|
225
|
-
<view class="flex flex-col gap-
|
|
226
|
-
<template
|
|
227
|
-
v-for="propName in ['title', 'subTitle', '
|
|
273
|
+
<view class="flex flex-col gap-[5px] overflow-hidden">
|
|
274
|
+
<!-- <template
|
|
275
|
+
v-for="propName in ['title', 'subTitle', 'addressIntro', 'distance', 'tags']"
|
|
228
276
|
:key="propName"
|
|
229
277
|
>
|
|
230
278
|
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
231
|
-
<template #
|
|
279
|
+
<template #coverImg="{ value }"><slot name="coverImg" :value="value" /></template>
|
|
232
280
|
<template #title="{ value }"><slot name="title" :value="value" /></template>
|
|
233
281
|
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
234
282
|
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
@@ -236,82 +284,115 @@ defineSlots<{
|
|
|
236
284
|
<template #priceSuffix="{ value }">
|
|
237
285
|
<slot name="priceSuffix" :value="value" />
|
|
238
286
|
</template>
|
|
239
|
-
<template #
|
|
240
|
-
<slot name="
|
|
287
|
+
<template #scribePrice="{ value }">
|
|
288
|
+
<slot name="scribePrice" :value="value" />
|
|
241
289
|
</template>
|
|
242
|
-
<template #
|
|
243
|
-
<slot name="
|
|
290
|
+
<template #scribePriceUnit="{ value }">
|
|
291
|
+
<slot name="scribePriceUnit" :value="value" />
|
|
244
292
|
</template>
|
|
245
293
|
<template #tags="{ value }"><slot name="tags" :value="value" /></template>
|
|
246
|
-
<template #
|
|
294
|
+
<template #addressIntro="{ value }">
|
|
295
|
+
<slot name="addressIntro" :value="value" />
|
|
296
|
+
</template>
|
|
247
297
|
<template #distance="{ value }"><slot name="distance" :value="value" /></template>
|
|
248
298
|
</ItemValue>
|
|
249
299
|
<ItemValue :prop="propName" v-else />
|
|
250
|
-
</template>
|
|
251
|
-
|
|
300
|
+
</template> -->
|
|
301
|
+
<view class="text-ellipsis line-clamp-2">
|
|
302
|
+
<ItemValue prop="title">
|
|
303
|
+
<template #title="{ value }"><slot name="title" :value="value" /></template>
|
|
304
|
+
</ItemValue>
|
|
305
|
+
<ItemValue prop="level">
|
|
306
|
+
<template #level="{ value }"><slot name="level" :value="value" /></template>
|
|
307
|
+
</ItemValue>
|
|
308
|
+
<ItemValue prop="titleIcon">
|
|
309
|
+
<template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template>
|
|
310
|
+
</ItemValue>
|
|
311
|
+
</view>
|
|
252
312
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
<slot name="priceSuffix" :value="value" />
|
|
266
|
-
</template>
|
|
267
|
-
<template #originPrice="{ value }">
|
|
268
|
-
<slot name="originPrice" :value="value" />
|
|
269
|
-
</template>
|
|
270
|
-
<template #originPriceUnit="{ value }">
|
|
271
|
-
<slot name="originPriceUnit" :value="value" />
|
|
272
|
-
</template>
|
|
273
|
-
<template #tags="{ value }"><slot name="tags" :value="value" /></template>
|
|
274
|
-
<template #location="{ value }"><slot name="location" :value="value" /></template>
|
|
275
|
-
<template #distance="{ value }"><slot name="distance" :value="value" /></template>
|
|
276
|
-
</ItemValue>
|
|
277
|
-
<ItemValue :prop="propName" v-else />
|
|
278
|
-
</template>
|
|
313
|
+
<view className="flex gap-1 items-center">
|
|
314
|
+
<ItemValue prop="score">
|
|
315
|
+
<template #score="{ value }"><slot name="score" :value="value" /></template>
|
|
316
|
+
</ItemValue>
|
|
317
|
+
<ItemValue prop="scoreTips">
|
|
318
|
+
<template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template>
|
|
319
|
+
</ItemValue>
|
|
320
|
+
<ItemValue prop="userInteractionInfo">
|
|
321
|
+
<template #userInteractionInfo="{ value }">
|
|
322
|
+
<slot name="userInteractionInfo" :value="value" />
|
|
323
|
+
</template>
|
|
324
|
+
</ItemValue>
|
|
279
325
|
</view>
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
<template #originPriceUnit="{ value }">
|
|
303
|
-
<slot name="originPriceUnit" :value="value" />
|
|
304
|
-
</template>
|
|
305
|
-
<template #originPriceSuffix="{ value }">
|
|
306
|
-
<slot name="originPriceSuffix" :value="value" />
|
|
307
|
-
</template>
|
|
308
|
-
<template #tags="{ value }"><slot name="tags" :value="value" /></template>
|
|
309
|
-
<template #location="{ value }"><slot name="location" :value="value" /></template>
|
|
310
|
-
<template #distance="{ value }"><slot name="distance" :value="value" /></template>
|
|
311
|
-
</ItemValue>
|
|
312
|
-
<ItemValue :prop="propName" v-else />
|
|
326
|
+
|
|
327
|
+
<ItemValue prop="addressIntro">
|
|
328
|
+
<template #addressIntro="{ value }">
|
|
329
|
+
<slot name="addressIntro" :value="value" />
|
|
330
|
+
</template>
|
|
331
|
+
</ItemValue>
|
|
332
|
+
|
|
333
|
+
<ItemValue prop="subTitle">
|
|
334
|
+
<template #subTitle="{ value }">
|
|
335
|
+
<slot name="subTitle" :value="value" />
|
|
336
|
+
</template>
|
|
337
|
+
</ItemValue>
|
|
338
|
+
|
|
339
|
+
<ItemValue prop="tags">
|
|
340
|
+
<template #tags="{ value }">
|
|
341
|
+
<slot name="tags" :value="value" />
|
|
342
|
+
</template>
|
|
343
|
+
</ItemValue>
|
|
344
|
+
|
|
345
|
+
<ItemValue prop="orderTips">
|
|
346
|
+
<template #orderTips="{ value }">
|
|
347
|
+
<slot name="orderTips" :value="value" />
|
|
313
348
|
</template>
|
|
349
|
+
</ItemValue>
|
|
350
|
+
</view>
|
|
351
|
+
|
|
352
|
+
<view class="flex flex-col gap-1 items-end">
|
|
353
|
+
<view class="flex gap-1 justify-end">
|
|
354
|
+
<view
|
|
355
|
+
class="flex gap-[2rpx] items-end line-through"
|
|
356
|
+
v-if="scribePriceVisible && isNumber(scribePrice)"
|
|
357
|
+
>
|
|
358
|
+
<template
|
|
359
|
+
v-for="propName in ['scribePriceUnit', 'scribePrice', 'scribePriceSuffix']"
|
|
360
|
+
:key="propName"
|
|
361
|
+
>
|
|
362
|
+
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
363
|
+
<template #scribePrice="{ value }">
|
|
364
|
+
<slot name="scribePrice" :value="value" />
|
|
365
|
+
</template>
|
|
366
|
+
<template #scribePriceUnit="{ value }">
|
|
367
|
+
<slot name="scribePriceUnit" :value="value" />
|
|
368
|
+
</template>
|
|
369
|
+
<template #scribePriceSuffix="{ value }">
|
|
370
|
+
<slot name="scribePriceSuffix" :value="value" />
|
|
371
|
+
</template>
|
|
372
|
+
</ItemValue>
|
|
373
|
+
<ItemValue :prop="propName" v-else />
|
|
374
|
+
</template>
|
|
375
|
+
</view>
|
|
376
|
+
<view class="flex gap-[4rpx] items-end" v-if="priceVisible && isNumber(price)">
|
|
377
|
+
<template v-for="propName in ['priceUnit', 'price', 'priceSuffix']" :key="propName">
|
|
378
|
+
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
379
|
+
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
380
|
+
<template #priceUnit="{ value }">
|
|
381
|
+
<slot name="priceUnit" :value="value" />
|
|
382
|
+
</template>
|
|
383
|
+
<template #priceSuffix="{ value }">
|
|
384
|
+
<slot name="priceSuffix" :value="value" />
|
|
385
|
+
</template>
|
|
386
|
+
</ItemValue>
|
|
387
|
+
<ItemValue :prop="propName" v-else />
|
|
388
|
+
</template>
|
|
389
|
+
</view>
|
|
314
390
|
</view>
|
|
391
|
+
<ItemValue prop="priceTips">
|
|
392
|
+
<template #priceTips="{ value }">
|
|
393
|
+
<slot name="priceTips" :value="value" />
|
|
394
|
+
</template>
|
|
395
|
+
</ItemValue>
|
|
315
396
|
</view>
|
|
316
397
|
</view>
|
|
317
398
|
<slot name="itemBottomSection" />
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
layoutType
|
|
7
|
-
|
|
7
|
+
coverImg
|
|
8
8
|
title
|
|
9
9
|
subTitle
|
|
10
10
|
price
|
|
11
11
|
priceUnit
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
scribePrice
|
|
13
|
+
scribePriceUnit
|
|
14
14
|
lowestPrice
|
|
15
15
|
lowestPriceUnit
|
|
16
16
|
tags
|
|
17
|
-
|
|
17
|
+
addressIntro
|
|
18
18
|
distance
|
|
19
19
|
|
|
20
20
|
尝试使用 grid 进行布局
|