@tplc/business 0.4.53 → 0.4.54

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 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.54](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.52...v0.4.54) (2025-04-03)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.4.53 ([3951e2a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3951e2a34e37afd8ff0bd4ff584481967956d9b4))
11
+
12
+
13
+ ### ✨ Features | 新功能
14
+
15
+ * 按钮 ([b8a3b1e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b8a3b1ebd3dc695d939b8cd0af4da1df0dbf171a))
16
+ * 新增版本 ([408362b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/408362bc52c73180339cc30c050bbc572ef019d3))
17
+ * 星星默认颜色 ([f4582a4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f4582a42f29630bc7ef6e350261f4f4a913e3263))
18
+ * 调整area ([90bf01b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/90bf01b9309537cc73493ec5366ea750fd7a1a9d))
19
+
5
20
  ### [0.4.53](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.47...v0.4.53) (2025-04-02)
6
21
 
7
22
 
@@ -13,7 +13,9 @@
13
13
  backgroundPosition,
14
14
  backgroundSize,
15
15
  fontSize: transformValueUnit(fontSize),
16
+ fontWeight,
16
17
  borderColor,
18
+ borderWidth: transformValueUnit(borderWidth),
17
19
  boxShadow:
18
20
  shadowColor && shadowSize ? `0px 0px ${blurSize}px ${shadowSize}px ${shadowColor}` : '',
19
21
  ...customStyle,
