@tplc/business 0.2.32 → 0.2.34
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 +21 -0
- package/components/lcb-nav/lcb-nav.vue +1 -2
- package/components/lcb-product-item/components/ItemValue.vue +17 -33
- package/components/lcb-product-item/lcb-product-item.vue +55 -51
- package/components/lcb-product-item/types.ts +2 -2
- package/hooks/useAutoHeight.ts +2 -2
- package/package.json +1 -1
- package/types/components/lcb-product-item/components/ItemValue.vue.d.ts +6 -6
- package/types/components/lcb-product-item/lcb-product-item.vue.d.ts +4 -4
- package/types/components/lcb-product-item/types.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
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.34](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.33...v0.2.34) (2024-12-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* version update ([7c02961](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7c02961426faa5f1c6628e8222777bc406bdca78))
|
|
11
|
+
|
|
12
|
+
### [0.2.33](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.32...v0.2.33) (2024-12-25)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
17
|
+
* height 兼容h5 ([dac82fa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dac82fa388f71112663e4b3d124eb7ed968ab03d))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
21
|
+
|
|
22
|
+
* 修复autoheight 高度不对 ([4fae567](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4fae5676f56e7027effb29c625842757af32dcc3))
|
|
23
|
+
* 修改布局高度 ([cf41a37](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/cf41a37f9d87e8e72309e0a8bde18c37d047fb45))
|
|
24
|
+
* 暂时修复item不显示 ([398caf8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/398caf81ff428f3c730083cb3ce133e0887b0a09))
|
|
25
|
+
|
|
5
26
|
### [0.2.32](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.27...v0.2.32) (2024-12-24)
|
|
6
27
|
|
|
7
28
|
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
|
|
85
85
|
<script setup lang="ts">
|
|
86
86
|
import { addUnit } from '@tplc/wot/components/common/util'
|
|
87
|
-
import { computed, inject } from 'vue'
|
|
87
|
+
import { computed, inject, watch } from 'vue'
|
|
88
88
|
import { ICapsule, NavProps } from './types'
|
|
89
89
|
import Title from './Title/index.vue'
|
|
90
90
|
import Search from './Search/index.vue'
|
|
@@ -124,7 +124,6 @@ const props = withDefaults(defineProps<NavProps>(), {
|
|
|
124
124
|
capsuleMode: 'light',
|
|
125
125
|
immersionMode: 1,
|
|
126
126
|
})
|
|
127
|
-
|
|
128
127
|
const navbarBgColor = computed(() => {
|
|
129
128
|
return props.backgroundType === 'color' ? props.backColor : ''
|
|
130
129
|
})
|
|
@@ -17,14 +17,14 @@ const itemProps: any = inject('lcb-product-item-props')
|
|
|
17
17
|
const props = withDefaults(
|
|
18
18
|
defineProps<{
|
|
19
19
|
prop: string
|
|
20
|
-
|
|
20
|
+
customClass?: string
|
|
21
21
|
}>(),
|
|
22
22
|
{},
|
|
23
23
|
)
|
|
24
|
-
|
|
24
|
+
console.log('itemProps', itemProps, props)
|
|
25
25
|
defineSlots<{
|
|
26
26
|
coverImg(props: { value: any }): any
|
|
27
|
-
|
|
27
|
+
productName(props: { value: any }): any
|
|
28
28
|
subTitle(props: { value: any }): any
|
|
29
29
|
price(props: { value: any }): any
|
|
30
30
|
priceUnit(props: { value: any }): any
|
|
@@ -35,7 +35,7 @@ defineSlots<{
|
|
|
35
35
|
tags(props: { value: any }): any
|
|
36
36
|
addressIntro(props: { value: any }): any
|
|
37
37
|
distance(props: { value: any }): any
|
|
38
|
-
|
|
38
|
+
scoreAvg(props: { value: any }): any
|
|
39
39
|
scoreTips(props: { value: any }): any
|
|
40
40
|
level(props: { value: any }): any
|
|
41
41
|
imgCornerIcon(props: { value: any }): any
|
|
@@ -49,7 +49,7 @@ const visible = computed(() => {
|
|
|
49
49
|
return itemProps?.[`${props?.prop}Visible`] ?? true
|
|
50
50
|
})
|
|
51
51
|
const className = computed(() => {
|
|
52
|
-
return `${itemProps?.[`${props?.prop}Class`] ?? ''} ${props?.
|
|
52
|
+
return `${itemProps?.[`${props?.prop}Class`] ?? ''} ${props?.customClass}`
|
|
53
53
|
})
|
|
54
54
|
const style = computed(() => {
|
|
55
55
|
return itemProps?.[`${props?.prop}Style`] ?? ''
|
|
@@ -77,27 +77,23 @@ const value = computed(() => {
|
|
|
77
77
|
>
|
|
78
78
|
<!-- 图片 -->
|
|
79
79
|
<slot :value="value" v-if="prop === 'coverImg'" name="coverImg">
|
|
80
|
-
<view :class="className" :style="style">
|
|
80
|
+
<view :class="`relative ${className}`" :style="style">
|
|
81
81
|
<image :src="value" class="w-full h-full" mode="aspectFill" />
|
|
82
|
+
<!-- imgBottomIcon -->
|
|
83
|
+
<view class="absolute bottom-0 left-0 w-full z-1" v-if="itemProps.imgBottomIcon">
|
|
84
|
+
<image :src="itemProps.imgBottomIcon" class="w-full h-auto block" mode="widthFix" />
|
|
85
|
+
</view>
|
|
86
|
+
<!-- imgCornerIcon -->
|
|
87
|
+
<view class="absolute top-0 left-0 h-8 z-1" v-if="itemProps.imgCornerIcon">
|
|
88
|
+
<image :src="itemProps.imgCornerIcon" class="w-auto h-full block" mode="heightFix" />
|
|
89
|
+
</view>
|
|
82
90
|
<slot></slot>
|
|
83
91
|
</view>
|
|
84
92
|
</slot>
|
|
85
93
|
|
|
86
94
|
<!-- 标题 -->
|
|
87
|
-
<slot :value="value" v-if="prop === '
|
|
88
|
-
<view
|
|
89
|
-
:class="[
|
|
90
|
-
className,
|
|
91
|
-
'inline text-[32rpx] font-bold',
|
|
92
|
-
// {
|
|
93
|
-
// 'line-clamp-1': itemProps?.titleLineClamp === 1,
|
|
94
|
-
// 'line-clamp-2': itemProps?.titleLineClamp === 2,
|
|
95
|
-
// 'line-clamp-3': itemProps?.titleLineClamp === 3,
|
|
96
|
-
// },
|
|
97
|
-
]"
|
|
98
|
-
:style="style"
|
|
99
|
-
:value="value"
|
|
100
|
-
>
|
|
95
|
+
<slot :value="value" v-if="prop === 'productName'" name="productName">
|
|
96
|
+
<view :class="[className, 'inline text-[32rpx] font-bold']" :style="style" :value="value">
|
|
101
97
|
{{ value }}
|
|
102
98
|
</view>
|
|
103
99
|
</slot>
|
|
@@ -117,7 +113,7 @@ const value = computed(() => {
|
|
|
117
113
|
</view>
|
|
118
114
|
</slot>
|
|
119
115
|
|
|
120
|
-
<slot :value="value" v-if="prop === '
|
|
116
|
+
<slot :value="value" v-if="prop === 'scoreAvg'" name="scoreAvg">
|
|
121
117
|
<view :class="className" :style="style" class="">
|
|
122
118
|
<wd-tag
|
|
123
119
|
custom-class="!text-24rpx relative top-[-2px]"
|
|
@@ -267,18 +263,6 @@ const value = computed(() => {
|
|
|
267
263
|
</view>
|
|
268
264
|
</slot>
|
|
269
265
|
|
|
270
|
-
<slot :value="value" v-if="prop === 'imgCornerIcon'" name="imgCornerIcon">
|
|
271
|
-
<view :class="className" :style="style" class="">
|
|
272
|
-
<view>{{ value }}</view>
|
|
273
|
-
</view>
|
|
274
|
-
</slot>
|
|
275
|
-
|
|
276
|
-
<slot :value="value" v-if="prop === 'imgBottomIcon'" name="imgBottomIcon">
|
|
277
|
-
<view :class="className" :style="style" class="">
|
|
278
|
-
<view>{{ value }}</view>
|
|
279
|
-
</view>
|
|
280
|
-
</slot>
|
|
281
|
-
|
|
282
266
|
<slot :value="value" v-if="prop === 'orderTips'" name="orderTips">
|
|
283
267
|
<view :class="className" :style="style" class="text-22rpx text-gray-500">
|
|
284
268
|
<view>{{ value }}</view>
|
|
@@ -52,7 +52,7 @@ provide('lcb-product-item-props', props)
|
|
|
52
52
|
|
|
53
53
|
defineSlots<{
|
|
54
54
|
coverImg(props: { value: any }): any
|
|
55
|
-
|
|
55
|
+
productName(props: { value: any }): any
|
|
56
56
|
subTitle(props: { value: any }): any
|
|
57
57
|
price(props: { value: any }): any
|
|
58
58
|
priceUnit(props: { value: any }): any
|
|
@@ -63,7 +63,7 @@ defineSlots<{
|
|
|
63
63
|
tags(props: { value: any }): any
|
|
64
64
|
addressIntro(props: { value: any }): any
|
|
65
65
|
distance(props: { value: any }): any
|
|
66
|
-
|
|
66
|
+
scoreAvg(props: { value: any }): any
|
|
67
67
|
scoreTips(props: { value: any }): any
|
|
68
68
|
level(props: { value: any }): any
|
|
69
69
|
imgCornerIcon(props: { value: any }): any
|
|
@@ -99,7 +99,7 @@ defineSlots<{
|
|
|
99
99
|
<ItemValue
|
|
100
100
|
v-if="!!$slots?.['coverImg']"
|
|
101
101
|
prop="coverImg"
|
|
102
|
-
|
|
102
|
+
customClass="w-1/3 h-[360rpx] bg-gray-100 rounded-sm overflow-hidden relative"
|
|
103
103
|
>
|
|
104
104
|
<template #default>
|
|
105
105
|
<slot name="coverImgSection" />
|
|
@@ -111,7 +111,7 @@ defineSlots<{
|
|
|
111
111
|
<ItemValue
|
|
112
112
|
v-else
|
|
113
113
|
prop="coverImg"
|
|
114
|
-
|
|
114
|
+
customClass="w-1/3 h-[360rpx] bg-gray-100 rounded-sm overflow-hidden relative"
|
|
115
115
|
>
|
|
116
116
|
<template #default>
|
|
117
117
|
<slot name="coverImgSection" />
|
|
@@ -121,12 +121,12 @@ defineSlots<{
|
|
|
121
121
|
<slot name="contentSection" />
|
|
122
122
|
<view class="flex flex-col gap-[5px] overflow-hidden">
|
|
123
123
|
<!-- <template
|
|
124
|
-
v-for="propName in ['
|
|
124
|
+
v-for="propName in ['productName', 'subTitle', 'addressIntro', 'distance', 'tags']"
|
|
125
125
|
:key="propName"
|
|
126
126
|
>
|
|
127
127
|
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
128
128
|
<template #coverImg="{ value }"><slot name="coverImg" :value="value" /></template>
|
|
129
|
-
<template #
|
|
129
|
+
<template #productName="{ value }"><slot name="productName" :value="value" /></template>
|
|
130
130
|
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
131
131
|
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
132
132
|
<template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
|
|
@@ -148,53 +148,53 @@ defineSlots<{
|
|
|
148
148
|
<ItemValue :prop="propName" v-else />
|
|
149
149
|
</template> -->
|
|
150
150
|
<view class="text-ellipsis line-clamp-2">
|
|
151
|
-
<ItemValue prop="
|
|
152
|
-
<template #
|
|
151
|
+
<ItemValue prop="productName">
|
|
152
|
+
<!-- <template #productName="{ value }"><slot name="productName" :value="value" /></template> -->
|
|
153
153
|
</ItemValue>
|
|
154
154
|
<ItemValue prop="level">
|
|
155
|
-
<template #level="{ value }"><slot name="level" :value="value" /></template>
|
|
155
|
+
<!-- <template #level="{ value }"><slot name="level" :value="value" /></template> -->
|
|
156
156
|
</ItemValue>
|
|
157
157
|
<ItemValue prop="titleIcon">
|
|
158
|
-
<template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template>
|
|
158
|
+
<!-- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template> -->
|
|
159
159
|
</ItemValue>
|
|
160
160
|
</view>
|
|
161
161
|
|
|
162
|
-
<view
|
|
163
|
-
<ItemValue prop="
|
|
164
|
-
<template #
|
|
162
|
+
<view class="flex gap-1 items-center">
|
|
163
|
+
<ItemValue prop="scoreAvg">
|
|
164
|
+
<!-- <template #scoreAvg="{ value }"><slot name="scoreAvg" :value="value" /></template> -->
|
|
165
165
|
</ItemValue>
|
|
166
166
|
<ItemValue prop="scoreTips">
|
|
167
|
-
<template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template>
|
|
167
|
+
<!-- <template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template> -->
|
|
168
168
|
</ItemValue>
|
|
169
169
|
<ItemValue prop="userInteractionInfo">
|
|
170
|
-
<template #userInteractionInfo="{ value }">
|
|
171
|
-
|
|
172
|
-
</template>
|
|
170
|
+
<!-- <template #userInteractionInfo="{ value }"> -->
|
|
171
|
+
<!-- <slot name="userInteractionInfo" :value="value" /> -->
|
|
172
|
+
<!-- </template> -->
|
|
173
173
|
</ItemValue>
|
|
174
174
|
</view>
|
|
175
175
|
|
|
176
176
|
<ItemValue prop="addressIntro">
|
|
177
|
-
<template #addressIntro="{ value }">
|
|
178
|
-
|
|
179
|
-
</template>
|
|
177
|
+
<!-- <template #addressIntro="{ value }"> -->
|
|
178
|
+
<!-- <slot name="addressIntro" :value="value" /> -->
|
|
179
|
+
<!-- </template> -->
|
|
180
180
|
</ItemValue>
|
|
181
181
|
|
|
182
182
|
<ItemValue prop="subTitle">
|
|
183
|
-
<template #subTitle="{ value }">
|
|
184
|
-
|
|
185
|
-
</template>
|
|
183
|
+
<!-- <template #subTitle="{ value }"> -->
|
|
184
|
+
<!-- <slot name="subTitle" :value="value" /> -->
|
|
185
|
+
<!-- </template> -->
|
|
186
186
|
</ItemValue>
|
|
187
187
|
|
|
188
188
|
<ItemValue prop="tags">
|
|
189
|
-
<template #tags="{ value }">
|
|
190
|
-
|
|
191
|
-
</template>
|
|
189
|
+
<!-- <template #tags="{ value }"> -->
|
|
190
|
+
<!-- <slot name="tags" :value="value" /> -->
|
|
191
|
+
<!-- </template> -->
|
|
192
192
|
</ItemValue>
|
|
193
193
|
|
|
194
194
|
<ItemValue prop="orderTips">
|
|
195
|
-
<template #orderTips="{ value }">
|
|
196
|
-
|
|
197
|
-
</template>
|
|
195
|
+
<!-- <template #orderTips="{ value }"> -->
|
|
196
|
+
<!-- <slot name="orderTips" :value="value" /> -->
|
|
197
|
+
<!-- </template> -->
|
|
198
198
|
</ItemValue>
|
|
199
199
|
</view>
|
|
200
200
|
|
|
@@ -255,7 +255,11 @@ defineSlots<{
|
|
|
255
255
|
<slot name="itemLeftSection" />
|
|
256
256
|
<view class="flex-1 flex flex-col w-full overflow-hidden">
|
|
257
257
|
<slot name="itemTopSection" />
|
|
258
|
-
<ItemValue
|
|
258
|
+
<ItemValue
|
|
259
|
+
v-if="!!$slots?.['coverImg']"
|
|
260
|
+
prop="coverImg"
|
|
261
|
+
customClass="overflow-hidden relative"
|
|
262
|
+
>
|
|
259
263
|
<template #default>
|
|
260
264
|
<slot name="coverImgSection" />
|
|
261
265
|
</template>
|
|
@@ -263,7 +267,7 @@ defineSlots<{
|
|
|
263
267
|
<slot name="coverImg" :value="value" />
|
|
264
268
|
</template>
|
|
265
269
|
</ItemValue>
|
|
266
|
-
<ItemValue v-else prop="coverImg"
|
|
270
|
+
<ItemValue v-else prop="coverImg" customClass="overflow-hidden relative">
|
|
267
271
|
<template #default>
|
|
268
272
|
<slot name="coverImgSection" />
|
|
269
273
|
</template>
|
|
@@ -272,12 +276,12 @@ defineSlots<{
|
|
|
272
276
|
<slot name="contentSection" />
|
|
273
277
|
<view class="flex flex-col gap-[5px] overflow-hidden">
|
|
274
278
|
<!-- <template
|
|
275
|
-
v-for="propName in ['
|
|
279
|
+
v-for="propName in ['productName', 'subTitle', 'addressIntro', 'distance', 'tags']"
|
|
276
280
|
:key="propName"
|
|
277
281
|
>
|
|
278
282
|
<ItemValue :prop="propName" v-if="!!$slots?.[propName]">
|
|
279
283
|
<template #coverImg="{ value }"><slot name="coverImg" :value="value" /></template>
|
|
280
|
-
<template #
|
|
284
|
+
<template #productName="{ value }"><slot name="productName" :value="value" /></template>
|
|
281
285
|
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
282
286
|
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
283
287
|
<template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
|
|
@@ -299,53 +303,53 @@ defineSlots<{
|
|
|
299
303
|
<ItemValue :prop="propName" v-else />
|
|
300
304
|
</template> -->
|
|
301
305
|
<view class="text-ellipsis line-clamp-2">
|
|
302
|
-
<ItemValue prop="
|
|
303
|
-
<template #
|
|
306
|
+
<ItemValue prop="productName">
|
|
307
|
+
<!-- <template #productName="{ value }"><slot name="productName" :value="value" /></template> -->
|
|
304
308
|
</ItemValue>
|
|
305
309
|
<ItemValue prop="level">
|
|
306
|
-
<template #level="{ value }"><slot name="level" :value="value" /></template>
|
|
310
|
+
<!-- <template #level="{ value }"><slot name="level" :value="value" /></template> -->
|
|
307
311
|
</ItemValue>
|
|
308
312
|
<ItemValue prop="titleIcon">
|
|
309
|
-
<template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template>
|
|
313
|
+
<!-- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template> -->
|
|
310
314
|
</ItemValue>
|
|
311
315
|
</view>
|
|
312
316
|
|
|
313
|
-
<view
|
|
314
|
-
<ItemValue prop="
|
|
315
|
-
<template
|
|
317
|
+
<view class="flex gap-1 items-center">
|
|
318
|
+
<ItemValue prop="scoreAvg">
|
|
319
|
+
<!-- <template #="{ value }"><slot name="scoreAvg" :value="value" /></template> -->
|
|
316
320
|
</ItemValue>
|
|
317
321
|
<ItemValue prop="scoreTips">
|
|
318
|
-
<template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template>
|
|
322
|
+
<!-- <template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template> -->
|
|
319
323
|
</ItemValue>
|
|
320
324
|
<ItemValue prop="userInteractionInfo">
|
|
321
|
-
<template #userInteractionInfo="{ value }">
|
|
325
|
+
<!-- <template #userInteractionInfo="{ value }">
|
|
322
326
|
<slot name="userInteractionInfo" :value="value" />
|
|
323
|
-
</template>
|
|
327
|
+
</template> -->
|
|
324
328
|
</ItemValue>
|
|
325
329
|
</view>
|
|
326
330
|
|
|
327
331
|
<ItemValue prop="addressIntro">
|
|
328
|
-
<template #addressIntro="{ value }">
|
|
332
|
+
<!-- <template #addressIntro="{ value }">
|
|
329
333
|
<slot name="addressIntro" :value="value" />
|
|
330
|
-
</template>
|
|
334
|
+
</template> -->
|
|
331
335
|
</ItemValue>
|
|
332
336
|
|
|
333
337
|
<ItemValue prop="subTitle">
|
|
334
|
-
<template #subTitle="{ value }">
|
|
338
|
+
<!-- <template #subTitle="{ value }">
|
|
335
339
|
<slot name="subTitle" :value="value" />
|
|
336
|
-
</template>
|
|
340
|
+
</template> -->
|
|
337
341
|
</ItemValue>
|
|
338
342
|
|
|
339
343
|
<ItemValue prop="tags">
|
|
340
|
-
<template #tags="{ value }">
|
|
344
|
+
<!-- <template #tags="{ value }">
|
|
341
345
|
<slot name="tags" :value="value" />
|
|
342
|
-
</template>
|
|
346
|
+
</template> -->
|
|
343
347
|
</ItemValue>
|
|
344
348
|
|
|
345
349
|
<ItemValue prop="orderTips">
|
|
346
|
-
<template #orderTips="{ value }">
|
|
350
|
+
<!-- <template #orderTips="{ value }">
|
|
347
351
|
<slot name="orderTips" :value="value" />
|
|
348
|
-
</template>
|
|
352
|
+
</template> -->
|
|
349
353
|
</ItemValue>
|
|
350
354
|
</view>
|
|
351
355
|
|
|
@@ -16,7 +16,7 @@ export interface LcbProductItemProps {
|
|
|
16
16
|
distanceUnit?: string
|
|
17
17
|
|
|
18
18
|
coverImg?: any
|
|
19
|
-
|
|
19
|
+
productName?: any
|
|
20
20
|
subTitle?: any
|
|
21
21
|
price?: any
|
|
22
22
|
priceUnit?: any
|
|
@@ -28,7 +28,7 @@ export interface LcbProductItemProps {
|
|
|
28
28
|
tags?: any
|
|
29
29
|
addressIntro?: any
|
|
30
30
|
distance?: any
|
|
31
|
-
|
|
31
|
+
scoreAvg?: any
|
|
32
32
|
scoreTips?: any
|
|
33
33
|
level?: any
|
|
34
34
|
imgCornerIcon?: any
|
package/hooks/useAutoHeight.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getRect } from '@tplc/wot/components/common/util'
|
|
1
|
+
import { getRect, isH5 } from '@tplc/wot/components/common/util'
|
|
2
2
|
import { getCurrentInstance, onMounted, ref } from 'vue'
|
|
3
3
|
|
|
4
4
|
const useAutoHeight = (id = 'pagingTop') => {
|
|
5
5
|
const { proxy } = getCurrentInstance() as any
|
|
6
6
|
const isTabBar = uni.$lcb.getIsTabbar()
|
|
7
|
-
const viewPageHeight = uni.
|
|
7
|
+
const viewPageHeight = isH5 ? window.innerHeight : uni.getWindowInfo().screenHeight
|
|
8
8
|
const height = ref('')
|
|
9
9
|
onMounted(() => {
|
|
10
10
|
setTimeout(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare function __VLS_template(): Readonly<{
|
|
2
2
|
coverImg(props: { value: any }): any
|
|
3
|
-
|
|
3
|
+
productName(props: { value: any }): any
|
|
4
4
|
subTitle(props: { value: any }): any
|
|
5
5
|
price(props: { value: any }): any
|
|
6
6
|
priceUnit(props: { value: any }): any
|
|
@@ -11,7 +11,7 @@ declare function __VLS_template(): Readonly<{
|
|
|
11
11
|
tags(props: { value: any }): any
|
|
12
12
|
addressIntro(props: { value: any }): any
|
|
13
13
|
distance(props: { value: any }): any
|
|
14
|
-
|
|
14
|
+
scoreAvg(props: { value: any }): any
|
|
15
15
|
scoreTips(props: { value: any }): any
|
|
16
16
|
level(props: { value: any }): any
|
|
17
17
|
imgCornerIcon(props: { value: any }): any
|
|
@@ -21,7 +21,7 @@ declare function __VLS_template(): Readonly<{
|
|
|
21
21
|
orderTips(props: { value: any }): any
|
|
22
22
|
}> & {
|
|
23
23
|
coverImg(props: { value: any }): any
|
|
24
|
-
|
|
24
|
+
productName(props: { value: any }): any
|
|
25
25
|
subTitle(props: { value: any }): any
|
|
26
26
|
price(props: { value: any }): any
|
|
27
27
|
priceUnit(props: { value: any }): any
|
|
@@ -32,7 +32,7 @@ declare function __VLS_template(): Readonly<{
|
|
|
32
32
|
tags(props: { value: any }): any
|
|
33
33
|
addressIntro(props: { value: any }): any
|
|
34
34
|
distance(props: { value: any }): any
|
|
35
|
-
|
|
35
|
+
scoreAvg(props: { value: any }): any
|
|
36
36
|
scoreTips(props: { value: any }): any
|
|
37
37
|
level(props: { value: any }): any
|
|
38
38
|
imgCornerIcon(props: { value: any }): any
|
|
@@ -45,7 +45,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
45
45
|
__VLS_WithDefaults<
|
|
46
46
|
__VLS_TypePropsToOption<{
|
|
47
47
|
prop: string
|
|
48
|
-
|
|
48
|
+
customClass?: string
|
|
49
49
|
}>,
|
|
50
50
|
{}
|
|
51
51
|
>,
|
|
@@ -63,7 +63,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
63
63
|
__VLS_WithDefaults<
|
|
64
64
|
__VLS_TypePropsToOption<{
|
|
65
65
|
prop: string
|
|
66
|
-
|
|
66
|
+
customClass?: string
|
|
67
67
|
}>,
|
|
68
68
|
{}
|
|
69
69
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LcbProductItemProps } from './types'
|
|
2
2
|
declare function __VLS_template(): Readonly<{
|
|
3
3
|
coverImg(props: { value: any }): any
|
|
4
|
-
|
|
4
|
+
productName(props: { value: any }): any
|
|
5
5
|
subTitle(props: { value: any }): any
|
|
6
6
|
price(props: { value: any }): any
|
|
7
7
|
priceUnit(props: { value: any }): any
|
|
@@ -12,7 +12,7 @@ declare function __VLS_template(): Readonly<{
|
|
|
12
12
|
tags(props: { value: any }): any
|
|
13
13
|
addressIntro(props: { value: any }): any
|
|
14
14
|
distance(props: { value: any }): any
|
|
15
|
-
|
|
15
|
+
scoreAvg(props: { value: any }): any
|
|
16
16
|
scoreTips(props: { value: any }): any
|
|
17
17
|
level(props: { value: any }): any
|
|
18
18
|
imgCornerIcon(props: { value: any }): any
|
|
@@ -30,7 +30,7 @@ declare function __VLS_template(): Readonly<{
|
|
|
30
30
|
contentSection(): any
|
|
31
31
|
}> & {
|
|
32
32
|
coverImg(props: { value: any }): any
|
|
33
|
-
|
|
33
|
+
productName(props: { value: any }): any
|
|
34
34
|
subTitle(props: { value: any }): any
|
|
35
35
|
price(props: { value: any }): any
|
|
36
36
|
priceUnit(props: { value: any }): any
|
|
@@ -41,7 +41,7 @@ declare function __VLS_template(): Readonly<{
|
|
|
41
41
|
tags(props: { value: any }): any
|
|
42
42
|
addressIntro(props: { value: any }): any
|
|
43
43
|
distance(props: { value: any }): any
|
|
44
|
-
|
|
44
|
+
scoreAvg(props: { value: any }): any
|
|
45
45
|
scoreTips(props: { value: any }): any
|
|
46
46
|
level(props: { value: any }): any
|
|
47
47
|
imgCornerIcon(props: { value: any }): any
|
|
@@ -13,7 +13,7 @@ export interface LcbProductItemProps {
|
|
|
13
13
|
tagRound?: boolean
|
|
14
14
|
distanceUnit?: string
|
|
15
15
|
coverImg?: any
|
|
16
|
-
|
|
16
|
+
productName?: any
|
|
17
17
|
subTitle?: any
|
|
18
18
|
price?: any
|
|
19
19
|
priceUnit?: any
|
|
@@ -25,7 +25,7 @@ export interface LcbProductItemProps {
|
|
|
25
25
|
tags?: any
|
|
26
26
|
addressIntro?: any
|
|
27
27
|
distance?: any
|
|
28
|
-
|
|
28
|
+
scoreAvg?: any
|
|
29
29
|
scoreTips?: any
|
|
30
30
|
level?: any
|
|
31
31
|
imgCornerIcon?: any
|