@tplc/business 0.5.19 → 0.5.21
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 +27 -0
- package/components/lcb-nav/AddressCommunity/index.vue +20 -4
- package/components/lcb-nav/types.ts +1 -0
- package/hooks/useLocation.ts +14 -0
- package/package.json +1 -1
- package/types/components/lcb-nav/AddressCommunity/index.vue.d.ts +2 -0
- package/types/components/lcb-nav/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
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.21](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.20...v0.5.21) (2025-10-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 超过3s请求 ([90bc7ec](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/90bc7eca2cb16858e32fdba7ec1b72e05d0da60e))
|
|
11
|
+
|
|
12
|
+
### [0.5.20](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.15...v0.5.20) (2025-10-19)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
16
|
+
|
|
17
|
+
* **release:** 0.5.16 ([c8e3500](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c8e350074a0eff3162b23af6146f10af9e4922ac))
|
|
18
|
+
* **release:** 0.5.17 ([431a0e9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/431a0e9ecc9993dd247ded95bcdb0c8dba29140f))
|
|
19
|
+
* **release:** 0.5.18 ([4eed2cc](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/4eed2cc10a11bd9eda7182da88e7df9e529f818d))
|
|
20
|
+
* **release:** 0.5.19 ([70c9c94](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/70c9c94e323c42ba120c543597c7a2a8f3f41294))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### ✨ Features | 新功能
|
|
24
|
+
|
|
25
|
+
* mode normal 改为最大大小 ([5f59b53](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5f59b532c7dfef47d7a6c64f1e221d6a71e10e75))
|
|
26
|
+
* tab支持变更属性 ([3e8390b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/3e8390be463525f4988d5ae36034a83d69031dc2))
|
|
27
|
+
* 支持 stackRight stackLeft ([81d1fd4](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/81d1fd488395196cf28ef6a8df269564d87376bd))
|
|
28
|
+
* 调整address 策略 ([91063a1](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/91063a19ec34314920e3064c6292c085efc9b2a6))
|
|
29
|
+
* 调整swiper nav ([5a40606](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5a40606ff1480bbd14119867a9a042eca535517c))
|
|
30
|
+
* 调整类型 ([4c29c1a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/4c29c1a93541161cb5bff190ae7f11584cafedaa))
|
|
31
|
+
|
|
5
32
|
### [0.5.19](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.18...v0.5.19) (2025-10-16)
|
|
6
33
|
|
|
7
34
|
|
|
@@ -39,6 +39,7 @@ const props = withDefaults(defineProps<AddressCommunityProps>(), {
|
|
|
39
39
|
fontSize: 28,
|
|
40
40
|
width: 240,
|
|
41
41
|
mode: 'normal',
|
|
42
|
+
popupWidth: 240,
|
|
42
43
|
})
|
|
43
44
|
const value = defineModel<string>('')
|
|
44
45
|
const constantsStore = uni.$lcb.constantsStore?.()
|
|
@@ -73,7 +74,14 @@ const onChooseAddress = () => {
|
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
const containerStyle = computed(() => {
|
|
76
|
-
return
|
|
77
|
+
return {
|
|
78
|
+
'background-color': props.backgroundColor,
|
|
79
|
+
'--address-content-color': props.color,
|
|
80
|
+
'font-size': `${props.fontSize}rpx`,
|
|
81
|
+
'--address-font-size': `${props.fontSize}rpx`,
|
|
82
|
+
'--address-width': props.popupWidth ? `${props.popupWidth}rpx` : 'fit-content',
|
|
83
|
+
[props.mode === 'normal' ? 'max-width' : 'width']: `${props.width}rpx`,
|
|
84
|
+
}
|
|
77
85
|
})
|
|
78
86
|
</script>
|
|
79
87
|
|
|
@@ -101,16 +109,24 @@ const containerStyle = computed(() => {
|
|
|
101
109
|
}
|
|
102
110
|
}
|
|
103
111
|
:deep(.wd-drop-item__icon) {
|
|
104
|
-
font-size:
|
|
112
|
+
font-size: 20rpx !important;
|
|
113
|
+
}
|
|
114
|
+
:deep(.wd-drop-menu__item-title) {
|
|
115
|
+
padding: 0rpx 12rpx 0 0;
|
|
105
116
|
}
|
|
106
117
|
:deep(.wd-drop-item__title) {
|
|
107
118
|
font-size: var(--address-font-size) !important;
|
|
108
119
|
padding: 0;
|
|
109
|
-
|
|
110
|
-
|
|
120
|
+
text {
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
width: 100%;
|
|
123
|
+
}
|
|
111
124
|
overflow: hidden;
|
|
112
125
|
text-overflow: ellipsis;
|
|
113
126
|
white-space: nowrap;
|
|
127
|
+
// 一行省略号
|
|
128
|
+
width: 100%;
|
|
129
|
+
margin-right: 12rpx;
|
|
114
130
|
}
|
|
115
131
|
}
|
|
116
132
|
</style>
|
package/hooks/useLocation.ts
CHANGED
|
@@ -54,10 +54,23 @@ const useLocation = (onLocation?: (location: UserLocation) => void) => {
|
|
|
54
54
|
locationIng.value = true
|
|
55
55
|
|
|
56
56
|
await new Promise<void>((resolve) => {
|
|
57
|
+
// 超过3s默认请求
|
|
58
|
+
const timeout = setTimeout(() => {
|
|
59
|
+
getUserLocation()
|
|
60
|
+
.then((res) => {
|
|
61
|
+
currentLocation.value = res.data
|
|
62
|
+
})
|
|
63
|
+
.finally(() => {
|
|
64
|
+
locationIng.value = false
|
|
65
|
+
resolve()
|
|
66
|
+
})
|
|
67
|
+
}, 3000)
|
|
68
|
+
|
|
57
69
|
uni.getLocation({
|
|
58
70
|
type: 'gcj02',
|
|
59
71
|
// type: 'wgs84',
|
|
60
72
|
success: function (res) {
|
|
73
|
+
clearTimeout(timeout)
|
|
61
74
|
currentUserLatLon.value = res
|
|
62
75
|
getUserLocation({
|
|
63
76
|
userLongitude: res.longitude.toString(),
|
|
@@ -73,6 +86,7 @@ const useLocation = (onLocation?: (location: UserLocation) => void) => {
|
|
|
73
86
|
})
|
|
74
87
|
},
|
|
75
88
|
fail: function (res) {
|
|
89
|
+
clearTimeout(timeout)
|
|
76
90
|
console.log('获取位置信息失败:', res)
|
|
77
91
|
getUserLocation()
|
|
78
92
|
.then((res) => {
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
12
12
|
fontSize: number
|
|
13
13
|
width: number
|
|
14
14
|
mode: string
|
|
15
|
+
popupWidth: number
|
|
15
16
|
}
|
|
16
17
|
>,
|
|
17
18
|
{},
|
|
@@ -30,6 +31,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
30
31
|
backgroundColor: string
|
|
31
32
|
color: string
|
|
32
33
|
fontSize: number
|
|
34
|
+
popupWidth: number
|
|
33
35
|
},
|
|
34
36
|
{}
|
|
35
37
|
>
|