@tplc/business 0.4.10 → 0.4.12
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-filter/types.ts +1 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +22 -1
- package/components/lcb-calendar-search/types.ts +2 -0
- package/components/lcb-search/lcb-search.vue +6 -0
- package/package.json +1 -1
- package/types/components/lcb-calendar-filter/types.d.ts +1 -0
- package/types/components/lcb-calendar-search/lcb-calendar-search.vue.d.ts +3 -0
- package/types/components/lcb-calendar-search/types.d.ts +2 -0
- package/utils/formatter.ts +6 -0
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.12](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.11...v0.4.12) (2025-03-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 搜索条件处理 ([56fb8cd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/56fb8cd2a4909b885d493809e92eff59ed784c08))
|
|
11
|
+
|
|
12
|
+
### [0.4.11](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.10...v0.4.11) (2025-03-25)
|
|
13
|
+
|
|
5
14
|
### [0.4.10](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.9...v0.4.10) (2025-03-25)
|
|
6
15
|
|
|
7
16
|
### [0.4.9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.8...v0.4.9) (2025-03-25)
|
|
@@ -29,10 +29,21 @@
|
|
|
29
29
|
:value="form.keywords"
|
|
30
30
|
@blur="onSearch"
|
|
31
31
|
@submit="onSearch"
|
|
32
|
+
v-if="mode === 'search'"
|
|
32
33
|
/>
|
|
34
|
+
<lcb-action-view
|
|
35
|
+
v-else
|
|
36
|
+
v-bind="inputLink"
|
|
37
|
+
custom-class="!w-full"
|
|
38
|
+
:customStyle="{
|
|
39
|
+
color: form.keywords ? 'var(--content-color)' : '#969696',
|
|
40
|
+
}"
|
|
41
|
+
>
|
|
42
|
+
{{ form.keywords || placeholder }}
|
|
43
|
+
</lcb-action-view>
|
|
33
44
|
</view>
|
|
34
45
|
</view>
|
|
35
|
-
<lcb-action-view v-bind="link" v-if="link" :url-params="form">
|
|
46
|
+
<lcb-action-view v-bind="link" v-if="link" :url-params="stringify(form)">
|
|
36
47
|
<wd-icon :name="icon" class-prefix="lcb" size="36rpx" color="#000" custom-class="ml-4" />
|
|
37
48
|
</lcb-action-view>
|
|
38
49
|
</lcb-block>
|
|
@@ -47,6 +58,7 @@ import { LcbCalendarSearchProps } from './types'
|
|
|
47
58
|
import { LcbAddress } from '../lcb-city-select/api'
|
|
48
59
|
import { FORM_KEY } from '../../constants'
|
|
49
60
|
import { getHistoryCity } from '../../utils/history'
|
|
61
|
+
import { stringify } from 'qs'
|
|
50
62
|
defineOptions({
|
|
51
63
|
name: 'LcbCalendarSearch',
|
|
52
64
|
options: {
|
|
@@ -60,6 +72,7 @@ withDefaults(defineProps<LcbCalendarSearchProps>(), {
|
|
|
60
72
|
radius: 16,
|
|
61
73
|
placeholder: '城市|地点|品牌',
|
|
62
74
|
icon: 'search',
|
|
75
|
+
mode: 'search',
|
|
63
76
|
})
|
|
64
77
|
|
|
65
78
|
const form = inject(FORM_KEY) as Ref<Record<string, any>>
|
|
@@ -102,6 +115,14 @@ onMounted(() => {
|
|
|
102
115
|
},
|
|
103
116
|
)
|
|
104
117
|
})
|
|
118
|
+
watch(
|
|
119
|
+
() => form.value.addressName,
|
|
120
|
+
(val) => {
|
|
121
|
+
if (addressCity.value?.addressName !== val) {
|
|
122
|
+
addressCity.value = form.value as LcbAddress
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
)
|
|
105
126
|
</script>
|
|
106
127
|
|
|
107
128
|
<style lang="scss" scoped>
|
|
@@ -152,6 +152,12 @@ const onSelect = (keyword: ProductInfo) => {
|
|
|
152
152
|
cityId: options.cityId,
|
|
153
153
|
...queryParams,
|
|
154
154
|
}
|
|
155
|
+
// 清空值为undefined
|
|
156
|
+
Object.keys(queryParams).forEach((key) => {
|
|
157
|
+
if (queryParams[key] === undefined) {
|
|
158
|
+
delete queryParams[key]
|
|
159
|
+
}
|
|
160
|
+
})
|
|
155
161
|
if (options.jumpType !== 'jump') {
|
|
156
162
|
uni.$emit(`${getPreviousPageId()}_filter_change`, queryParams)
|
|
157
163
|
uni.navigateBack()
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
7
7
|
radius: number
|
|
8
8
|
placeholder: string
|
|
9
9
|
icon: string
|
|
10
|
+
mode: string
|
|
10
11
|
}
|
|
11
12
|
>,
|
|
12
13
|
{},
|
|
@@ -27,11 +28,13 @@ declare const _default: import('vue').DefineComponent<
|
|
|
27
28
|
radius: number
|
|
28
29
|
placeholder: string
|
|
29
30
|
icon: string
|
|
31
|
+
mode: string
|
|
30
32
|
}
|
|
31
33
|
>
|
|
32
34
|
>
|
|
33
35
|
>,
|
|
34
36
|
{
|
|
37
|
+
mode: 'link' | 'search'
|
|
35
38
|
icon: string
|
|
36
39
|
radius: number
|
|
37
40
|
placeholder: string
|
package/utils/formatter.ts
CHANGED
|
@@ -13,9 +13,15 @@ export const calendarFormatter =
|
|
|
13
13
|
const nowMonth = now.getMonth()
|
|
14
14
|
const nowDa = now.getDate()
|
|
15
15
|
const info = holidayInfo[dayjs(day.date).format('YYYY-MM-DD')]
|
|
16
|
+
if (info?.topText) {
|
|
17
|
+
day.topInfo = info.topText
|
|
18
|
+
}
|
|
16
19
|
if (info?.bottomText) {
|
|
17
20
|
day.bottomInfo = info.bottomText
|
|
18
21
|
}
|
|
22
|
+
if (info?.centerText) {
|
|
23
|
+
day.text = info.centerText
|
|
24
|
+
}
|
|
19
25
|
if (year === nowYear && month === nowMonth && da === nowDa) {
|
|
20
26
|
day.topInfo = t('今天')
|
|
21
27
|
}
|