@tplc/business 0.4.102 → 0.4.104

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,35 @@
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.104](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.103...v0.4.104) (2025-05-09)
6
+
7
+ ### [0.4.103](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.96...v0.4.103) (2025-05-09)
8
+
9
+
10
+ ### 🐛 Bug Fixes | Bug 修复
11
+
12
+ * search undifend ([a3f2677](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a3f26778a15ebb98d59f3e0e8b00c93ccd9d103b))
13
+
14
+
15
+ ### 🚀 Chore | 构建/工程依赖/工具
16
+
17
+ * **release:** 0.4.100 ([a5011bd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a5011bdbd270ca25f1bad5c8810ed09aa57acc8a))
18
+ * **release:** 0.4.101 ([b11e2f2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b11e2f2010788ecf361fd3fc1422ab174e12ff66))
19
+ * **release:** 0.4.102 ([5097ac4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5097ac4518ed9a183e6aec70e4d6a1aab23d377c))
20
+ * **release:** 0.4.96 ([6c57580](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6c57580817ba531dca9766e81cd0407a22b29f51))
21
+ * **release:** 0.4.97 ([439e96b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/439e96b6686c892d92ed0b81fc44779dd161d7d6))
22
+ * **release:** 0.4.98 ([90a92f8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/90a92f88f80e553339e5aca837d773609e7d9b70))
23
+ * **release:** 0.4.99 ([ddc75ba](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ddc75baabd0a8bc306d4d322181d900ab818f3bd))
24
+
25
+
26
+ ### ✨ Features | 新功能
27
+
28
+ * area 支持 key ([dfded5b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dfded5bbf79cf894c5815cadb76509c0def5b736))
29
+ * empty page ([347e48f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/347e48f6fdb66b397a3c268c289f6235e12b77ef))
30
+ * 兼容布局 ([7b50990](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7b50990b737c4a1d7a1ebf05f1b5c49194709dec))
31
+ * 屏蔽字段 ([fb1e476](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/fb1e4762822aa2009604a5625c4761a6d8e4f097))
32
+ * 新增数据 ([abab3d2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/abab3d2467b033132fbd06819f9c17dbeaa5d1bb))
33
+
5
34
  ### [0.4.102](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.101...v0.4.102) (2025-05-09)
6
35
 
7
36
  ### [0.4.101](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.100...v0.4.101) (2025-05-09)
