@tplc/business 0.5.83 → 0.5.87
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 +51 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +2 -1
- package/components/lcb-form/lcb-form.vue +0 -1
- package/hooks/usePay.ts +4 -2
- package/package.json +2 -2
- package/types/utils/history.d.ts +1 -1
- package/types/utils/utils.d.ts +2 -0
- package/utils/history.ts +3 -5
- package/utils/utils.ts +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
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.87](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.88...v0.5.87) (2025-12-10)
|
|
6
|
+
|
|
7
|
+
### [0.5.88](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.86...v0.5.88) (2025-12-10)
|
|
8
|
+
|
|
9
|
+
### [0.5.86](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.85...v0.5.86) (2025-12-10)
|
|
10
|
+
|
|
11
|
+
### [0.5.85](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.84...v0.5.85) (2025-12-10)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ✨ Features | 新功能
|
|
15
|
+
|
|
16
|
+
* form 删除 gap ([f5158bd](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/f5158bd25f0e53240401e40248b588ac5b523a8c))
|
|
17
|
+
* 兼容onUnmounted ([77dc8fb](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/77dc8fbb9d2bb144633696f8329f60e55255a15c))
|
|
18
|
+
|
|
19
|
+
### [0.5.84](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.77...v0.5.84) (2025-12-09)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
23
|
+
|
|
24
|
+
* dynamicStyleOptions 支持旧数据 ([2317541](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/23175418f5306e754ae29d58779d7d51fc507a31))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### ✨ Features | 新功能
|
|
28
|
+
|
|
29
|
+
* wrapper 支持嵌套 ([1bed138](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/1bed138292c76209e91588b49474903d9a89b9da))
|
|
30
|
+
* 修改组件f ([e520b57](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/e520b578c9c79aee9304c9244b12392cb0b8ba28))
|
|
31
|
+
* 完成数据对接 ([3332a3d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/3332a3d71916f237c2a2116d77bd9eac142e2f69))
|
|
32
|
+
* 支持页面 ([ed64824](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/ed648247161824f029876925944668d16e68bca6))
|
|
33
|
+
* 更新新版本 ([46680bf](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/46680bf2fdd0c7249cdcc4f69d491cd897b3b03d))
|
|
34
|
+
* 更新版本 ([d3789c9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d3789c92652c48673883f30fc928cad1804d32bf))
|
|
35
|
+
* 更新组件 ([a66fbd8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a66fbd819acbbb065299b31cbc133bd5f587bb58))
|
|
36
|
+
* 样式调整 ([ca05284](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/ca052842f8a46d0fd1fe097689c64f8dc5cf4625))
|
|
37
|
+
* 调整wot ([c8fff58](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c8fff587f4176cfb6b672d8ac8c59c74f62d6af1))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
41
|
+
|
|
42
|
+
* **release:** 0.5.78 ([90f2e4f](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/90f2e4f604ef7a81cdbc1092f08644f41491deab))
|
|
43
|
+
* **release:** 0.5.79 ([25fa53f](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/25fa53f0bc568c0724788083fc3256b25d44a1dd))
|
|
44
|
+
* **release:** 0.5.80 ([daddbf0](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/daddbf06cd12af7ea2839170761e2cd6ad4078bf))
|
|
45
|
+
* **release:** 0.5.81 ([2665f8e](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2665f8e13abbecb374fe2a967fdb1230090ff05d))
|
|
46
|
+
* **release:** 0.5.82 ([f0f0165](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/f0f0165579962436947847327b1b2fb526d2c78c))
|
|
47
|
+
* **release:** 0.5.83 ([7b554a2](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/7b554a2f7b9769332cab48d45abf478179ca912a))
|
|
48
|
+
* **release:** 1.0.10 ([df4962a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/df4962a8de075a75360af29f05191c61ed307732))
|
|
49
|
+
* **release:** 1.0.11 ([f771de5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/f771de5465dfe1c1d7a2ffa59651ca6a724ad1a5))
|
|
50
|
+
* **release:** 1.0.12 ([1e3c8b1](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/1e3c8b1b0d46b8d32be6c1c7a0a228835851ed96))
|
|
51
|
+
* **release:** 1.0.13 ([9d07427](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/9d074276e665c18ea6ee48cde9d9a9cb6f45daa0))
|
|
52
|
+
* **release:** 1.0.14 ([95de480](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/95de480e4e61b07ebae3b822ba1ecf4a4e519c3f))
|
|
53
|
+
* **release:** 1.0.8 ([cd4c286](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/cd4c2869dfb4a207c86fff6e70584d43e0909de8))
|
|
54
|
+
* **release:** 1.0.9 ([55f4819](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/55f4819cd70549b5f2bdc962ddf687091df9cb3a))
|
|
55
|
+
|
|
5
56
|
### [0.5.83](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.13...v0.5.83) (2025-12-06)
|
|
6
57
|
|
|
7
58
|
|
|
@@ -68,6 +68,7 @@ import { LcbAddress } from '../lcb-city-select/api'
|
|
|
68
68
|
import { FORM_KEY } from '../../constants'
|
|
69
69
|
import { getHistoryCity } from '../../utils/history'
|
|
70
70
|
import { stringify } from 'qs'
|
|
71
|
+
import { getCityData } from '../../utils/utils'
|
|
71
72
|
defineOptions({
|
|
72
73
|
name: 'LcbCalendarSearch',
|
|
73
74
|
options: {
|
|
@@ -128,7 +129,7 @@ watch(
|
|
|
128
129
|
() => form.value.addressName,
|
|
129
130
|
(val) => {
|
|
130
131
|
if (addressCity.value?.addressName !== val) {
|
|
131
|
-
addressCity.value = form.value
|
|
132
|
+
addressCity.value = getCityData(form.value)
|
|
132
133
|
}
|
|
133
134
|
},
|
|
134
135
|
)
|
package/hooks/usePay.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { commitOrder, queryOrderPaymentStatus, type CommitPageDetailParams } from '../api/pay'
|
|
2
2
|
import { onPageHide } from '@dcloudio/uni-app'
|
|
3
3
|
import { IResData } from '../action'
|
|
4
|
-
import { ref } from 'vue'
|
|
4
|
+
import { onUnmounted, ref } from 'vue'
|
|
5
5
|
|
|
6
6
|
const usePay = (
|
|
7
7
|
fun?: (data: unknown) => Promise<IResData<any>>,
|
|
@@ -65,7 +65,9 @@ const usePay = (
|
|
|
65
65
|
})
|
|
66
66
|
}
|
|
67
67
|
onPageHide(() => {
|
|
68
|
-
|
|
68
|
+
cancel?.()
|
|
69
|
+
})
|
|
70
|
+
onUnmounted(() => {
|
|
69
71
|
cancel?.()
|
|
70
72
|
})
|
|
71
73
|
return [pay]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.87",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"业务组件"
|
|
6
6
|
],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"vue": ">=3.2.47",
|
|
14
|
-
"@tplc/wot": "1.0.
|
|
14
|
+
"@tplc/wot": "1.0.14"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|
package/types/utils/history.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import { ChildHotAddress } from '../components/lcb-city-select/api'
|
|
|
2
2
|
/** 设置城市历史记录 */
|
|
3
3
|
export declare const setHistoryCity: (address?: ChildHotAddress) => void
|
|
4
4
|
/** 获取城市历史记录如果超过3天就不使用历史 */
|
|
5
|
-
export declare const getHistoryCity: () =>
|
|
5
|
+
export declare const getHistoryCity: () => import('../components/lcb-city-select/api').LcbAddress
|
package/types/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UploadMethod } from '@tplc/wot/types/components/wd-upload/types'
|
|
2
|
+
import { LcbAddress } from '../components/lcb-city-select/api'
|
|
2
3
|
export declare function formatJson(str: string | object | undefined, defVal?: {}): {}
|
|
3
4
|
/** 获取上个页面Exposed */
|
|
4
5
|
export declare const getExposed: () => any
|
|
@@ -47,3 +48,4 @@ export declare const getOssImageSize: (url: string) => Promise<{
|
|
|
47
48
|
width: number
|
|
48
49
|
height: number
|
|
49
50
|
}>
|
|
51
|
+
export declare const getCityData: (data: Record<string, unknown>) => LcbAddress
|
package/utils/history.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChildHotAddress } from '../components/lcb-city-select/api'
|
|
2
|
+
import { getCityData } from './utils'
|
|
2
3
|
|
|
3
4
|
/** 设置城市历史记录 */
|
|
4
5
|
export const setHistoryCity = (address?: ChildHotAddress) => {
|
|
@@ -12,9 +13,6 @@ export const setHistoryCity = (address?: ChildHotAddress) => {
|
|
|
12
13
|
/** 获取城市历史记录如果超过3天就不使用历史 */
|
|
13
14
|
export const getHistoryCity = () => {
|
|
14
15
|
const history = uni.getStorageSync('cityHistory')
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} else {
|
|
18
|
-
return getApp().globalData!.currentCity
|
|
19
|
-
}
|
|
16
|
+
const data = history?.address ? getCityData(history.address) : getApp().globalData!.currentCity
|
|
17
|
+
return getCityData(data)
|
|
20
18
|
}
|
package/utils/utils.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { UploadMethod } from '@tplc/wot/types/components/wd-upload/types'
|
|
|
3
3
|
import { uploadFile } from '../hooks/useUpload'
|
|
4
4
|
import { parse, stringify } from 'qs'
|
|
5
5
|
import { get } from 'lodash-es'
|
|
6
|
-
import { transformValueUnit } from './transform'
|
|
7
6
|
import { getCurrentInstance } from 'vue'
|
|
7
|
+
import { LcbAddress } from '../components/lcb-city-select/api'
|
|
8
8
|
export function formatJson(str: string | object | undefined, defVal = {}) {
|
|
9
9
|
if (!str) return defVal
|
|
10
10
|
if (typeof str === 'object') return str
|
|
@@ -197,3 +197,16 @@ export const getOssImageSize = async (url: string) => {
|
|
|
197
197
|
})
|
|
198
198
|
})
|
|
199
199
|
}
|
|
200
|
+
|
|
201
|
+
export const getCityData = (data: Record<string, unknown>) => {
|
|
202
|
+
const keys = ['addressName', 'cityId', 'provinceId', 'areaId']
|
|
203
|
+
return keys.reduce(
|
|
204
|
+
(acc, key) => {
|
|
205
|
+
if (data[key] !== undefined) {
|
|
206
|
+
acc[key] = data[key]
|
|
207
|
+
}
|
|
208
|
+
return acc
|
|
209
|
+
},
|
|
210
|
+
{} as unknown as LcbAddress,
|
|
211
|
+
)
|
|
212
|
+
}
|