@tplc/business 0.7.63 → 0.7.65
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 +44 -0
- package/components/lcb-img-nav/lcb-img-nav.vue +1 -0
- package/components/lcb-tabs/components/Tags/index.vue +53 -44
- package/components/lcb-tabs/types.ts +1 -0
- package/package.json +2 -2
- package/types/components/lcb-tabs/components/Tags/index.vue.d.ts +15 -12
- package/types/components/lcb-tabs/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,50 @@
|
|
|
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.65](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.64...v0.7.65) (2026-01-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* **lcb-tabs:** enhance tab component with JSON formatted names and improve layout for better responsiveness ([fc19f33](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/fc19f3384c03519075770c9f6a978a859e8b1e60))
|
|
11
|
+
|
|
12
|
+
### [0.7.64](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.58...v0.7.64) (2026-01-12)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
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
|
+
|
|
19
|
+
|
|
20
|
+
### ♻️ Code Refactoring | 代码重构
|
|
21
|
+
|
|
22
|
+
* **lcb-image, lcb-nav:** remove unused TypeScript declaration files for Image and Title components ([431ddb8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/431ddb85ab02ad2f23436496a4a59cea9c8dcbcd))
|
|
23
|
+
* **lcb-image:** replace Image component with LcbWrapperImage and remove unused Image file ([d489b3b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d489b3b226d158cc17abff03b5152ca9398c97ce))
|
|
24
|
+
* **lcb-nav:** replace Title component with LcbNavTitle and remove unused Title file ([d51695b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d51695bfe336809741d4743356e35d12d2707f83))
|
|
25
|
+
* **lcb-video:** update video component styles and extend props for dynamic sizing ([56757fa](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/56757fa5b437bff60015c0f9d7c05d7959d19927))
|
|
26
|
+
* **wd-tabs:** change font size and weight props to accept both numeric and string types ([169a4e5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/169a4e56bb7d81e675bd9a2cfaded0e2a06272d8))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
30
|
+
|
|
31
|
+
* **release:** 0.7.59 ([a98567a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a98567a3d2d84c957dd03c5ea60ba847109ef0c4))
|
|
32
|
+
* **release:** 0.7.60 ([972beec](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/972beec4a80061c59cd784e922de485f218b1174))
|
|
33
|
+
* **release:** 0.7.61 ([7849bf2](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/7849bf25f670ba9afc2c117d1344ce96e6aada29))
|
|
34
|
+
* **release:** 0.7.62 ([fb72585](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/fb725852c762380ed4b90c66d4f9b8d3b6894977))
|
|
35
|
+
* **release:** 0.7.63 ([fe7b4b1](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/fe7b4b15a134e796285effcb77e871063acfa095))
|
|
36
|
+
* **release:** 1.0.26 ([eceba4d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/eceba4d3fc7b0a375a572ec2274b826e9fef4475))
|
|
37
|
+
* **release:** 1.0.27 ([d26fc49](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d26fc4968a1daaf9508f534e435dbb12d628548f))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
41
|
+
|
|
42
|
+
* **iconfonts:** update font URLs to absolute paths for improved accessibility ([4a9ff7c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/4a9ff7c0128766a6a718d8bc266d2914bbe1b6da))
|
|
43
|
+
* **iconfonts:** update font URLs to relative paths for better asset management ([61e3142](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/61e31429da7faf69f76cb7b7e423c47e8ec1d7eb))
|
|
44
|
+
* **lcb-tabs:** extend timeout duration for currentTab initialization to enhance default tab selection accuracy ([a29ae0c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a29ae0cf9c1b0c9ef483c4ca94f094fb7286153c))
|
|
45
|
+
* **lcb-tabs:** increase timeout duration for initializing currentTab to improve default tab selection timing ([01b7415](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/01b74154ea693ab32f1414c2aa3a153bdab169a4))
|
|
46
|
+
* **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))
|
|
47
|
+
* **wd-tabs:** implement layout retry logic to ensure accurate tab positioning on initial render ([94ade3b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/94ade3b0c75122050b6bb871eeceedf8d09e5f42))
|
|
48
|
+
|
|
5
49
|
### [0.7.63](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.62...v0.7.63) (2026-01-10)
|
|
6
50
|
|
|
7
51
|
|
|
@@ -1,63 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<lcb-block v-bind="$props">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
:activeFontSize="tabActiveFontSize"
|
|
12
|
-
:activeFontWeight="tabActiveFontWeight"
|
|
13
|
-
:itemFontWeight="tabInactiveFontWeight"
|
|
14
|
-
ref="tabs"
|
|
15
|
-
:inactiveColor="tagTitleInactiveColor"
|
|
16
|
-
:color="tagTitleActiveColor"
|
|
17
|
-
v-model="currentTab"
|
|
18
|
-
animated
|
|
3
|
+
<view
|
|
4
|
+
:class="{
|
|
5
|
+
'flex flex-wrap': tagsMode === 'tiled',
|
|
6
|
+
'flex whitespace-nowrap overflow-x-auto': tagsMode === 'scroll',
|
|
7
|
+
}"
|
|
8
|
+
:style="{
|
|
9
|
+
gap: transformValueUnit(gap),
|
|
10
|
+
}"
|
|
19
11
|
>
|
|
20
|
-
<
|
|
21
|
-
|
|
12
|
+
<view
|
|
13
|
+
v-for="(item, index) in items"
|
|
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>
|
|
22
32
|
</lcb-block>
|
|
23
33
|
</template>
|
|
24
34
|
|
|
25
35
|
<script setup lang="ts">
|
|
26
|
-
import { ref
|
|
36
|
+
import { ref } from 'vue'
|
|
27
37
|
import useSyncForm from '../../../../hooks/useSyncForm'
|
|
38
|
+
import { transformValueUnit } from '../../../../utils/transform'
|
|
28
39
|
import { LcbTabsProps } from '../../types'
|
|
29
|
-
defineOptions({
|
|
30
|
-
name: 'LcbTabsItem',
|
|
31
|
-
options: {
|
|
32
|
-
addGlobalClass: true,
|
|
33
|
-
virtualHost: true,
|
|
34
|
-
styleIsolation: 'shared',
|
|
35
|
-
},
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
const tabs = ref()
|
|
39
40
|
const props = withDefaults(defineProps<LcbTabsProps>(), {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
tagActiveColor: 'var(--wot-color-theme)',
|
|
42
|
+
tagInactiveColor: '#eeeeee',
|
|
43
|
+
tagTitleActiveColor: '#ffffff',
|
|
44
|
+
tagTitleInactiveColor: '#000000',
|
|
45
|
+
tagRadius: 100,
|
|
44
46
|
defaultIndex: 0,
|
|
45
47
|
})
|
|
46
|
-
const currentTab = ref(props.items?.[props.defaultIndex]?.name)
|
|
47
48
|
const { syncForm } = useSyncForm({
|
|
48
49
|
dynamicScope: props.dynamicScope,
|
|
49
50
|
visibleScope: props.visibleScope,
|
|
50
51
|
})
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
const current = ref(props.defaultIndex)
|
|
53
|
+
defineOptions({
|
|
54
|
+
name: 'LcbTagsItem',
|
|
55
|
+
options: {
|
|
56
|
+
addGlobalClass: true,
|
|
57
|
+
virtualHost: true,
|
|
58
|
+
styleIsolation: 'shared',
|
|
58
59
|
},
|
|
59
|
-
)
|
|
60
|
-
|
|
60
|
+
})
|
|
61
|
+
const handleTagClick = (name: string, index: number) => {
|
|
62
|
+
current.value = index
|
|
63
|
+
syncForm(JSON.parse(name))
|
|
64
|
+
}
|
|
65
|
+
handleTagClick(props.items[current.value]?.name, current.value)
|
|
61
66
|
</script>
|
|
62
67
|
|
|
63
|
-
<style lang="scss" scoped
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
.lcb-tag {
|
|
70
|
+
padding: 8rpx 32rpx;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.65",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"业务组件"
|
|
6
6
|
],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"vue": ">=3.2.47",
|
|
14
|
-
"@tplc/wot": "1.0.
|
|
14
|
+
"@tplc/wot": "1.0.27"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|
|
@@ -3,10 +3,11 @@ declare const _default: import('vue').DefineComponent<
|
|
|
3
3
|
__VLS_WithDefaults<
|
|
4
4
|
__VLS_TypePropsToOption<LcbTabsProps>,
|
|
5
5
|
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
tagActiveColor: string
|
|
7
|
+
tagInactiveColor: string
|
|
8
|
+
tagTitleActiveColor: string
|
|
9
|
+
tagTitleInactiveColor: string
|
|
10
|
+
tagRadius: number
|
|
10
11
|
defaultIndex: number
|
|
11
12
|
}
|
|
12
13
|
>,
|
|
@@ -24,21 +25,23 @@ declare const _default: import('vue').DefineComponent<
|
|
|
24
25
|
__VLS_WithDefaults<
|
|
25
26
|
__VLS_TypePropsToOption<LcbTabsProps>,
|
|
26
27
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
tagActiveColor: string
|
|
29
|
+
tagInactiveColor: string
|
|
30
|
+
tagTitleActiveColor: string
|
|
31
|
+
tagTitleInactiveColor: string
|
|
32
|
+
tagRadius: number
|
|
31
33
|
defaultIndex: number
|
|
32
34
|
}
|
|
33
35
|
>
|
|
34
36
|
>
|
|
35
37
|
>,
|
|
36
38
|
{
|
|
37
|
-
lineHeight: number
|
|
38
|
-
lineWidth: number
|
|
39
|
-
slidableNum: number
|
|
40
|
-
slidable: 'always' | 'auto'
|
|
41
39
|
defaultIndex: number
|
|
40
|
+
tagActiveColor: string
|
|
41
|
+
tagInactiveColor: string
|
|
42
|
+
tagTitleActiveColor: string
|
|
43
|
+
tagTitleInactiveColor: string
|
|
44
|
+
tagRadius: number
|
|
42
45
|
},
|
|
43
46
|
{}
|
|
44
47
|
>
|