@tplc/business 0.4.60 → 0.4.62
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 +38 -0
- package/action.d.ts +1 -1
- package/components/lcb-area/lcb-area.vue +13 -5
- package/components/lcb-area/types.ts +4 -0
- package/components/lcb-button/lcb-button.vue +36 -15
- package/components/lcb-button/types.ts +6 -0
- package/components/lcb-calendar-filter/components/CalendarItem/index.vue +1 -1
- package/components/lcb-img-nav/lcb-img-nav.vue +6 -4
- package/components/lcb-product-item/components/ItemValue.vue +1 -1
- package/components/lcb-user-order/lcb-user-order.vue +6 -3
- package/components/lcb-user-top/lcb-user-top.vue +7 -4
- package/package.json +1 -1
- package/types/components/lcb-area/types.d.ts +4 -0
- package/types/components/lcb-button/lcb-button.vue.d.ts +9 -0
- package/types/components/lcb-button/types.d.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,44 @@
|
|
|
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.62](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.54...v0.4.62) (2025-04-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.4.55 ([fd9f215](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/fd9f215e1aea5a34fdba7aceff45bd1ad15aaac8))
|
|
11
|
+
* **release:** 0.4.56 ([0522d7b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0522d7b464f8bfd0429f8b0010f7bf350d4a6263))
|
|
12
|
+
* **release:** 0.4.57 ([3917b65](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3917b6503fbdba726d588978eaf181e9f504f4be))
|
|
13
|
+
* **release:** 0.4.58 ([68ad328](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/68ad3282ee9f7cd2b3b1f82a0697723852865922))
|
|
14
|
+
* **release:** 0.4.59 ([9b74e0e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9b74e0e52cfe28e64b8b8d6c6c9d4f08a363a367))
|
|
15
|
+
* **release:** 0.4.60 ([bb792c5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/bb792c5989a693384d324e4fa23e95aef268649e))
|
|
16
|
+
* **release:** 0.4.61 ([9dbf9dc](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9dbf9dc11d772fa2f0ed2cfd794f173060a62ff0))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
20
|
+
|
|
21
|
+
* img ([ba700e5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ba700e50dc529c9f5b9e6386c61aa0747bc8b519))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### ✨ Features | 新功能
|
|
25
|
+
|
|
26
|
+
* button 配置 ([f01230d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f01230d73ea058222495648378389c5dcaec0ba9))
|
|
27
|
+
* 修改 rate ([afc9da2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/afc9da279a4a0f3425e6425cec8936fdc646936d))
|
|
28
|
+
* 修改样式 ([10f7b8d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/10f7b8d22dafe59374fac3728917eaef835eac72))
|
|
29
|
+
* 暂时支持搜索 ([a592c77](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a592c77a9c162b73e223c785b7932ec17253f4ea))
|
|
30
|
+
* 调整 ([6fff186](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6fff186f6a6630b7389337c269c291aa6982be72))
|
|
31
|
+
* 调整地址策略 ([9b9a258](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9b9a2583864075e4daac9a192ec91f8b91e2ce9d))
|
|
32
|
+
* 调整数据 ([3778c3c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3778c3caf8ff0193ebac4206945b52c75be8d7af))
|
|
33
|
+
* 调整数据 ([ba5f1e2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ba5f1e2bbb877ae791a9a09f640e2de95a6a1efc))
|
|
34
|
+
* 部署按钮 ([1b783b3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1b783b3180b81f0f75ff46a5b41110d17d23baaa))
|
|
35
|
+
|
|
36
|
+
### [0.4.61](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.60...v0.4.61) (2025-04-06)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### ✨ Features | 新功能
|
|
40
|
+
|
|
41
|
+
* 调整 ([6fff186](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6fff186f6a6630b7389337c269c291aa6982be72))
|
|
42
|
+
|
|
5
43
|
### [0.4.60](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.59...v0.4.60) (2025-04-06)
|
|
6
44
|
|
|
7
45
|
|
package/action.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface LcbGlobal {
|
|
|
34
34
|
}
|
|
35
35
|
userStore?: () => {
|
|
36
36
|
userInfo: Record<string, any>
|
|
37
|
-
updateUser: (data: Record<string, any
|
|
37
|
+
updateUser: (data: Record<string, any>, isLogin?: boolean) => void
|
|
38
38
|
getUser: () => void
|
|
39
39
|
}
|
|
40
40
|
getIsTabbar: () => boolean
|
|
@@ -14,11 +14,7 @@
|
|
|
14
14
|
:key="item.id"
|
|
15
15
|
class="slot-wrapper"
|
|
16
16
|
:style="{
|
|
17
|
-
|
|
18
|
-
areaItems?.[index]?.colSpan && display === 'grid'
|
|
19
|
-
? `span ${areaItems?.[index]?.colSpan} / span ${areaItems?.[index]?.colSpan}`
|
|
20
|
-
: undefined,
|
|
21
|
-
flex: display === 'flex' ? '1 1 0' : undefined,
|
|
17
|
+
...getStyle(index),
|
|
22
18
|
overflowX,
|
|
23
19
|
}"
|
|
24
20
|
>
|
|
@@ -58,6 +54,18 @@ const innerStyle = computed(() => {
|
|
|
58
54
|
alignItems: 'stretch',
|
|
59
55
|
}
|
|
60
56
|
})
|
|
57
|
+
|
|
58
|
+
const getStyle = (index: number) => {
|
|
59
|
+
const flex = props.areaFlexs?.[index]?.flex ?? 1
|
|
60
|
+
return {
|
|
61
|
+
gridColumn:
|
|
62
|
+
props.areaItems?.[index]?.colSpan && props.display === 'grid'
|
|
63
|
+
? `span ${props.areaItems?.[index]?.colSpan} / span ${props.areaItems?.[index]?.colSpan}`
|
|
64
|
+
: undefined,
|
|
65
|
+
flex: props.display === 'flex' ? flex || 'auto' : undefined,
|
|
66
|
+
flexShrink: props.display === 'flex' ? (props.flexShrink ?? 1) : undefined,
|
|
67
|
+
}
|
|
68
|
+
}
|
|
61
69
|
</script>
|
|
62
70
|
|
|
63
71
|
<style lang="scss" scoped>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:style="{
|
|
5
5
|
...innerStyle,
|
|
6
6
|
}"
|
|
7
|
+
v-if="dynamicKey && hideWhenDynamicKeyNotExist ? dynamicValue : true"
|
|
7
8
|
>
|
|
8
9
|
<lcb-block
|
|
9
10
|
v-bind="$props"
|
|
@@ -15,15 +16,24 @@
|
|
|
15
16
|
}"
|
|
16
17
|
>
|
|
17
18
|
<lcb-action-view v-bind="action" @avatar="onAvatar">
|
|
18
|
-
<
|
|
19
|
-
<wd-
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
<view class="!flex items-center justify-center" :style="`gap: ${iconGap}rpx`">
|
|
20
|
+
<wd-icon
|
|
21
|
+
v-if="icon"
|
|
22
|
+
:name="icon"
|
|
23
|
+
class-prefix="lcb"
|
|
24
|
+
:size="transformValueUnit(iconSize)"
|
|
25
|
+
:color="iconColor"
|
|
24
26
|
/>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
<template v-if="mode === 'image'">
|
|
28
|
+
<wd-img
|
|
29
|
+
:src="innerValue || props.url"
|
|
30
|
+
:width="imageWidth"
|
|
31
|
+
:height="imageHeight"
|
|
32
|
+
mode="aspectFit"
|
|
33
|
+
/>
|
|
34
|
+
</template>
|
|
35
|
+
<template v-else>{{ innerValue || props.text }}</template>
|
|
36
|
+
</view>
|
|
27
37
|
</lcb-action-view>
|
|
28
38
|
</lcb-block>
|
|
29
39
|
</view>
|
|
@@ -33,7 +43,7 @@
|
|
|
33
43
|
import { computed, inject, Ref } from 'vue'
|
|
34
44
|
import { LcbButtonProps } from './types'
|
|
35
45
|
import { PAGE_PROVIDE_KEY } from '../../constants'
|
|
36
|
-
import { getFlexStyle } from '../../utils/transform'
|
|
46
|
+
import { getFlexStyle, transformValueUnit } from '../../utils/transform'
|
|
37
47
|
defineOptions({
|
|
38
48
|
name: 'LcbButton',
|
|
39
49
|
options: {
|
|
@@ -45,10 +55,14 @@ defineOptions({
|
|
|
45
55
|
const props = withDefaults(defineProps<LcbButtonProps>(), {
|
|
46
56
|
color: '#ffffff',
|
|
47
57
|
backgroundColor: 'var(--wot-color-theme)',
|
|
58
|
+
hideWhenDynamicKeyNotExist: false,
|
|
59
|
+
iconGap: 4,
|
|
60
|
+
iconSize: 24,
|
|
48
61
|
})
|
|
49
62
|
const pageInfo = inject(PAGE_PROVIDE_KEY) as Ref<Record<string, any>>
|
|
50
63
|
const userStore = uni.$lcb.userStore?.()
|
|
51
|
-
|
|
64
|
+
|
|
65
|
+
const dynamicValue = computed(() => {
|
|
52
66
|
let value = ''
|
|
53
67
|
if (props.dynamicKey) {
|
|
54
68
|
if (props.keyFromUser) {
|
|
@@ -57,21 +71,28 @@ const innerValue = computed(() => {
|
|
|
57
71
|
value = pageInfo.value?.[props.dynamicKey]
|
|
58
72
|
}
|
|
59
73
|
}
|
|
74
|
+
return value
|
|
75
|
+
})
|
|
76
|
+
const innerValue = computed(() => {
|
|
77
|
+
let value = ''
|
|
60
78
|
if (props.text.includes('${')) {
|
|
61
79
|
value = props.text.replace(/\$\{([^}]+)\}/g, (_, p1) => {
|
|
62
80
|
if (props.keyFromUser) {
|
|
63
|
-
return userStore?.userInfo?.[p1]
|
|
81
|
+
return userStore?.userInfo?.[p1] ?? ''
|
|
64
82
|
} else {
|
|
65
|
-
return pageInfo.value?.[p1]
|
|
83
|
+
return pageInfo.value?.[p1] ?? ''
|
|
66
84
|
}
|
|
67
85
|
})
|
|
68
86
|
}
|
|
69
87
|
return value
|
|
70
88
|
})
|
|
71
89
|
const onAvatar = (headImgUrl) => {
|
|
72
|
-
userStore?.updateUser(
|
|
73
|
-
|
|
74
|
-
|
|
90
|
+
userStore?.updateUser(
|
|
91
|
+
{
|
|
92
|
+
headImgUrl,
|
|
93
|
+
},
|
|
94
|
+
true,
|
|
95
|
+
)
|
|
75
96
|
}
|
|
76
97
|
const innerStyle = computed(() => {
|
|
77
98
|
return getFlexStyle(props.align)
|
|
@@ -12,6 +12,12 @@ export interface LcbButtonProps extends LcbBlockProps {
|
|
|
12
12
|
keyFromUser?: boolean
|
|
13
13
|
fillWidth?: boolean
|
|
14
14
|
fillHeight?: boolean
|
|
15
|
+
icon?: string
|
|
16
|
+
iconSize?: number
|
|
17
|
+
iconColor?: string
|
|
18
|
+
iconGap?: number
|
|
19
|
+
// 动态值不存在就不显示
|
|
20
|
+
hideWhenDynamicKeyNotExist?: boolean
|
|
15
21
|
itemAlign?:
|
|
16
22
|
| 'top-left'
|
|
17
23
|
| 'top-center'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="gap-0.25 flex flex-col p-2 justify-center border-solid border-1 border-#eeeeee rounded-1 relative"
|
|
4
4
|
@click="date?.status !== 0 ? (currentDate = date?.date) : undefined"
|
|
5
5
|
:class="{
|
|
6
|
-
'bg-[var(--theme-bg-color)] text-primary !border-[var(--wot-
|
|
6
|
+
'bg-[var(--theme-bg-color)] text-primary !border-[var(--wot-color-theme)]':
|
|
7
7
|
currentDate === date?.date,
|
|
8
8
|
'opacity-50': date?.status === 0,
|
|
9
9
|
[customClass]: true,
|
|
@@ -58,11 +58,13 @@
|
|
|
58
58
|
:size="iconSize + 'rpx'"
|
|
59
59
|
:color="iconColor"
|
|
60
60
|
/>
|
|
61
|
-
<
|
|
61
|
+
<img
|
|
62
62
|
v-else
|
|
63
|
-
:
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
:style="{
|
|
64
|
+
width: iconSize + 'rpx',
|
|
65
|
+
height: iconSize + 'rpx',
|
|
66
|
+
borderRadius: iconRadius + 'rpx',
|
|
67
|
+
}"
|
|
66
68
|
:src="item[urlKey]"
|
|
67
69
|
mode="aspectFit"
|
|
68
70
|
/>
|
|
@@ -241,7 +241,7 @@ const value = computed(() => {
|
|
|
241
241
|
:key="tag"
|
|
242
242
|
:custom-class="`!text-22rpx ${className}`"
|
|
243
243
|
:style="style"
|
|
244
|
-
:color="itemProps?.tagContentColor || 'var(--
|
|
244
|
+
:color="itemProps?.tagContentColor || 'var(--wot-color-theme)'"
|
|
245
245
|
:bg-color="itemProps?.tagBgColor"
|
|
246
246
|
:plain="itemProps?.tagPlain || true"
|
|
247
247
|
:mark="itemProps?.tagMark || false"
|
|
@@ -30,11 +30,14 @@
|
|
|
30
30
|
}"
|
|
31
31
|
/>
|
|
32
32
|
|
|
33
|
-
<
|
|
33
|
+
<img
|
|
34
34
|
v-if="item.iconType === 1"
|
|
35
|
-
:height="transformValueUnit(iconSize)"
|
|
36
|
-
:width="transformValueUnit(iconSize)"
|
|
37
35
|
:src="item.iconUpload"
|
|
36
|
+
mode="aspectFit"
|
|
37
|
+
:style="{
|
|
38
|
+
height: transformValueUnit(iconSize),
|
|
39
|
+
width: transformValueUnit(iconSize),
|
|
40
|
+
}"
|
|
38
41
|
/>
|
|
39
42
|
</wd-badge>
|
|
40
43
|
</view>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
height: transformValueUnit(photoSize),
|
|
15
15
|
round: photoRound,
|
|
16
16
|
src:
|
|
17
|
-
userStore?.userInfo?.headImgUrl ||
|
|
17
|
+
(userStore?.userInfo?.loginFlag && userStore?.userInfo?.headImgUrl) ||
|
|
18
18
|
'https://lycs.eluying.com/material/icon/1/20240925185540/userPhoto.jpg',
|
|
19
19
|
}"
|
|
20
20
|
custom-class="mr-40rpx bg-#eee"
|
|
@@ -194,9 +194,12 @@ const phoneHandler = () => {
|
|
|
194
194
|
})
|
|
195
195
|
}
|
|
196
196
|
const onAvatar = (headImgUrl) => {
|
|
197
|
-
userStore?.updateUser(
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
userStore?.updateUser(
|
|
198
|
+
{
|
|
199
|
+
headImgUrl,
|
|
200
|
+
},
|
|
201
|
+
true,
|
|
202
|
+
)
|
|
200
203
|
}
|
|
201
204
|
const toEdit = () => {
|
|
202
205
|
uni.navigateTo({
|
package/package.json
CHANGED
|
@@ -5,6 +5,9 @@ declare const _default: import('vue').DefineComponent<
|
|
|
5
5
|
{
|
|
6
6
|
color: string
|
|
7
7
|
backgroundColor: string
|
|
8
|
+
hideWhenDynamicKeyNotExist: boolean
|
|
9
|
+
iconGap: number
|
|
10
|
+
iconSize: number
|
|
8
11
|
}
|
|
9
12
|
>,
|
|
10
13
|
{},
|
|
@@ -23,6 +26,9 @@ declare const _default: import('vue').DefineComponent<
|
|
|
23
26
|
{
|
|
24
27
|
color: string
|
|
25
28
|
backgroundColor: string
|
|
29
|
+
hideWhenDynamicKeyNotExist: boolean
|
|
30
|
+
iconGap: number
|
|
31
|
+
iconSize: number
|
|
26
32
|
}
|
|
27
33
|
>
|
|
28
34
|
>
|
|
@@ -30,6 +36,9 @@ declare const _default: import('vue').DefineComponent<
|
|
|
30
36
|
{
|
|
31
37
|
backgroundColor: string
|
|
32
38
|
color: string
|
|
39
|
+
iconSize: number
|
|
40
|
+
iconGap: number
|
|
41
|
+
hideWhenDynamicKeyNotExist: boolean
|
|
33
42
|
},
|
|
34
43
|
{}
|
|
35
44
|
>
|
|
@@ -11,6 +11,11 @@ export interface LcbButtonProps extends LcbBlockProps {
|
|
|
11
11
|
keyFromUser?: boolean
|
|
12
12
|
fillWidth?: boolean
|
|
13
13
|
fillHeight?: boolean
|
|
14
|
+
icon?: string
|
|
15
|
+
iconSize?: number
|
|
16
|
+
iconColor?: string
|
|
17
|
+
iconGap?: number
|
|
18
|
+
hideWhenDynamicKeyNotExist?: boolean
|
|
14
19
|
itemAlign?:
|
|
15
20
|
| 'top-left'
|
|
16
21
|
| 'top-center'
|