@tplc/business 0.4.90 → 0.4.92
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 +14 -0
- package/components/lcb-button/lcb-button.vue +5 -4
- package/components/lcb-nav/lcb-nav.vue +2 -0
- package/components/lcb-title/lcb-title.vue +11 -0
- package/components/lcb-title/types.ts +4 -0
- package/package.json +1 -1
- package/types/components/lcb-nav/lcb-nav.vue.d.ts +3 -0
- package/types/components/lcb-title/types.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.92](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.91...v0.4.92) (2025-05-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 新增nav ([3e05736](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3e05736e996ae5e2e69cdf8e127f21386aa96c6e))
|
|
11
|
+
|
|
12
|
+
### [0.4.91](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.90...v0.4.91) (2025-05-05)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
17
|
+
* 新增配置title ([f51f370](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f51f370c0528339cf98e759ddf06123192127ee3))
|
|
18
|
+
|
|
5
19
|
### [0.4.90](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.89...v0.4.90) (2025-05-04)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -39,6 +39,7 @@ import { computed, inject, Ref } from 'vue'
|
|
|
39
39
|
import { LcbButtonProps } from './types'
|
|
40
40
|
import { PAGE_PROVIDE_KEY } from '../../constants'
|
|
41
41
|
import { getFlexStyle, transformValueUnit } from '../../utils/transform'
|
|
42
|
+
import { get } from 'lodash-es'
|
|
42
43
|
defineOptions({
|
|
43
44
|
name: 'LcbButton',
|
|
44
45
|
options: {
|
|
@@ -61,9 +62,9 @@ const dynamicValue = computed(() => {
|
|
|
61
62
|
let value = ''
|
|
62
63
|
if (props.dynamicKey) {
|
|
63
64
|
if (props.keyFromUser) {
|
|
64
|
-
value = userStore?.userInfo
|
|
65
|
+
value = get(userStore?.userInfo, props.dynamicKey)
|
|
65
66
|
} else {
|
|
66
|
-
value = pageInfo.value
|
|
67
|
+
value = get(pageInfo.value, props.dynamicKey)
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
return value
|
|
@@ -76,9 +77,9 @@ const innerValue = computed(() => {
|
|
|
76
77
|
if (props.text && props.text.includes('${')) {
|
|
77
78
|
value = props.text.replace(/\$\{([^}]+)\}/g, (_, p) => {
|
|
78
79
|
if (props.keyFromUser) {
|
|
79
|
-
return userStore?.userInfo
|
|
80
|
+
return get(userStore?.userInfo, p) ?? props.textDefaultValue ?? ''
|
|
80
81
|
} else {
|
|
81
|
-
return pageInfo.value
|
|
82
|
+
return get(pageInfo.value, p) ?? props.textDefaultValue ?? ''
|
|
82
83
|
}
|
|
83
84
|
})
|
|
84
85
|
}
|
|
@@ -166,6 +166,7 @@ const props = withDefaults(defineProps<NavProps>(), {
|
|
|
166
166
|
textSize: 32,
|
|
167
167
|
fontWeight: 500,
|
|
168
168
|
textColor: '#000000',
|
|
169
|
+
keyFromUser: false,
|
|
169
170
|
})
|
|
170
171
|
const navbarBgColor = computed(() => {
|
|
171
172
|
return props.backgroundType === 'color' ? props.backColor : ''
|
|
@@ -208,6 +209,7 @@ const titleProps = computed(() => {
|
|
|
208
209
|
titleLocation: props.titleLocation,
|
|
209
210
|
textSize: props.textSize,
|
|
210
211
|
fontWeight: props.fontWeight,
|
|
212
|
+
keyFromUser: props.keyFromUser,
|
|
211
213
|
}
|
|
212
214
|
})
|
|
213
215
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
v-bind="{
|
|
4
4
|
...$props,
|
|
5
5
|
}"
|
|
6
|
+
v-if="showTitle"
|
|
6
7
|
>
|
|
7
8
|
<lcb-action-view :customClass="`!flex ${justify} !leading-none`" v-bind="action">
|
|
8
9
|
<view
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
import { LcbTitleProps } from './types'
|
|
65
66
|
import { transformValueUnit } from '../../utils/transform'
|
|
66
67
|
import { computed, inject } from 'vue'
|
|
68
|
+
import { get } from 'lodash-es'
|
|
67
69
|
const themeColor = inject('theme-color', '#3875FF')
|
|
68
70
|
defineOptions({
|
|
69
71
|
name: 'LcbTitle',
|
|
@@ -97,4 +99,13 @@ const props = withDefaults(defineProps<LcbTitleProps>(), {
|
|
|
97
99
|
const customStyle = computed(() => {
|
|
98
100
|
return props.iconRight ? `margin-right:${transformValueUnit(props.iconRight)}` : ''
|
|
99
101
|
})
|
|
102
|
+
const showTitle = computed(() => {
|
|
103
|
+
if (props.visibleKeyFromUser) {
|
|
104
|
+
const userInfo = uni.$lcb.userStore?.()?.userInfo
|
|
105
|
+
return props.visibleKeyReverse
|
|
106
|
+
? !get(userInfo, props.visibleKeyFromUser)
|
|
107
|
+
: get(userInfo, props.visibleKeyFromUser)
|
|
108
|
+
}
|
|
109
|
+
return true
|
|
110
|
+
})
|
|
100
111
|
</script>
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
19
19
|
textSize: number
|
|
20
20
|
fontWeight: number
|
|
21
21
|
textColor: string
|
|
22
|
+
keyFromUser: boolean
|
|
22
23
|
}
|
|
23
24
|
>,
|
|
24
25
|
{},
|
|
@@ -51,6 +52,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
51
52
|
textSize: number
|
|
52
53
|
fontWeight: number
|
|
53
54
|
textColor: string
|
|
55
|
+
keyFromUser: boolean
|
|
54
56
|
}
|
|
55
57
|
>
|
|
56
58
|
>
|
|
@@ -59,6 +61,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
59
61
|
title: string
|
|
60
62
|
fontWeight: number
|
|
61
63
|
styleGroup: 1 | 2 | 3 | 4
|
|
64
|
+
keyFromUser: boolean
|
|
62
65
|
back: boolean
|
|
63
66
|
textSize: number
|
|
64
67
|
topStyle: 1 | 2
|