@tplc/business 0.4.13 → 0.4.14
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 +2 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +13 -3
- package/components/lcb-list/components/TreeSelect/index.vue +1 -1
- package/components/lcb-list/hooks/useSelect.ts +0 -1
- package/package.json +1 -1
- package/types/utils/transform.d.ts +2 -0
- package/utils/transform.ts +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.14](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.13...v0.4.14) (2025-03-25)
|
|
6
|
+
|
|
5
7
|
### [0.4.13](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.12...v0.4.13) (2025-03-25)
|
|
6
8
|
|
|
7
9
|
|
|
@@ -59,6 +59,8 @@ import { LcbAddress } from '../lcb-city-select/api'
|
|
|
59
59
|
import { FORM_KEY } from '../../constants'
|
|
60
60
|
import { getHistoryCity } from '../../utils/history'
|
|
61
61
|
import { stringify } from 'qs'
|
|
62
|
+
import { cleanOutSizeKeys } from '../../utils/transform'
|
|
63
|
+
import { getCurrentPage } from '../../utils/utils'
|
|
62
64
|
defineOptions({
|
|
63
65
|
name: 'LcbCalendarSearch',
|
|
64
66
|
options: {
|
|
@@ -90,10 +92,18 @@ watch(
|
|
|
90
92
|
() => addressCity.value,
|
|
91
93
|
(val) => {
|
|
92
94
|
if (val) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
const params: Record<string, any> = {
|
|
96
|
+
cityId: val?.cityId,
|
|
97
|
+
areaId: val?.areaId,
|
|
98
|
+
addressName: val?.addressName,
|
|
99
|
+
}
|
|
95
100
|
if (val.keywords) {
|
|
96
|
-
|
|
101
|
+
params.keywords = val.keywords
|
|
102
|
+
}
|
|
103
|
+
const datas = cleanOutSizeKeys(form.value, Object.keys(getCurrentPage().options))
|
|
104
|
+
form.value = {
|
|
105
|
+
...datas,
|
|
106
|
+
...params,
|
|
97
107
|
}
|
|
98
108
|
}
|
|
99
109
|
},
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</view>
|
|
15
15
|
<view class="scroll-view flex-1 w-0 bg-#FAFAFA pl-4" v-if="mode === 'single'">
|
|
16
16
|
<view
|
|
17
|
-
v-for="item in options[currentCategory]
|
|
17
|
+
v-for="item in options[currentCategory]?.children"
|
|
18
18
|
:key="item.label"
|
|
19
19
|
@click="onItemClick(item, options[currentCategory].valueName)"
|
|
20
20
|
class="filter-select flex justify-between items-center !px-36rpx !py-30rpx"
|
package/package.json
CHANGED
|
@@ -3,3 +3,5 @@ export declare const transformValueUnit: (value?: number | string, uni?: string)
|
|
|
3
3
|
export declare const getJsonStrFirstUrl: (jsonStr?: string) => any
|
|
4
4
|
/** 获取json字符串列表 */
|
|
5
5
|
export declare const getJsonStrList: (jsonStr?: string) => any
|
|
6
|
+
/** 删除其他外部字段 */
|
|
7
|
+
export declare const cleanOutSizeKeys: (obj: Record<string, any>, keys?: string[]) => {}
|
package/utils/transform.ts
CHANGED
|
@@ -12,3 +12,17 @@ export const getJsonStrFirstUrl = (jsonStr = '[]') => {
|
|
|
12
12
|
export const getJsonStrList = (jsonStr = '[]') => {
|
|
13
13
|
return JSON.parse(jsonStr)
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
/** 删除其他外部字段 */
|
|
17
|
+
export const cleanOutSizeKeys = (
|
|
18
|
+
obj: Record<string, any>,
|
|
19
|
+
/** 保留字段 */
|
|
20
|
+
keys: string[] = [],
|
|
21
|
+
) => {
|
|
22
|
+
return Object.keys(obj).reduce((acc, key) => {
|
|
23
|
+
if ([...keys, ...['endDate', 'startDate', 'keywords']].includes(key)) {
|
|
24
|
+
acc[key] = obj[key]
|
|
25
|
+
}
|
|
26
|
+
return acc
|
|
27
|
+
}, {})
|
|
28
|
+
}
|