@tplc/business 0.4.103 → 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 +2 -0
- package/components/lcb-action-view/lcb-action-view.vue +4 -0
- package/components/lcb-action-view/types.ts +2 -0
- package/components/lcb-area/lcb-area.vue +8 -5
- package/components/lcb-area/types.ts +1 -0
- package/components/lcb-img-nav/lcb-img-nav.vue +4 -8
- package/components/lcb-img-nav/types.ts +2 -0
- package/package.json +1 -1
- package/types/components/lcb-action-view/types.d.ts +2 -0
- package/types/components/lcb-area/types.d.ts +1 -0
- package/types/components/lcb-img-nav/types.d.ts +2 -0
- package/types/components/lcb-search/lcb-search.vue.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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
|
+
|
|
5
7
|
### [0.4.103](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.96...v0.4.103) (2025-05-09)
|
|
6
8
|
|
|
7
9
|
|
|
@@ -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
|
/** 新窗口跳到页面 */
|
|
@@ -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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
})
|
|
@@ -139,15 +139,11 @@ const renderItems = computed(() => {
|
|
|
139
139
|
return (
|
|
140
140
|
props.items?.filter((item) => {
|
|
141
141
|
if (item.dependKey) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
}) || []
|
package/package.json
CHANGED