@tplc/business 0.4.86 → 0.4.88

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,15 @@
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.88](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.87...v0.4.88) (2025-05-04)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 支持依赖值反选 ([458c055](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/458c055285e156fce1f2c2df8276df85681cf02d))
11
+
12
+ ### [0.4.87](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.86...v0.4.87) (2025-05-04)
13
+
5
14
  ### [0.4.86](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.83...v0.4.86) (2025-05-04)
6
15
 
7
16
 
@@ -1,14 +1,15 @@
1
1
  <template>
2
+ <template v-if="mode === 'noParent'">{{ innerValue }}</template>
2
3
  <view
3
4
  class="w-full h-full"
4
5
  :style="{
5
6
  ...innerStyle,
6
7
  }"
7
- v-if="dynamicKey && hideWhenDynamicKeyNotExist ? dynamicValue : true"
8
+ v-else-if="dynamicKey && hideWhenDynamicKeyNotExist ? dynamicValue : true"
8
9
  >
9
10
  <lcb-block
10
11
  v-bind="$props"
11
- customClass="border-solid"
12
+ :customClass="`${customClass} border-solid`"
12
13
  :customStyle="{
13
14
  width: props.fillWidth ? '100%' : 'fit-content',
14
15
  height: props.fillHeight ? '100%' : 'fit-content',
@@ -27,7 +28,6 @@
27
28
  <template v-if="mode === 'image'">
28
29
  <wd-img :src="innerValue" :width="imageWidth" :height="imageHeight" mode="aspectFit" />
29
30
  </template>
30
- <template v-else>{{ innerValue }}</template>
31
31
  </view>
32
32
  </lcb-action-view>
33
33
  </lcb-block>
@@ -4,12 +4,13 @@ import { LcbBlockProps } from '../lcb-block/types'
4
4
  export interface LcbButtonProps extends LcbBlockProps {
5
5
  text: string
6
6
  action?: LcbActionViewProps
7
- mode: 'image' | 'text'
7
+ mode: 'image' | 'text' | 'noParent'
8
8
  url?: string
9
9
  imageWidth?: number
10
10
  imageHeight?: number
11
11
  dynamicKey?: string
12
12
  keyFromUser?: boolean
13
+ customClass?: string
13
14
  fillWidth?: boolean
14
15
  fillHeight?: boolean
15
16
  icon?: string
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <lcb-block v-bind="$props">
2
+ <lcb-block v-bind="$props" v-if="renderItems?.length">
3
3
  <lcb-title
4
4
  v-if="showTitle"
5
5
  v-bind="{
@@ -131,6 +131,7 @@ const props = withDefaults(defineProps<LcbImgNavProps>(), {
131
131
  divider: true,
132
132
  arrowSize: 44,
133
133
  arrowColor: '#212121',
134
+ reverse: false,
134
135
  })
135
136
 
136
137
  const renderItems = computed(() => {
@@ -138,9 +139,13 @@ const renderItems = computed(() => {
138
139
  props.items?.filter((item) => {
139
140
  if (item.dependKey) {
140
141
  if (item.keyFromUser) {
141
- return Boolean(userStore?.userInfo?.[item.dependKey])
142
+ return props.reverse
143
+ ? !userStore?.userInfo?.[item.dependKey]
144
+ : Boolean(userStore?.userInfo?.[item.dependKey])
142
145
  } else {
143
- return Boolean(pageInfo.value?.[item.dependKey])
146
+ return props.reverse
147
+ ? !pageInfo.value?.[item.dependKey]
148
+ : Boolean(pageInfo.value?.[item.dependKey])
144
149
  }
145
150
  }
146
151
  return true
@@ -18,6 +18,8 @@ export interface LcbImgNavProps extends LcbBlockProps {
18
18
  dependKey?: string
19
19
  /** 依赖值类型 */
20
20
  keyFromUser?: boolean
21
+ /** 依赖值反选 */
22
+ reverse?: boolean
21
23
  })[]
22
24
  /** 排布方式每行几个 */
23
25
  pictureDistribution?: 3 | 4 | 5
@@ -15,7 +15,7 @@
15
15
  fontWeight: fontWeight,
16
16
  }"
17
17
  >
18
- {{ title }}
18
+ <lcb-button mode="noParent" :text="title" :keyFromUser="keyFromUser" />
19
19
  </view>
20
20
  </view>
21
21
  <view class="images" v-else>
@@ -19,6 +19,7 @@ export interface NavTitleProps {
19
19
  opacity?: number
20
20
  textSize?: number
21
21
  fontWeight?: number
22
+ keyFromUser?: boolean
22
23
  }
23
24
  export interface NavProps extends NavTitleProps {
24
25
  /** 是否固定 */
@@ -95,7 +95,7 @@ const value = computed(() => {
95
95
 
96
96
  const coverImgWidth = computed(() => {
97
97
  if (style.value.width) {
98
- return style.value.width.replace('rpx', '')
98
+ return style.value.width
99
99
  }
100
100
  return '100%'
101
101
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.86",
3
+ "version": "0.4.88",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -3,12 +3,13 @@ import { LcbBlockProps } from '../lcb-block/types'
3
3
  export interface LcbButtonProps extends LcbBlockProps {
4
4
  text: string
5
5
  action?: LcbActionViewProps
6
- mode: 'image' | 'text'
6
+ mode: 'image' | 'text' | 'noParent'
7
7
  url?: string
8
8
  imageWidth?: number
9
9
  imageHeight?: number
10
10
  dynamicKey?: string
11
11
  keyFromUser?: boolean
12
+ customClass?: string
12
13
  fillWidth?: boolean
13
14
  fillHeight?: boolean
14
15
  icon?: string
@@ -21,6 +21,7 @@ declare const _default: import('vue').DefineComponent<
21
21
  divider: boolean
22
22
  arrowSize: number
23
23
  arrowColor: string
24
+ reverse: boolean
24
25
  }
25
26
  >,
26
27
  {},
@@ -57,6 +58,7 @@ declare const _default: import('vue').DefineComponent<
57
58
  divider: boolean
58
59
  arrowSize: number
59
60
  arrowColor: string
61
+ reverse: boolean
60
62
  }
61
63
  >
62
64
  >
@@ -17,6 +17,8 @@ export interface LcbImgNavProps extends LcbBlockProps {
17
17
  dependKey?: string
18
18
  /** 依赖值类型 */
19
19
  keyFromUser?: boolean
20
+ /** 依赖值反选 */
21
+ reverse?: boolean
20
22
  })[]
21
23
  /** 排布方式每行几个 */
22
24
  pictureDistribution?: 3 | 4 | 5
@@ -17,6 +17,7 @@ export interface NavTitleProps {
17
17
  opacity?: number
18
18
  textSize?: number
19
19
  fontWeight?: number
20
+ keyFromUser?: boolean
20
21
  }
21
22
  export interface NavProps extends NavTitleProps {
22
23
  /** 是否固定 */