@tplc/business 0.7.57 → 0.7.59
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 +37 -0
- package/components/lcb-product-item/lcb-product-item.vue +49 -1
- package/components/lcb-tabs/components/Tabs/index.vue +7 -2
- package/components/lcb-tabs/components/Tags/index.vue +44 -53
- package/components/lcb-title/lcb-title.vue +2 -0
- package/components/lcb-title/types.ts +1 -0
- package/package.json +1 -1
- package/types/components/lcb-tabs/components/Tags/index.vue.d.ts +12 -15
- package/types/components/lcb-title/lcb-title.vue.d.ts +3 -0
- package/types/components/lcb-title/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
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.59](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.56...v0.7.59) (2026-01-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.7.57 ([335581c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/335581c24bb3e9434fb02894a9d68312ca4ac8c0))
|
|
11
|
+
* **release:** 0.7.58 ([e293b2c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/e293b2c5adbbc2c73d673518415baaa03ddcf0a4))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ✨ Features | 新功能
|
|
15
|
+
|
|
16
|
+
* **lcb-product-item, lcb-tabs, wd-img, wd-tab:** enhance component functionality with new computed properties and style adjustments ([45f0e74](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/45f0e749af0ae4425588b6e5ec44eac8c4a61b6a))
|
|
17
|
+
* **lcb-tabs, lcb-title:** replace tag color and radius props with lineWidth, lineHeight, and slidable props; add moreFontWeight prop for title customization ([be1834a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/be1834a33cc23e862a4574dcabc962b3d93efec3))
|
|
18
|
+
* **lcb-title:** add moreFontWeight prop to customize font weight ([882ca54](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/882ca542b69a87852b136839997ab6b35c687744))
|
|
19
|
+
* **lcb-title:** introduce moreFontWeight prop for enhanced font weight customization ([c67c765](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c67c76567c4bea97920e5e440914cce5022db0f7))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
23
|
+
|
|
24
|
+
* **lcb-tabs:** initialize currentTab on component mount to ensure correct default tab selection ([3bd2024](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/3bd2024c1a654897a621ea8f559ac2c12ffb86b0))
|
|
25
|
+
* **lcb-tabs:** update currentTab initialization to use item name based on defaultIndex ([aad2d22](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/aad2d22403c8c3ee8987fcdeb153f4637c9594a0))
|
|
26
|
+
* **lcb-wrapper-list:** update dynamicScope handling and improve page limit configuration ([871bd0d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/871bd0dae7c499bd184b7fcfc1b09ecae4553d22))
|
|
27
|
+
|
|
28
|
+
### [0.7.58](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.57...v0.7.58) (2026-01-09)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
32
|
+
|
|
33
|
+
* **lcb-wrapper-list:** update dynamicScope handling and improve page limit configuration ([871bd0d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/871bd0dae7c499bd184b7fcfc1b09ecae4553d22))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### ✨ Features | 新功能
|
|
37
|
+
|
|
38
|
+
* **lcb-product-item, lcb-tabs, wd-img, wd-tab:** enhance component functionality with new computed properties and style adjustments ([45f0e74](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/45f0e749af0ae4425588b6e5ec44eac8c4a61b6a))
|
|
39
|
+
* **lcb-title:** add moreFontWeight prop to customize font weight ([882ca54](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/882ca542b69a87852b136839997ab6b35c687744))
|
|
40
|
+
* **lcb-title:** introduce moreFontWeight prop for enhanced font weight customization ([c67c765](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c67c76567c4bea97920e5e440914cce5022db0f7))
|
|
41
|
+
|
|
5
42
|
### [0.7.57](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.55...v0.7.57) (2026-01-09)
|
|
6
43
|
|
|
7
44
|
|
|
@@ -3,7 +3,7 @@ import { computed, provide, useAttrs } from 'vue'
|
|
|
3
3
|
import { LcbProductItemProps } from './types'
|
|
4
4
|
import ItemValue from './components/ItemValue.vue'
|
|
5
5
|
import { transformValueUnit } from '../../utils/transform'
|
|
6
|
-
import {
|
|
6
|
+
import { formatJson } from '../../utils/utils'
|
|
7
7
|
defineOptions({
|
|
8
8
|
name: 'LcbProductItem',
|
|
9
9
|
options: {
|
|
@@ -192,6 +192,52 @@ const imgOverlayVisible = computed(() => {
|
|
|
192
192
|
priceOnImgVisible.value
|
|
193
193
|
)
|
|
194
194
|
})
|
|
195
|
+
|
|
196
|
+
// 判断底部内容区域是否有内容需要显示
|
|
197
|
+
const contentAreaVisible = computed(() => {
|
|
198
|
+
// 产品名(如果不在图片上显示)
|
|
199
|
+
if (!props.titleOnImg && props.productNameVisible && props.productName) return true
|
|
200
|
+
|
|
201
|
+
// level
|
|
202
|
+
if (props.levelVisible && props.level && Number(props.level)) return true
|
|
203
|
+
|
|
204
|
+
// titleIcon
|
|
205
|
+
if (props.titleIconVisible && props.titleIcon) return true
|
|
206
|
+
|
|
207
|
+
// 评分区域
|
|
208
|
+
if (props.scoreAvgVisible && isNumber(props.scoreAvg)) return true
|
|
209
|
+
if (props.scoreTipsVisible && props.scoreTips) return true
|
|
210
|
+
if (props.userInteractionInfoVisible && props.userInteractionInfo) return true
|
|
211
|
+
|
|
212
|
+
// 地址(如果不在图片上显示)
|
|
213
|
+
if (props.addressIntroVisible && !props.addressOnImg && props.addressIntro) return true
|
|
214
|
+
|
|
215
|
+
// 副标题
|
|
216
|
+
if (props.subTitleVisible && props.subTitle) return true
|
|
217
|
+
|
|
218
|
+
// 标签
|
|
219
|
+
const tags = formatJson(props.tags as any, []) as any[]
|
|
220
|
+
if (props.tagsVisible && Array.isArray(tags) && tags.length > 0) return true
|
|
221
|
+
|
|
222
|
+
// 订单相关
|
|
223
|
+
if (props.orderSkuCountTipsVisible && props.orderSkuCountTips) return true
|
|
224
|
+
if (props.orderTipsVisible && props.orderTips) return true
|
|
225
|
+
|
|
226
|
+
// 距离提示
|
|
227
|
+
if (props.distanceTipsVisible && props.distanceTips) return true
|
|
228
|
+
|
|
229
|
+
// 价格区域(如果不在图片上显示)
|
|
230
|
+
if (!props.priceOnImg) {
|
|
231
|
+
if (props.scribePriceVisible && isNumber(props.scribePrice)) return true
|
|
232
|
+
if (props.priceVisible && isNumber(props.price)) return true
|
|
233
|
+
if (props.priceTipsVisible && props.priceTips) return true
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// 用户信息
|
|
237
|
+
if (props.userInfoVisible && (props.headImg || props.userName)) return true
|
|
238
|
+
|
|
239
|
+
return false
|
|
240
|
+
})
|
|
195
241
|
</script>
|
|
196
242
|
|
|
197
243
|
<template>
|
|
@@ -388,6 +434,7 @@ const imgOverlayVisible = computed(() => {
|
|
|
388
434
|
</template>
|
|
389
435
|
</ItemValue>
|
|
390
436
|
<view
|
|
437
|
+
v-if="contentAreaVisible"
|
|
391
438
|
class="flex flex-col flex-1 text-26rpx overflow-hidden relative box-border"
|
|
392
439
|
:class="{
|
|
393
440
|
grayscale: attrs.rightBottomFlag,
|
|
@@ -724,6 +771,7 @@ const imgOverlayVisible = computed(() => {
|
|
|
724
771
|
</template>
|
|
725
772
|
</ItemValue>
|
|
726
773
|
<view
|
|
774
|
+
v-if="contentAreaVisible"
|
|
727
775
|
class="p-2 flex flex-col flex-1 text-26rpx overflow-hidden relative"
|
|
728
776
|
:class="{
|
|
729
777
|
grayscale: attrs.rightBottomFlag,
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<script setup lang="ts">
|
|
26
|
-
import { ref, watch } from 'vue'
|
|
26
|
+
import { onMounted, ref, watch } from 'vue'
|
|
27
27
|
import useSyncForm from '../../../../hooks/useSyncForm'
|
|
28
28
|
import { LcbTabsProps } from '../../types'
|
|
29
29
|
defineOptions({
|
|
@@ -43,7 +43,7 @@ const props = withDefaults(defineProps<LcbTabsProps>(), {
|
|
|
43
43
|
slidableNum: 6,
|
|
44
44
|
defaultIndex: 0,
|
|
45
45
|
})
|
|
46
|
-
const currentTab = ref(
|
|
46
|
+
const currentTab = ref()
|
|
47
47
|
const { syncForm } = useSyncForm({
|
|
48
48
|
dynamicScope: props.dynamicScope,
|
|
49
49
|
visibleScope: props.visibleScope,
|
|
@@ -57,6 +57,11 @@ watch(
|
|
|
57
57
|
tabs.value.updateLineStyle(true)
|
|
58
58
|
},
|
|
59
59
|
)
|
|
60
|
+
onMounted(() => {
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
currentTab.value = props.items?.[props.defaultIndex]?.name
|
|
63
|
+
}, 100)
|
|
64
|
+
})
|
|
60
65
|
</script>
|
|
61
66
|
|
|
62
67
|
<style lang="scss" scoped></style>
|
|
@@ -1,72 +1,63 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<lcb-block v-bind="$props">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
<wd-tabs
|
|
4
|
+
custom-class="!bg-transparent"
|
|
5
|
+
@change="handleChange"
|
|
6
|
+
:lineWidth="lineWidth"
|
|
7
|
+
:lineHeight="lineHeight"
|
|
8
|
+
:slidable="slidable"
|
|
9
|
+
:slidableNum="slidableNum"
|
|
10
|
+
:itemFontSize="itemFontSize"
|
|
11
|
+
:activeFontSize="tabActiveFontSize"
|
|
12
|
+
:activeFontWeight="tabActiveFontWeight"
|
|
13
|
+
:itemFontWeight="tabInactiveFontWeight"
|
|
14
|
+
ref="tabs"
|
|
15
|
+
:inactiveColor="tagTitleInactiveColor"
|
|
16
|
+
:color="tagTitleActiveColor"
|
|
17
|
+
v-model="currentTab"
|
|
18
|
+
animated
|
|
11
19
|
>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
:key="index"
|
|
15
|
-
class="lcb-tag text-center"
|
|
16
|
-
:class="{
|
|
17
|
-
'lcb-tag-active': current === index,
|
|
18
|
-
'inline-block': tagsMode === 'scroll',
|
|
19
|
-
}"
|
|
20
|
-
:style="{
|
|
21
|
-
fontSize: transformValueUnit(itemFontSize),
|
|
22
|
-
backgroundColor: current === index ? tagActiveColor : tagInactiveColor,
|
|
23
|
-
color: current === index ? tagTitleActiveColor : tagTitleInactiveColor,
|
|
24
|
-
borderRadius: transformValueUnit(tagRadius),
|
|
25
|
-
minWidth: transformValueUnit(tagMinWidth),
|
|
26
|
-
}"
|
|
27
|
-
@click="handleTagClick(item.name, index)"
|
|
28
|
-
>
|
|
29
|
-
{{ item.title }}
|
|
30
|
-
</view>
|
|
31
|
-
</view>
|
|
20
|
+
<wd-tab v-for="tab in items" :key="tab.name" :title="tab.title" :name="tab.name" animated />
|
|
21
|
+
</wd-tabs>
|
|
32
22
|
</lcb-block>
|
|
33
23
|
</template>
|
|
34
24
|
|
|
35
25
|
<script setup lang="ts">
|
|
36
|
-
import { ref } from 'vue'
|
|
26
|
+
import { ref, watch } from 'vue'
|
|
37
27
|
import useSyncForm from '../../../../hooks/useSyncForm'
|
|
38
|
-
import { transformValueUnit } from '../../../../utils/transform'
|
|
39
28
|
import { LcbTabsProps } from '../../types'
|
|
40
|
-
const props = withDefaults(defineProps<LcbTabsProps>(), {
|
|
41
|
-
tagActiveColor: 'var(--wot-color-theme)',
|
|
42
|
-
tagInactiveColor: '#eeeeee',
|
|
43
|
-
tagTitleActiveColor: '#ffffff',
|
|
44
|
-
tagTitleInactiveColor: '#000000',
|
|
45
|
-
tagRadius: 100,
|
|
46
|
-
defaultIndex: 0,
|
|
47
|
-
})
|
|
48
|
-
const { syncForm } = useSyncForm({
|
|
49
|
-
dynamicScope: props.dynamicScope,
|
|
50
|
-
visibleScope: props.visibleScope,
|
|
51
|
-
})
|
|
52
|
-
const current = ref(props.defaultIndex)
|
|
53
29
|
defineOptions({
|
|
54
|
-
name: '
|
|
30
|
+
name: 'LcbTabsItem',
|
|
55
31
|
options: {
|
|
56
32
|
addGlobalClass: true,
|
|
57
33
|
virtualHost: true,
|
|
58
34
|
styleIsolation: 'shared',
|
|
59
35
|
},
|
|
60
36
|
})
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
37
|
+
|
|
38
|
+
const tabs = ref()
|
|
39
|
+
const props = withDefaults(defineProps<LcbTabsProps>(), {
|
|
40
|
+
lineWidth: 19,
|
|
41
|
+
lineHeight: 3,
|
|
42
|
+
slidable: 'auto',
|
|
43
|
+
slidableNum: 6,
|
|
44
|
+
defaultIndex: 0,
|
|
45
|
+
})
|
|
46
|
+
const currentTab = ref(props.items?.[props.defaultIndex]?.name)
|
|
47
|
+
const { syncForm } = useSyncForm({
|
|
48
|
+
dynamicScope: props.dynamicScope,
|
|
49
|
+
visibleScope: props.visibleScope,
|
|
50
|
+
})
|
|
51
|
+
const handleChange = (e: { name: string }) => {
|
|
52
|
+
syncForm(JSON.parse(e.name))
|
|
64
53
|
}
|
|
65
|
-
|
|
54
|
+
watch(
|
|
55
|
+
() => [props.lineWidth, props.lineHeight, props.slidable, props.slidableNum],
|
|
56
|
+
() => {
|
|
57
|
+
tabs.value.updateLineStyle(true)
|
|
58
|
+
},
|
|
59
|
+
)
|
|
60
|
+
syncForm(JSON.parse(currentTab.value || '{}'))
|
|
66
61
|
</script>
|
|
67
62
|
|
|
68
|
-
<style lang="scss" scoped>
|
|
69
|
-
.lcb-tag {
|
|
70
|
-
padding: 8rpx 32rpx;
|
|
71
|
-
}
|
|
72
|
-
</style>
|
|
63
|
+
<style lang="scss" scoped></style>
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
fontSize: transformValueUnit(moreFontSize),
|
|
56
56
|
color: moreColor,
|
|
57
57
|
alignSelf: moreVerticalAlign,
|
|
58
|
+
fontWeight: moreFontWeight,
|
|
58
59
|
}"
|
|
59
60
|
>
|
|
60
61
|
<lcb-button mode="noStyle" :text="moreText" :keyFromUser="moreKeyFromUser" />
|
|
@@ -98,6 +99,7 @@ const props = withDefaults(defineProps<LcbTitleProps>(), {
|
|
|
98
99
|
size: '28',
|
|
99
100
|
iconType: 'icon',
|
|
100
101
|
iconColor: '#000',
|
|
102
|
+
moreFontWeight: 400,
|
|
101
103
|
})
|
|
102
104
|
const customStyle = computed(() => {
|
|
103
105
|
return props.iconRight ? `margin-right:${transformValueUnit(props.iconRight)}` : ''
|
package/package.json
CHANGED
|
@@ -3,11 +3,10 @@ declare const _default: import('vue').DefineComponent<
|
|
|
3
3
|
__VLS_WithDefaults<
|
|
4
4
|
__VLS_TypePropsToOption<LcbTabsProps>,
|
|
5
5
|
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
tagRadius: number
|
|
6
|
+
lineWidth: number
|
|
7
|
+
lineHeight: number
|
|
8
|
+
slidable: string
|
|
9
|
+
slidableNum: number
|
|
11
10
|
defaultIndex: number
|
|
12
11
|
}
|
|
13
12
|
>,
|
|
@@ -25,23 +24,21 @@ declare const _default: import('vue').DefineComponent<
|
|
|
25
24
|
__VLS_WithDefaults<
|
|
26
25
|
__VLS_TypePropsToOption<LcbTabsProps>,
|
|
27
26
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
tagRadius: number
|
|
27
|
+
lineWidth: number
|
|
28
|
+
lineHeight: number
|
|
29
|
+
slidable: string
|
|
30
|
+
slidableNum: number
|
|
33
31
|
defaultIndex: number
|
|
34
32
|
}
|
|
35
33
|
>
|
|
36
34
|
>
|
|
37
35
|
>,
|
|
38
36
|
{
|
|
37
|
+
lineHeight: number
|
|
38
|
+
lineWidth: number
|
|
39
|
+
slidableNum: number
|
|
40
|
+
slidable: 'always' | 'auto'
|
|
39
41
|
defaultIndex: number
|
|
40
|
-
tagActiveColor: string
|
|
41
|
-
tagInactiveColor: string
|
|
42
|
-
tagTitleActiveColor: string
|
|
43
|
-
tagTitleInactiveColor: string
|
|
44
|
-
tagRadius: number
|
|
45
42
|
},
|
|
46
43
|
{}
|
|
47
44
|
>
|
|
@@ -22,6 +22,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
22
22
|
size: string
|
|
23
23
|
iconType: string
|
|
24
24
|
iconColor: string
|
|
25
|
+
moreFontWeight: number
|
|
25
26
|
}
|
|
26
27
|
>,
|
|
27
28
|
{},
|
|
@@ -57,6 +58,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
57
58
|
size: string
|
|
58
59
|
iconType: string
|
|
59
60
|
iconColor: string
|
|
61
|
+
moreFontWeight: number
|
|
60
62
|
}
|
|
61
63
|
>
|
|
62
64
|
>
|
|
@@ -84,6 +86,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
84
86
|
moreColor: string
|
|
85
87
|
moreFontSize: number
|
|
86
88
|
moreVerticalAlign: 'end' | 'center'
|
|
89
|
+
moreFontWeight: number
|
|
87
90
|
iconRight: number
|
|
88
91
|
},
|
|
89
92
|
{}
|