@tplc/business 0.5.16 → 0.5.18
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 +14 -0
- package/components/lcb-nav/AddressCommunity/index.vue +6 -3
- package/components/lcb-tabs/components/Tags/index.vue +5 -3
- package/components/lcb-tabs/lcb-tabs.vue +16 -2
- package/components/lcb-tabs/types.ts +2 -0
- package/package.json +1 -1
- package/types/components/lcb-tabs/components/Tags/index.vue.d.ts +3 -0
- package/types/components/lcb-tabs/types.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.5.18](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.17...v0.5.18) (2025-10-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* mode normal 改为最大大小 ([5f59b53](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5f59b532c7dfef47d7a6c64f1e221d6a71e10e75))
|
|
11
|
+
|
|
12
|
+
### [0.5.17](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.16...v0.5.17) (2025-10-13)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
17
|
+
* 调整swiper nav ([5a40606](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5a40606ff1480bbd14119867a9a042eca535517c))
|
|
18
|
+
|
|
5
19
|
### [0.5.16](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.12...v0.5.16) (2025-10-13)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
3
|
class="drop-menu-container flex items-center"
|
|
4
|
-
:style="
|
|
4
|
+
:style="containerStyle"
|
|
5
5
|
v-if="title"
|
|
6
6
|
@click="onChooseAddress"
|
|
7
7
|
>
|
|
@@ -72,6 +72,9 @@ const onChooseAddress = () => {
|
|
|
72
72
|
uni.$lcb.navigateTo('/pages-sub/index/store')
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
+
const containerStyle = computed(() => {
|
|
76
|
+
return `background-color: ${props.backgroundColor}; --address-content-color: ${props.color};font-size: ${props.fontSize}rpx;--address-font-size: ${props.fontSize}rpx;--address-width: ${props.width}rpx;${props.mode === 'normal' ? 'max-width' : 'width'}: ${props.width}rpx`
|
|
77
|
+
})
|
|
75
78
|
</script>
|
|
76
79
|
|
|
77
80
|
<style lang="scss" scoped>
|
|
@@ -83,7 +86,7 @@ const onChooseAddress = () => {
|
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
:deep(.wd-drop-menu) {
|
|
86
|
-
font-size:
|
|
89
|
+
font-size: var(--address-font-size) !important;
|
|
87
90
|
width: 100%;
|
|
88
91
|
}
|
|
89
92
|
|
|
@@ -101,7 +104,7 @@ const onChooseAddress = () => {
|
|
|
101
104
|
font-size: 16rpx !important;
|
|
102
105
|
}
|
|
103
106
|
:deep(.wd-drop-item__title) {
|
|
104
|
-
font-size:
|
|
107
|
+
font-size: var(--address-font-size) !important;
|
|
105
108
|
padding: 0;
|
|
106
109
|
// 一行省略号
|
|
107
110
|
width: 100%;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<view
|
|
13
13
|
v-for="(item, index) in items"
|
|
14
14
|
:key="index"
|
|
15
|
-
class="lcb-tag"
|
|
15
|
+
class="lcb-tag text-center"
|
|
16
16
|
:class="{
|
|
17
17
|
'lcb-tag-active': current === index,
|
|
18
18
|
'inline-block': tagsMode === 'scroll',
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
fontSize: transformValueUnit(itemFontSize),
|
|
22
22
|
backgroundColor: current === index ? tagActiveColor : tagInactiveColor,
|
|
23
23
|
color: current === index ? tagTitleActiveColor : tagTitleInactiveColor,
|
|
24
|
+
borderRadius: transformValueUnit(tagRadius),
|
|
25
|
+
minWidth: transformValueUnit(tagMinWidth),
|
|
24
26
|
}"
|
|
25
27
|
@click="handleTagClick(item.name, index)"
|
|
26
28
|
>
|
|
@@ -40,7 +42,9 @@ const props = withDefaults(defineProps<LcbTabsProps>(), {
|
|
|
40
42
|
tagInactiveColor: '#eeeeee',
|
|
41
43
|
tagTitleActiveColor: '#ffffff',
|
|
42
44
|
tagTitleInactiveColor: '#000000',
|
|
45
|
+
tagRadius: 100,
|
|
43
46
|
})
|
|
47
|
+
console.log(props, 'props')
|
|
44
48
|
const { syncForm } = useSyncForm(props.dynamicScope)
|
|
45
49
|
const current = ref()
|
|
46
50
|
defineOptions({
|
|
@@ -63,9 +67,7 @@ handleTagClick(props.items[0]?.name, 0)
|
|
|
63
67
|
</script>
|
|
64
68
|
|
|
65
69
|
<style lang="scss" scoped>
|
|
66
|
-
@import '@tplc/wot/components/common/abstracts/variable';
|
|
67
70
|
.lcb-tag {
|
|
68
71
|
padding: 8rpx 32rpx;
|
|
69
|
-
border-radius: 10000rpx;
|
|
70
72
|
}
|
|
71
73
|
</style>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<!-- 用来计算内容宽度 -->
|
|
3
|
+
<wd-resize @resize="handleResize" custom-class="!w-full" customContainerClass="!w-full">
|
|
4
|
+
<view class="w-full"></view>
|
|
5
|
+
</wd-resize>
|
|
6
|
+
<wd-sticky v-if="sticky" @sticky="handleSticky">
|
|
7
|
+
<view :style="{ width: !isSticky ? contentWidth + 'px' : '100vw' }">
|
|
4
8
|
<Tabs v-bind="$props" v-if="mode === 'tabs'" />
|
|
5
9
|
<Imgs v-bind="$props" v-else-if="mode === 'image'" />
|
|
6
10
|
<Tags v-bind="$props" v-else />
|
|
@@ -13,6 +17,7 @@
|
|
|
13
17
|
|
|
14
18
|
<script setup lang="ts">
|
|
15
19
|
import { LcbTabsProps } from './types'
|
|
20
|
+
import { ref } from 'vue'
|
|
16
21
|
import Imgs from './components/Imgs/index.vue'
|
|
17
22
|
import Tabs from './components/Tabs/index.vue'
|
|
18
23
|
import Tags from './components/Tags/index.vue'
|
|
@@ -30,6 +35,15 @@ withDefaults(defineProps<LcbTabsProps>(), {
|
|
|
30
35
|
gap: 16,
|
|
31
36
|
imgHeight: 50,
|
|
32
37
|
})
|
|
38
|
+
const isSticky = ref(false)
|
|
39
|
+
const contentWidth = ref(0)
|
|
40
|
+
const handleSticky = (sticky: boolean) => {
|
|
41
|
+
isSticky.value = sticky
|
|
42
|
+
}
|
|
43
|
+
function handleResize(detail: Record<string, string | number>) {
|
|
44
|
+
const { width } = detail
|
|
45
|
+
contentWidth.value = Number(width)
|
|
46
|
+
}
|
|
33
47
|
</script>
|
|
34
48
|
|
|
35
49
|
<style lang="scss" scoped></style>
|
|
@@ -27,6 +27,8 @@ export interface LcbTabsProps extends LcbBlockProps {
|
|
|
27
27
|
tagInactiveColor?: string
|
|
28
28
|
tagTitleActiveColor?: string
|
|
29
29
|
tagTitleInactiveColor?: string
|
|
30
|
+
tagRadius?: number
|
|
31
|
+
tagMinWidth?: number
|
|
30
32
|
tabActiveFontWeight?: string
|
|
31
33
|
tabInactiveFontWeight?: string
|
|
32
34
|
tabActiveFontSize?: number
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
7
7
|
tagInactiveColor: string
|
|
8
8
|
tagTitleActiveColor: string
|
|
9
9
|
tagTitleInactiveColor: string
|
|
10
|
+
tagRadius: number
|
|
10
11
|
}
|
|
11
12
|
>,
|
|
12
13
|
{},
|
|
@@ -27,6 +28,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
27
28
|
tagInactiveColor: string
|
|
28
29
|
tagTitleActiveColor: string
|
|
29
30
|
tagTitleInactiveColor: string
|
|
31
|
+
tagRadius: number
|
|
30
32
|
}
|
|
31
33
|
>
|
|
32
34
|
>
|
|
@@ -36,6 +38,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
36
38
|
tagInactiveColor: string
|
|
37
39
|
tagTitleActiveColor: string
|
|
38
40
|
tagTitleInactiveColor: string
|
|
41
|
+
tagRadius: number
|
|
39
42
|
},
|
|
40
43
|
{}
|
|
41
44
|
>
|
|
@@ -26,6 +26,8 @@ export interface LcbTabsProps extends LcbBlockProps {
|
|
|
26
26
|
tagInactiveColor?: string
|
|
27
27
|
tagTitleActiveColor?: string
|
|
28
28
|
tagTitleInactiveColor?: string
|
|
29
|
+
tagRadius?: number
|
|
30
|
+
tagMinWidth?: number
|
|
29
31
|
tabActiveFontWeight?: string
|
|
30
32
|
tabInactiveFontWeight?: string
|
|
31
33
|
tabActiveFontSize?: number
|