@tplc/business 0.4.68 → 0.4.70
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 +15 -0
- package/action.d.ts +3 -0
- package/components/lcb-button/lcb-button.vue +10 -11
- package/package.json +2 -2
- package/utils/history.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
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.70](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.81...v0.4.70) (2025-04-12)
|
|
6
|
+
|
|
7
|
+
### [0.4.69](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.80...v0.4.69) (2025-04-10)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
11
|
+
|
|
12
|
+
* **release:** 0.4.68 ([1d4e0de](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1d4e0de1dbfeacb26b4ba47fd471f6ee3a40585a))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
17
|
+
* 调整图片存储 ([629dc80](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/629dc8060f9519b016419175017d76f3ebfeb557))
|
|
18
|
+
* 调整按钮配置 ([db5503f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/db5503f9e94ba00bc37947c401a3e4d5b52abb4d))
|
|
19
|
+
|
|
5
20
|
### [0.4.68](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.64...v0.4.68) (2025-04-09)
|
|
6
21
|
|
|
7
22
|
|
package/action.d.ts
CHANGED
|
@@ -37,6 +37,9 @@ export interface LcbGlobal {
|
|
|
37
37
|
updateUser: (data: Record<string, any>, isLogin?: boolean) => void
|
|
38
38
|
getUser: () => void
|
|
39
39
|
}
|
|
40
|
+
constantsStore?: () => {
|
|
41
|
+
mainConfig?: Record<string, any>
|
|
42
|
+
}
|
|
40
43
|
getIsTabbar: () => boolean
|
|
41
44
|
layoutId: string
|
|
42
45
|
internalPages: {
|
|
@@ -25,14 +25,9 @@
|
|
|
25
25
|
:color="iconColor"
|
|
26
26
|
/>
|
|
27
27
|
<template v-if="mode === 'image'">
|
|
28
|
-
<wd-img
|
|
29
|
-
:src="innerValue || props.url"
|
|
30
|
-
:width="imageWidth"
|
|
31
|
-
:height="imageHeight"
|
|
32
|
-
mode="aspectFit"
|
|
33
|
-
/>
|
|
28
|
+
<wd-img :src="innerValue" :width="imageWidth" :height="imageHeight" mode="aspectFit" />
|
|
34
29
|
</template>
|
|
35
|
-
<template v-else>{{ innerValue
|
|
30
|
+
<template v-else>{{ innerValue }}</template>
|
|
36
31
|
</view>
|
|
37
32
|
</lcb-action-view>
|
|
38
33
|
</lcb-block>
|
|
@@ -75,12 +70,16 @@ const dynamicValue = computed(() => {
|
|
|
75
70
|
})
|
|
76
71
|
const innerValue = computed(() => {
|
|
77
72
|
if (props.mode === 'image') {
|
|
78
|
-
return dynamicValue.value
|
|
73
|
+
return dynamicValue.value || props.url
|
|
79
74
|
}
|
|
80
|
-
let value =
|
|
75
|
+
let value = props.text
|
|
81
76
|
if (props.text && props.text.includes('${')) {
|
|
82
|
-
value = props.text.replace(/\$\{([^}]+)\}/g, () => {
|
|
83
|
-
|
|
77
|
+
value = props.text.replace(/\$\{([^}]+)\}/g, (_, p) => {
|
|
78
|
+
if (props.keyFromUser) {
|
|
79
|
+
return userStore?.userInfo?.[p] ?? props.textDefaultValue ?? ''
|
|
80
|
+
} else {
|
|
81
|
+
return pageInfo.value?.[p] ?? props.textDefaultValue ?? ''
|
|
82
|
+
}
|
|
84
83
|
})
|
|
85
84
|
}
|
|
86
85
|
return value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.70",
|
|
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": "0.1.
|
|
14
|
+
"@tplc/wot": "0.1.81"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|
package/utils/history.ts
CHANGED
|
@@ -11,7 +11,11 @@ export const setHistoryCity = (address?: ChildHotAddress) => {
|
|
|
11
11
|
/** 获取城市历史记录如果超过3天就不使用历史 */
|
|
12
12
|
export const getHistoryCity = () => {
|
|
13
13
|
const history = uni.getStorageSync('cityHistory')
|
|
14
|
-
if (
|
|
14
|
+
if (
|
|
15
|
+
history &&
|
|
16
|
+
new Date().getTime() - history.time <
|
|
17
|
+
(uni.$lcb.constantsStore?.().mainConfig?.cityExpirationTime || 0)
|
|
18
|
+
) {
|
|
15
19
|
return history.address as ChildHotAddress
|
|
16
20
|
}
|
|
17
21
|
}
|