@@ -28,6 +28,7 @@ export interface LcbBlockProps {
28
28
 
29
29
  color?: string
30
30
  fontSize?: number
31
+ fontWeight?: number
31
32
  radius?: number
32
33
  topRadius?: number
33
34
  bottomRadius?: number
@@ -36,6 +37,7 @@ export interface LcbBlockProps {
36
37
  backgroundSize?: string
37
38
  backgroundPosition?: string
38
39
  borderColor?: string
40
+ borderWidth?: number
39
41
  textAlign?: 'left' | 'center' | 'right'
40
42
  customStyle?: StyleValue
41
43
  }
@@ -1,17 +1,23 @@
1
1
  <template>
2
- <lcb-block v-bind="$props">
3
- <lcb-action-view v-bind="action" @phone="phoneHandler">
4
- <wd-button type="primary" block size="large">
5
- {{ text }}
6
- </wd-button>
2
+ <lcb-block v-bind="$props" customClass="border-solid !w-fit">
3
+ <lcb-action-view v-bind="action" @avatar="onAvatar">
4
+ <template v-if="mode === 'image'">
5
+ <wd-img
6
+ :src="innerValue || props.url"
7
+ :width="imageWidth"
8
+ :height="imageHeight"
9
+ mode="aspectFit"
10
+ />
11
+ </template>
12
+ <template v-else>{{ innerValue || props.text }}</template>
7
13
  </lcb-action-view>
8
14
  </lcb-block>
9
15
  </template>
10
16
 
11
17
  <script setup lang="ts">
12
- import { getPhone } from '../../utils/auth'
13
- import { getExposed } from '../../utils/utils'
18
+ import { computed, inject, Ref } from 'vue'
14
19
  import { LcbButtonProps } from './types'
20
+ import { PAGE_PROVIDE_KEY } from '../../constants'
15
21
  defineOptions({
16
22
  name: 'LcbButton',
17
23
  options: {
@@ -20,13 +26,24 @@ defineOptions({
20
26
  styleIsolation: 'shared',
21
27
  },
22
28
  })
23
- withDefaults(defineProps<LcbButtonProps>(), {})
24
- const phoneHandler = async (e) => {
25
- await getPhone(e)
26
- uni.$lcb.userStore?.()?.getUser()
27
- getExposed().reload?.()
28
- uni.navigateBack()
29
+ const props = withDefaults(defineProps<LcbButtonProps>(), {
30
+ color: '#ffffff',
31
+ backgroundColor: 'var(--wot-color-theme)',
32
+ })
33
+ const pageInfo = inject(PAGE_PROVIDE_KEY) as Ref<Record<string, any>>
34
+ const userStore = uni.$lcb.userStore?.()
35
+ const innerValue = computed(() => {
36
+ if (props.dynamicKey) {
37
+ if (props.keyFromUser) {
38
+ return userStore?.userInfo?.[props.dynamicKey]
39
+ }
40
+ return pageInfo.value?.[props.dynamicKey]
41
+ }
42
+ return ''
43
+ })
44
+ const onAvatar = (headImgUrl) => {
45
+ userStore?.updateUser({
46
+ headImgUrl,
47
+ })
29
48
  }
30
49
  </script>
31
-
32
- <style lang="scss" scoped></style>
@@ -2,7 +2,12 @@ import { LcbActionViewProps } from '../lcb-action-view/types'
2
2
  import { LcbBlockProps } from '../lcb-block/types'
3
3
 
4
4
  export interface LcbButtonProps extends LcbBlockProps {
5
- type: 'phone-auth'
6
5
  text: string
7
- action: LcbActionViewProps
6
+ action?: LcbActionViewProps
7
+ mode: 'image' | 'text'
8
+ url?: string
9
+ imageWidth?: number
10
+ imageHeight?: number
11
+ dynamicKey?: string
12
+ keyFromUser?: boolean
8
13
  }
@@ -157,8 +157,8 @@ const value = computed(() => {
157
157
  :model-value="Number(value)"
158
158
  :num="Number(value)"
159
159
  readonly
160
- :size="style.fontSize ?? '22rpx'"
161
- :active-color="style?.color ?? 'var(--level-color)'"
160
+ :size="style.fontSize || '24rpx'"
161
+ :active-color="style?.color || 'var(--level-color)'"
162
162
  custom-class="!v-inherit"
163
163
  />
164
164
  </view>
@@ -220,7 +220,7 @@ const value = computed(() => {
220
220
  >
221
221
  <wd-icon name="location" size="32rpx"></wd-icon>
222
222
  <view class="text-ellipsis line-clamp-1">
223
- 距您{{ value }}{{ itemProps?.distanceUnit ?? 'km' }}
223
+ 距您{{ value }}{{ itemProps?.distanceUnit || 'km' }}
224
224
  </view>
225
225
  </view>
226
226
  </slot>
@@ -241,12 +241,12 @@ const value = computed(() => {
241
241
  :key="tag"
242
242
  :custom-class="`!text-22rpx ${className}`"
243
243
  :style="style"
244
- :color="itemProps?.tagContentColor ?? 'var(--primary-color)'"
244
+ :color="itemProps?.tagContentColor || 'var(--primary-color)'"
245
245
  :bg-color="itemProps?.tagBgColor"
246
- :plain="itemProps?.tagPlain ?? true"
247
- :mark="itemProps?.tagMark ?? false"
248
- :round="itemProps?.tagRound ?? false"
249
- :type="itemProps?.tagType ?? 'primary'"
246
+ :plain="itemProps?.tagPlain || true"
247
+ :mark="itemProps?.tagMark || false"
248
+ :round="itemProps?.tagRound || false"
249
+ :type="itemProps?.tagType || 'primary'"
250
250
  >
251
251
  {{ tag }}
252
252
  </wd-tag>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.53",
3
+ "version": "0.4.54",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -26,6 +26,7 @@ export interface LcbBlockProps {
26
26
  paddingRight?: number
27
27
  color?: string
28
28
  fontSize?: number
29
+ fontWeight?: number
29
30
  radius?: number
30
31
  topRadius?: number
31
32
  bottomRadius?: number
@@ -34,6 +35,7 @@ export interface LcbBlockProps {
34
35
  backgroundSize?: string
35
36
  backgroundPosition?: string
36
37
  borderColor?: string
38
+ borderWidth?: number
37
39
  textAlign?: 'left' | 'center' | 'right'
38
40
  customStyle?: StyleValue
39
41
  }
@@ -1,6 +1,12 @@
1
1
  import { LcbButtonProps } from './types'
2
2
  declare const _default: import('vue').DefineComponent<
3
- __VLS_WithDefaults<__VLS_TypePropsToOption<LcbButtonProps>, {}>,
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbButtonProps>,
5
+ {
6
+ color: string
7
+ backgroundColor: string
8
+ }
9
+ >,
4
10
  {},
5
11
  unknown,
6
12
  {},
@@ -11,9 +17,20 @@ declare const _default: import('vue').DefineComponent<
11
17
  string,
12
18
  import('vue').PublicProps,
13
19
  Readonly<
14
- import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LcbButtonProps>, {}>>
20
+ import('vue').ExtractPropTypes<
21
+ __VLS_WithDefaults<
22
+ __VLS_TypePropsToOption<LcbButtonProps>,
23
+ {
24
+ color: string
25
+ backgroundColor: string
26
+ }
27
+ >
28
+ >
15
29
  >,
16
- {},
30
+ {
31
+ backgroundColor: string
32
+ color: string
33
+ },
17
34
  {}
18
35
  >
19
36
  export default _default
@@ -1,7 +1,12 @@
1
1
  import { LcbActionViewProps } from '../lcb-action-view/types'
2
2
  import { LcbBlockProps } from '../lcb-block/types'
3
3
  export interface LcbButtonProps extends LcbBlockProps {
4
- type: 'phone-auth'
5
4
  text: string
6
- action: LcbActionViewProps
5
+ action?: LcbActionViewProps
6
+ mode: 'image' | 'text'
7
+ url?: string
8
+ imageWidth?: number
9
+ imageHeight?: number
10
+ dynamicKey?: string
11
+ keyFromUser?: boolean
7
12
  }
@@ -40,17 +40,19 @@ declare const __VLS_component: import('vue').DefineComponent<
40
40
  paddingLeft: number
41
41
  paddingRight: number
42
42
  fontSize: number
43
+ fontWeight: number
43
44
  topRadius: number
44
45
  bottomRadius: number
45
46
  backgroundRepeat: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'
46
47
  backgroundSize: string
47
48
  backgroundPosition: string
48
49
  borderColor: string
50
+ borderWidth: number
49
51
  textAlign: 'left' | 'center' | 'right'
50
52
  imageWidth: number
51
53
  borderRadius: number
52
- border: boolean
53
54
  imageHeight: number
55
+ border: boolean
54
56
  listType: 'list' | 'horizontal' | 'grid' | 'waterfall'
55
57
  pageFilterType: string
56
58
  pageListProps: import('./components/FilterList/type').PageListProps
@@ -57,8 +57,8 @@ declare const _default: import('vue').DefineComponent<
57
57
  >,
58
58
  {
59
59
  title: string
60
- styleGroup: 1 | 2 | 3 | 4
61
60
  fontWeight: number
61
+ styleGroup: 1 | 2 | 3 | 4
62
62
  back: boolean
63
63
  textSize: number
64
64
  topStyle: 1 | 2
@@ -551,11 +551,11 @@ declare const _default: import('vue').DefineComponent<
551
551
  paddingVertical: number
552
552
  fontSize: number
553
553
  borderColor: string
554
+ borderWidth: number
554
555
  gap: number
555
556
  placeholder: string
556
557
  lineWidth: number
557
558
  iconType: 'icon' | 'img'
558
- borderWidth: number
559
559
  cityColor: string
560
560
  citySize: number
561
561
  cityIconSize: number
@@ -576,11 +576,11 @@ declare const _default: import('vue').DefineComponent<
576
576
  paddingVertical: number
577
577
  fontSize: number
578
578
  borderColor: string
579
+ borderWidth: number
579
580
  gap: number
580
581
  placeholder: string
581
582
  lineWidth: number
582
583
  iconType: 'icon' | 'img'
583
- borderWidth: number
584
584
  cityColor: string
585
585
  citySize: number
586
586
  cityIconSize: number
@@ -601,11 +601,11 @@ declare const _default: import('vue').DefineComponent<
601
601
  paddingVertical: number
602
602
  fontSize: number
603
603
  borderColor: string
604
+ borderWidth: number
604
605
  gap: number
605
606
  placeholder: string
606
607
  lineWidth: number
607
608
  iconType: 'icon' | 'img'
608
- borderWidth: number
609
609
  cityColor: string
610
610
  citySize: number
611
611
  cityIconSize: number
@@ -626,11 +626,11 @@ declare const _default: import('vue').DefineComponent<
626
626
  paddingVertical: number
627
627
  fontSize: number
628
628
  borderColor: string
629
+ borderWidth: number
629
630
  gap: number
630
631
  placeholder: string
631
632
  lineWidth: number
632
633
  iconType: 'icon' | 'img'
633
- borderWidth: number
634
634
  cityColor: string
635
635
  citySize: number
636
636
  cityIconSize: number
@@ -651,11 +651,11 @@ declare const _default: import('vue').DefineComponent<
651
651
  paddingVertical: number
652
652
  fontSize: number
653
653
  borderColor: string
654
+ borderWidth: number
654
655
  gap: number
655
656
  placeholder: string
656
657
  lineWidth: number
657
658
  iconType: 'icon' | 'img'
658
- borderWidth: number
659
659
  cityColor: string
660
660
  citySize: number
661
661
  cityIconSize: number
@@ -676,11 +676,11 @@ declare const _default: import('vue').DefineComponent<
676
676
  paddingVertical: number
677
677
  fontSize: number
678
678
  borderColor: string
679
+ borderWidth: number
679
680
  gap: number
680
681
  placeholder: string
681
682
  lineWidth: number
682
683
  iconType: 'icon' | 'img'
683
- borderWidth: number
684
684
  cityColor: string
685
685
  citySize: number
686
686
  cityIconSize: number
@@ -701,11 +701,11 @@ declare const _default: import('vue').DefineComponent<
701
701
  paddingVertical: number
702
702
  fontSize: number
703
703
  borderColor: string
704
+ borderWidth: number
704
705
  gap: number
705
706
  placeholder: string
706
707
  lineWidth: number
707
708
  iconType: 'icon' | 'img'
708
- borderWidth: number
709
709
  cityColor: string
710
710
  citySize: number
711
711
  cityIconSize: number
@@ -67,8 +67,8 @@ declare const _default: import('vue').DefineComponent<
67
67
  iconColor: string
68
68
  marginHorizontal: number
69
69
  fontSize: number
70
- lineWidth: number
71
70
  fontWeight: number
71
+ lineWidth: number
72
72
  justify:
73
73
  | 'justify-start'
74
74
  | 'justify-end'
@@ -1,6 +0,0 @@
1
- /** 获取用户手机号 */
2
- export declare const getUserPhone: (data: {
3
- encryptedData: string
4
- iv: string
5
- code?: string
6
- }) => Promise<import('../action').IResData<unknown>>
@@ -1,2 +0,0 @@
1
- /** 获取手机号 */
2
- export declare const getPhone: (e: any) => Promise<void>