@tplc/business 0.4.2 → 0.4.4
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 +9 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +1 -1
- package/components/lcb-city-select/api/index.ts +3 -3
- package/components/lcb-city-select/components/lcb-city-letter/index.vue +14 -12
- package/components/lcb-city-select/components/lcb-city-list/index.vue +3 -3
- package/components/lcb-city-select/lcb-city-select.vue +1 -1
- package/components/lcb-home-search/lcb-home-search.vue +3 -3
- package/components/lcb-search/lcb-search.vue +1 -1
- package/package.json +1 -1
- package/types/components/lcb-city-select/api/index.d.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.4.4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.3...v0.4.4) (2025-03-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 修改 addresName ([bbc369d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/bbc369dad73eb961c74b2aa1dfa6b833bb5cb572))
|
|
11
|
+
|
|
12
|
+
### [0.4.3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.2...v0.4.3) (2025-03-23)
|
|
13
|
+
|
|
5
14
|
### [0.4.2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.1...v0.4.2) (2025-03-23)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
class="flex flex-1 text-[var(--content-color)] rounded-16rpx bg-#F5F5F7 h-78rpx flex items-center px-3 text-[28rpx]"
|
|
5
5
|
>
|
|
6
6
|
<lcb-city-select :location="userLocation" v-model="addressCity">
|
|
7
|
-
<view class="max-w-13 truncate">{{ addressCity?.
|
|
7
|
+
<view class="max-w-13 truncate">{{ addressCity?.addressName || '全国' }}</view>
|
|
8
8
|
</lcb-city-select>
|
|
9
9
|
<view class="v-line"></view>
|
|
10
10
|
<lcb-calendar v-model="dayRange">
|
|
@@ -2,11 +2,11 @@ export interface HotAddress {
|
|
|
2
2
|
categoryName: string
|
|
3
3
|
hint?: string
|
|
4
4
|
tips?: string
|
|
5
|
-
|
|
5
|
+
childAddress: ChildHotAddress[]
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export interface ChildHotAddress {
|
|
9
|
-
|
|
9
|
+
addressName: string
|
|
10
10
|
addrFlag?: boolean
|
|
11
11
|
// 1 是以前的 true ,等于 2 是热门地址,等于 3 是商圈
|
|
12
12
|
addressType?: string
|
|
@@ -27,7 +27,7 @@ export interface ChildHotAddress {
|
|
|
27
27
|
}
|
|
28
28
|
export const getHotAddress = () => uni.$lcb.http.post<HotAddress[]>('/address/categoryList', {})
|
|
29
29
|
export interface LcbAddress {
|
|
30
|
-
|
|
30
|
+
addressName: string
|
|
31
31
|
addrFlag: boolean
|
|
32
32
|
// 1 是以前的 true ,等于 2 是热门地址,等于 3 是商圈
|
|
33
33
|
addressType: string
|
|
@@ -28,18 +28,19 @@
|
|
|
28
28
|
:class="{
|
|
29
29
|
'current-address':
|
|
30
30
|
modelValue &&
|
|
31
|
-
`${modelValue.
|
|
31
|
+
`${modelValue.addressName},${modelValue.keywords}` ===
|
|
32
|
+
`${city.addressName},${city.keywords}`,
|
|
32
33
|
[city.className || '']: true,
|
|
33
34
|
}"
|
|
34
|
-
v-for="city in item.
|
|
35
|
+
v-for="city in item.childAddress"
|
|
35
36
|
@click="onAddrClick(city, item.categoryName.includes('字母'))"
|
|
36
37
|
:style="{
|
|
37
|
-
fontSize: city?.
|
|
38
|
+
fontSize: city?.addressName?.length > 4 ? '20rpx' : '24rpx',
|
|
38
39
|
}"
|
|
39
40
|
>
|
|
40
41
|
<view class="tag-view">
|
|
41
42
|
<wd-icon v-if="city.icon" :name="city.icon" class="mr-0.5" />
|
|
42
|
-
{{ city.keywords ? `${city.keywords},` : '' }} {{ city.
|
|
43
|
+
{{ city.keywords ? `${city.keywords},` : '' }} {{ city.addressName }}
|
|
43
44
|
</view>
|
|
44
45
|
</view>
|
|
45
46
|
</view>
|
|
@@ -88,15 +89,15 @@ const locationAddress = computed<HotAddress[]>(() => {
|
|
|
88
89
|
categoryName: '定位',
|
|
89
90
|
hint: '当前位置',
|
|
90
91
|
tips: props.location.haveNotTip,
|
|
91
|
-
|
|
92
|
+
childAddress: [
|
|
92
93
|
{
|
|
93
|
-
|
|
94
|
+
addressName: props.location.haveNotCityName || props.location.cityName,
|
|
94
95
|
cityId: props.location.haveNotCityId || props.location.cityId,
|
|
95
96
|
areaId: props.location.areaId,
|
|
96
97
|
icon: 'location',
|
|
97
98
|
},
|
|
98
99
|
{
|
|
99
|
-
|
|
100
|
+
addressName: props.location.haveNotAddressInfo || props.location.addressInfo,
|
|
100
101
|
cityId: props.location.haveNotCityId || props.location.cityId,
|
|
101
102
|
areaId: props.location.areaId,
|
|
102
103
|
className: 'w-25',
|
|
@@ -113,7 +114,7 @@ const historyLetter = computed<HotAddress[]>(() => {
|
|
|
113
114
|
{
|
|
114
115
|
categoryName: '历史',
|
|
115
116
|
hint: '历史选择',
|
|
116
|
-
|
|
117
|
+
childAddress: historyList.value,
|
|
117
118
|
},
|
|
118
119
|
]
|
|
119
120
|
: []
|
|
@@ -121,7 +122,7 @@ const historyLetter = computed<HotAddress[]>(() => {
|
|
|
121
122
|
|
|
122
123
|
const onAddrClick = (city: ChildHotAddress, letter = false) => {
|
|
123
124
|
if (letter) {
|
|
124
|
-
indexBarRef.value?.scrollToIndex(city.
|
|
125
|
+
indexBarRef.value?.scrollToIndex(city.addressName)
|
|
125
126
|
return
|
|
126
127
|
}
|
|
127
128
|
const currentCity = {
|
|
@@ -132,7 +133,8 @@ const onAddrClick = (city: ChildHotAddress, letter = false) => {
|
|
|
132
133
|
historyList.value =
|
|
133
134
|
historyList.value?.filter(
|
|
134
135
|
(historyItem) =>
|
|
135
|
-
`${historyItem.keywords},${historyItem.
|
|
136
|
+
`${historyItem.keywords},${historyItem.addressName}` !==
|
|
137
|
+
`${city.keywords},${city.addressName}`,
|
|
136
138
|
) || []
|
|
137
139
|
if (historyList.value.length === 8) {
|
|
138
140
|
historyList.value = [currentCity as unknown as LcbAddress, ...historyList.value.slice(0, 7)]
|
|
@@ -145,9 +147,9 @@ const indexBars = computed<HotAddress[]>(() => {
|
|
|
145
147
|
? ([
|
|
146
148
|
{
|
|
147
149
|
categoryName: '字母索引',
|
|
148
|
-
|
|
150
|
+
childAddress: letterList.value.map((v) => {
|
|
149
151
|
return {
|
|
150
|
-
|
|
152
|
+
addressName: v,
|
|
151
153
|
cityId: v,
|
|
152
154
|
}
|
|
153
155
|
}),
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
class="history-tag"
|
|
24
24
|
>
|
|
25
25
|
{{ item.keywords ? `${item.keywords},` : '' }}
|
|
26
|
-
{{ item.
|
|
26
|
+
{{ item.addressName }}
|
|
27
27
|
</view>
|
|
28
28
|
</view>
|
|
29
29
|
</view>
|
|
@@ -58,10 +58,10 @@ const getText = (text: string) => {
|
|
|
58
58
|
return `<div class="flex">${str}</div>`
|
|
59
59
|
}
|
|
60
60
|
const onItemClick = (item: LcbAddress) => {
|
|
61
|
-
const addr = `${item.keywords},${item.
|
|
61
|
+
const addr = `${item.keywords},${item.addressName}`
|
|
62
62
|
historyList.value =
|
|
63
63
|
historyList.value?.filter(
|
|
64
|
-
(historyItem) => `${historyItem.keywords},${historyItem.
|
|
64
|
+
(historyItem) => `${historyItem.keywords},${historyItem.addressName}` !== addr,
|
|
65
65
|
) || []
|
|
66
66
|
historyList.value.unshift(item)
|
|
67
67
|
emits('click', item)
|
|
@@ -113,7 +113,7 @@ watch(
|
|
|
113
113
|
if (val && !modelValue.value) {
|
|
114
114
|
modelValue.value = {
|
|
115
115
|
addressInfo: val.addressInfo,
|
|
116
|
-
|
|
116
|
+
addressName: val.showName || val.cityName,
|
|
117
117
|
cityId: val.cityId,
|
|
118
118
|
areaId: val.areaId,
|
|
119
119
|
} as ChildHotAddress
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<lcb-city-select :location="userLocation" v-model="addressCity">
|
|
32
32
|
<view class="flex items-center gap-16rpx">
|
|
33
33
|
<view class="text-30rpx max-w-13 truncate">
|
|
34
|
-
{{ addressCity?.
|
|
34
|
+
{{ addressCity?.addressName || '全国' }}
|
|
35
35
|
</view>
|
|
36
36
|
<img
|
|
37
37
|
class="w-30rpx h-30rpx"
|
|
@@ -146,7 +146,7 @@ const form = reactive({
|
|
|
146
146
|
endDate: '',
|
|
147
147
|
cityId: '',
|
|
148
148
|
areaId: '',
|
|
149
|
-
|
|
149
|
+
addressName: '',
|
|
150
150
|
cityName: '',
|
|
151
151
|
})
|
|
152
152
|
|
|
@@ -177,7 +177,7 @@ watchEffect(() => {
|
|
|
177
177
|
if (addressCity.value) {
|
|
178
178
|
form.cityId = addressCity.value.cityId
|
|
179
179
|
form.areaId = addressCity.value.areaId
|
|
180
|
-
form.
|
|
180
|
+
form.addressName = addressCity.value.addressName
|
|
181
181
|
if (addressCity.value.keywords) {
|
|
182
182
|
form.keywords = addressCity.value.keywords
|
|
183
183
|
}
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@ export interface HotAddress {
|
|
|
2
2
|
categoryName: string
|
|
3
3
|
hint?: string
|
|
4
4
|
tips?: string
|
|
5
|
-
|
|
5
|
+
childAddress: ChildHotAddress[]
|
|
6
6
|
}
|
|
7
7
|
export interface ChildHotAddress {
|
|
8
|
-
|
|
8
|
+
addressName: string
|
|
9
9
|
addrFlag?: boolean
|
|
10
10
|
addressType?: string
|
|
11
11
|
area?: string
|
|
@@ -25,7 +25,7 @@ export interface ChildHotAddress {
|
|
|
25
25
|
}
|
|
26
26
|
export declare const getHotAddress: () => Promise<import('../../../action').IResData<HotAddress[]>>
|
|
27
27
|
export interface LcbAddress {
|
|
28
|
-
|
|
28
|
+
addressName: string
|
|
29
29
|
addrFlag: boolean
|
|
30
30
|
addressType: string
|
|
31
31
|
categoryName: string
|