@tplc/business 0.2.48 → 0.2.50
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 +16 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +23 -8
- package/components/lcb-city-select/api/index.ts +1 -0
- package/components/lcb-city-select/components/lcb-city-letter/index.vue +4 -6
- package/components/lcb-city-select/components/lcb-city-list/index.vue +4 -4
- package/components/lcb-city-select/lcb-city-select.vue +1 -1
- package/components/lcb-home-search/lcb-home-search.vue +2 -2
- package/components/lcb-product/lcb-product.vue +1 -1
- package/components/lcb-product-item/components/ItemValue.vue +1 -1
- package/constants.ts +1 -1
- package/package.json +1 -1
- package/types/components/lcb-city-select/api/index.d.ts +1 -0
- package/types/constants.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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.2.50](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.49...v0.2.50) (2025-01-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 处理地址字段切换 ([27dd10e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/27dd10e9d609b88560dcb6671503035199e30d08))
|
|
11
|
+
|
|
12
|
+
### [0.2.49](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.48...v0.2.49) (2025-01-01)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
17
|
+
* 修复问题 ([2c67644](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2c67644cc03e4f88b8e0f5aac2f8837c9317f7ec))
|
|
18
|
+
* 修复问题 ([1c9f269](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1c9f269c95b79e67abeec8af5b309d765069fd3a))
|
|
19
|
+
* 修改打包方式 ([9580a78](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9580a789d427c2db7e07c493c36f7f03258d1462))
|
|
20
|
+
|
|
5
21
|
### [0.2.48](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.47...v0.2.48) (2025-01-01)
|
|
6
22
|
|
|
7
23
|
### [0.2.47](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.44...v0.2.47) (2025-01-01)
|
|
@@ -23,7 +23,13 @@
|
|
|
23
23
|
<view class="v-line"></view>
|
|
24
24
|
<view class="flex-1 flex items-center gap-2">
|
|
25
25
|
<wd-icon name="search" size="34rpx" color="#999999" />
|
|
26
|
-
<
|
|
26
|
+
<input
|
|
27
|
+
class="text-#333"
|
|
28
|
+
:placeholder="placeholder"
|
|
29
|
+
:value="form.keywords"
|
|
30
|
+
@blur="onSearch"
|
|
31
|
+
@submit="onSearch"
|
|
32
|
+
/>
|
|
27
33
|
</view>
|
|
28
34
|
</view>
|
|
29
35
|
<lcb-action-view v-bind="link" v-if="link">
|
|
@@ -38,7 +44,7 @@ import dayjs from 'dayjs/esm'
|
|
|
38
44
|
import useLocation from '../../hooks/useLocation'
|
|
39
45
|
import { inject, Ref, ref, watch } from 'vue'
|
|
40
46
|
import { LcbCalendarSearchProps } from './types'
|
|
41
|
-
import {
|
|
47
|
+
import { LcbAddress } from '../lcb-city-select/api'
|
|
42
48
|
import { FORM_KEY } from '../../constants'
|
|
43
49
|
defineOptions({
|
|
44
50
|
name: 'LcbCalendarSearch',
|
|
@@ -54,9 +60,12 @@ withDefaults(defineProps<LcbCalendarSearchProps>(), {
|
|
|
54
60
|
placeholder: '城市|地点|品牌',
|
|
55
61
|
icon: 'search',
|
|
56
62
|
})
|
|
57
|
-
const addressCity = ref<
|
|
58
|
-
const form = inject
|
|
59
|
-
const dayRange = ref([
|
|
63
|
+
const addressCity = ref<LcbAddress>()
|
|
64
|
+
const form = inject(FORM_KEY) as Ref<Record<string, any>>
|
|
65
|
+
const dayRange = ref([
|
|
66
|
+
form.value.startDate ? dayjs(form.value.startDate).valueOf() : dayjs().valueOf(),
|
|
67
|
+
form.value.endDate ? dayjs(form.value.endDate).valueOf() : dayjs().add(1, 'day').valueOf(),
|
|
68
|
+
])
|
|
60
69
|
const { translate } = useTranslate()
|
|
61
70
|
const { getLocation, userLocation } = useLocation()
|
|
62
71
|
watch(
|
|
@@ -64,7 +73,7 @@ watch(
|
|
|
64
73
|
(val) => {
|
|
65
74
|
form!.value = {
|
|
66
75
|
...form!.value,
|
|
67
|
-
|
|
76
|
+
cityId: val?.cityId,
|
|
68
77
|
}
|
|
69
78
|
},
|
|
70
79
|
)
|
|
@@ -73,12 +82,18 @@ watch(
|
|
|
73
82
|
(val) => {
|
|
74
83
|
form!.value = {
|
|
75
84
|
...form!.value,
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
startDate: dayjs(val[0]).format('YYYY-MM-DD'),
|
|
86
|
+
endDate: dayjs(val[1]).format('YYYY-MM-DD'),
|
|
78
87
|
}
|
|
79
88
|
},
|
|
80
89
|
)
|
|
81
90
|
getLocation()
|
|
91
|
+
const onSearch = (e) => {
|
|
92
|
+
form.value = {
|
|
93
|
+
...form.value,
|
|
94
|
+
keywords: e.detail.value,
|
|
95
|
+
}
|
|
96
|
+
}
|
|
82
97
|
</script>
|
|
83
98
|
|
|
84
99
|
<style lang="scss" scoped>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<view
|
|
26
26
|
class="address-tag"
|
|
27
27
|
:class="{
|
|
28
|
-
'current-address': modelValue && modelValue.
|
|
28
|
+
'current-address': modelValue && modelValue.cityId === city.cityId,
|
|
29
29
|
}"
|
|
30
30
|
v-for="city in item.childHotAddress"
|
|
31
31
|
:key="city.addr"
|
|
@@ -79,7 +79,7 @@ const locationAddress = computed<HotAddress[]>(() => {
|
|
|
79
79
|
{
|
|
80
80
|
addressInfo: props.location.addressInfo,
|
|
81
81
|
addr: props.location.cityName,
|
|
82
|
-
|
|
82
|
+
cityId: props.location.cityId,
|
|
83
83
|
},
|
|
84
84
|
],
|
|
85
85
|
},
|
|
@@ -112,9 +112,7 @@ const onAddrClick = (city: ChildHotAddress, letter = false) => {
|
|
|
112
112
|
return
|
|
113
113
|
}
|
|
114
114
|
modelValue.value = city
|
|
115
|
-
historyAddress.value = historyAddress.value.filter(
|
|
116
|
-
(item) => item.hotAddressId !== city.hotAddressId,
|
|
117
|
-
)
|
|
115
|
+
historyAddress.value = historyAddress.value.filter((item) => item.cityId !== city.cityId)
|
|
118
116
|
if (historyAddress.value.length === 8) {
|
|
119
117
|
historyAddress.value = [city, ...historyAddress.value.slice(0, 7)]
|
|
120
118
|
} else {
|
|
@@ -129,7 +127,7 @@ const indexBars = computed<HotAddress[]>(() => {
|
|
|
129
127
|
childHotAddress: letterList.value.map((v) => {
|
|
130
128
|
return {
|
|
131
129
|
addr: v,
|
|
132
|
-
|
|
130
|
+
cityId: v,
|
|
133
131
|
}
|
|
134
132
|
}),
|
|
135
133
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="p-3 box-border h-full overflow-y-auto">
|
|
3
|
-
<view v-for="item in list" :key="item.
|
|
3
|
+
<view v-for="item in list" :key="item.cityId" @click="onItemClick(item)">
|
|
4
4
|
<view class="flex">
|
|
5
5
|
<view class="tag">{{ item.categoryName }}</view>
|
|
6
6
|
<view class="content">
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<view class="flex gap-2 flex-wrap">
|
|
19
19
|
<view
|
|
20
20
|
v-for="item in historyList"
|
|
21
|
-
:key="item.
|
|
21
|
+
:key="item.cityId"
|
|
22
22
|
@click="emits('click', item)"
|
|
23
23
|
class="history-tag"
|
|
24
24
|
>
|
|
@@ -58,9 +58,9 @@ const getText = (text: string) => {
|
|
|
58
58
|
return `<div class="flex">${str}</div>`
|
|
59
59
|
}
|
|
60
60
|
const onItemClick = (item: LcbAddress) => {
|
|
61
|
-
if (historyList.value.some((historyItem) => historyItem.
|
|
61
|
+
if (historyList.value.some((historyItem) => historyItem.cityId === item.cityId)) {
|
|
62
62
|
historyList.value = historyList.value.filter(
|
|
63
|
-
(historyItem) => historyItem.
|
|
63
|
+
(historyItem) => historyItem.cityId !== item.cityId,
|
|
64
64
|
)
|
|
65
65
|
}
|
|
66
66
|
historyList.value.unshift(item)
|
|
@@ -144,7 +144,7 @@ const form = reactive({
|
|
|
144
144
|
keywords: '',
|
|
145
145
|
startDate: '',
|
|
146
146
|
endDate: '',
|
|
147
|
-
|
|
147
|
+
cityId: '',
|
|
148
148
|
})
|
|
149
149
|
|
|
150
150
|
// 今天 明天 后天 周...
|
|
@@ -172,7 +172,7 @@ watchEffect(() => {
|
|
|
172
172
|
|
|
173
173
|
watchEffect(() => {
|
|
174
174
|
if (addressCity.value) {
|
|
175
|
-
form.
|
|
175
|
+
form.cityId = addressCity.value.cityId
|
|
176
176
|
}
|
|
177
177
|
})
|
|
178
178
|
</script>
|
package/constants.ts
CHANGED
package/package.json
CHANGED
package/types/constants.d.ts
CHANGED