@@ -181,6 +181,10 @@ const onActionClick = async () => {
181
181
  case 17:
182
182
  if (props.requestInfo)
183
183
  await uni.$lcb.http.post(props.requestInfo.requestUrl, props.requestInfo.requestParams)
184
+ /** 请求之后刷新schemaPage */
185
+ if (props.requestInfo?.refreshSchemaPage) {
186
+ uni.$emit('refreshSchemaPage')
187
+ }
184
188
  emits('refresh')
185
189
  break
186
190
  /** 新窗口跳到页面 */
@@ -58,6 +58,8 @@ export type LcbActionViewProps = {
58
58
  requestInfo?: {
59
59
  requestUrl: string
60
60
  requestParams: Record<string, any>
61
+ /** 请求之后刷新schemapage */
62
+ refreshSchemaPage?: boolean
61
63
  }
62
64
  }
63
65
  | {
@@ -25,10 +25,11 @@
25
25
  </template>
26
26
 
27
27
  <script setup lang="ts">
28
- import { computed } from 'vue'
28
+ import { computed, inject, Ref } from 'vue'
29
29
  import { LcbAreaProps } from './types'
30
30
  import { transformValueUnit } from '@tplc/business/utils/transform'
31
31
  import { get } from 'lodash-es'
32
+ import { PAGE_PROVIDE_KEY } from '@tplc/business/constants'
32
33
  defineOptions({
33
34
  name: 'LcbArea',
34
35
  options: {
@@ -42,7 +43,7 @@ const props = withDefaults(defineProps<LcbAreaProps>(), {
42
43
  display: 'flex',
43
44
  overflowX: 'initial',
44
45
  })
45
-
46
+ const pageInfo = inject(PAGE_PROVIDE_KEY) as Ref<Record<string, any>>
46
47
  const innerStyle = computed(() => {
47
48
  // col-span-2
48
49
  if (props.display === 'grid') {
@@ -71,9 +72,11 @@ const getStyle = (index: number) => {
71
72
  const showArea = computed(() => {
72
73
  if (props.dependKey) {
73
74
  const userStore = uni.$lcb.userStore?.()
74
- return props.reverse
75
- ? !get(userStore?.userInfo, props.dependKey)
76
- : Boolean(get(userStore?.userInfo, props.dependKey))
75
+ const value = get(props.keyFromUser ? userStore?.userInfo : pageInfo.value, props.dependKey)
76
+ if (props.dependKeyCompareValue) {
77
+ return `${value}` === `${props.dependKeyCompareValue}`
78
+ }
79
+ return props.reverse ? !value : Boolean(value)
77
80
  }
78
81
  return true
79
82
  })
@@ -20,4 +20,5 @@ export interface LcbAreaProps extends LcbBlockProps {
20
20
  dependKey?: string
21
21
  keyFromUser?: boolean
22
22
  reverse?: boolean
23
+ dependKeyCompareValue?: string
23
24
  }
@@ -139,15 +139,11 @@ const renderItems = computed(() => {
139
139
  return (
140
140
  props.items?.filter((item) => {
141
141
  if (item.dependKey) {
142
- if (item.keyFromUser) {
143
- return props.reverse
144
- ? !get(userStore?.userInfo, item.dependKey)
145
- : Boolean(get(userStore?.userInfo, item.dependKey))
146
- } else {
147
- return props.reverse
148
- ? !get(pageInfo.value, item.dependKey)
149
- : Boolean(get(pageInfo.value, item.dependKey))
142
+ const value = get(item.keyFromUser ? userStore?.userInfo : pageInfo.value, item.dependKey)
143
+ if (item.dependKeyCompareValue) {
144
+ return `${value}` === `${item.dependKeyCompareValue}`
150
145
  }
146
+ return props.reverse ? !value : Boolean(value)
151
147
  }
152
148
  return true
153
149
  }) || []
@@ -20,6 +20,8 @@ export interface LcbImgNavProps extends LcbBlockProps {
20
20
  keyFromUser?: boolean
21
21
  /** 依赖值反选 */
22
22
  reverse?: boolean
23
+ /** 依赖值对比值 */
24
+ dependKeyCompareValue?: string
23
25
  })[]
24
26
  /** 排布方式每行几个 */
25
27
  pictureDistribution?: 3 | 4 | 5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.102",
3
+ "version": "0.4.104",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -55,6 +55,8 @@ export type LcbActionViewProps = {
55
55
  requestInfo?: {
56
56
  requestUrl: string
57
57
  requestParams: Record<string, any>
58
+ /** 请求之后刷新schemapage */
59
+ refreshSchemaPage?: boolean
58
60
  }
59
61
  }
60
62
  | {
@@ -20,4 +20,5 @@ export interface LcbAreaProps extends LcbBlockProps {
20
20
  dependKey?: string
21
21
  keyFromUser?: boolean
22
22
  reverse?: boolean
23
+ dependKeyCompareValue?: string
23
24
  }
@@ -19,6 +19,8 @@ export interface LcbImgNavProps extends LcbBlockProps {
19
19
  keyFromUser?: boolean
20
20
  /** 依赖值反选 */
21
21
  reverse?: boolean
22
+ /** 依赖值对比值 */
23
+ dependKeyCompareValue?: string
22
24
  })[]
23
25
  /** 排布方式每行几个 */
24
26
  pictureDistribution?: 3 | 4 | 5
@@ -239,6 +239,7 @@ declare const _default: import('vue').DefineComponent<
239
239
  requestInfo?: {
240
240
  requestUrl: string
241
241
  requestParams: Record<string, any>
242
+ refreshSchemaPage?: boolean
242
243
  }
243
244
  } & import('../lcb-block/types').LcbBlockProps
244
245
  >,