resolver-egretimp-plus 0.0.44 → 0.0.46
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/dist/h5/index.js +1 -1
- package/dist/web/index.js +1 -1
- package/package.json +1 -1
- package/src/analysisComponent.jsx +2 -1
- package/src/components/cmiFormItem/index.js +1 -0
- package/src/components/cmiFormItem/src/index.vue +106 -0
- package/src/components/packages-H5/CmiButton.vue +2 -15
- package/src/components/packages-H5/CmiCheckbox.vue +2 -12
- package/src/components/packages-H5/CmiInput.vue +1 -1
- package/src/components/packages-H5/CmiSelect.vue +1 -1
- package/src/components/packages-H5/CustomComponentCardH5.vue +30 -9
- package/src/components/packages-H5/CustomComponentCollapseH5.vue +38 -3
- package/src/components/packages-H5/CustomComponentTableH5.vue +1 -1
- package/src/components/packages-web/CustomComponentTable.jsx +1 -1
- package/src/components/packages-web/ElInput.vue +3 -0
- package/src/utils/render.jsx +18 -13
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as default} from './src/index.vue'
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useAttrs } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
messageInstance: {
|
|
6
|
+
type: [Object, Function],
|
|
7
|
+
default: () => null
|
|
8
|
+
},
|
|
9
|
+
config: [Object, Array],
|
|
10
|
+
lang: String,
|
|
11
|
+
labelWidth: [String, Number]
|
|
12
|
+
})
|
|
13
|
+
const attrs = useAttrs()
|
|
14
|
+
const label = computed(() => {
|
|
15
|
+
if (props.config.labelHidden == '1' || props.config.labelWidth === 0 || props.config.labelWidth === '0') {
|
|
16
|
+
return ''
|
|
17
|
+
}
|
|
18
|
+
return (props.lang.indexOf('zh') > -1 ? props.config.metaNameZh : props.config.metaNameEn) || ''
|
|
19
|
+
})
|
|
20
|
+
const labelWidth = computed(() => {
|
|
21
|
+
if (!!props.config.labelPosition) {
|
|
22
|
+
return props.config.labelPosition
|
|
23
|
+
}
|
|
24
|
+
return 'left'
|
|
25
|
+
})
|
|
26
|
+
function handleClickTip() {
|
|
27
|
+
messageInstance?.text(props.lang.indexOf('zh') > -1 ? props.config.hintContentZh : props.config.hintContentEn)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
</script>
|
|
31
|
+
<template>
|
|
32
|
+
<cmi-form-item v-bind="attrs" class="custom-form-item-h5"
|
|
33
|
+
:class="[{'--required': props.config.requiredFlag == '1', '--label-hide': !labelWidth,
|
|
34
|
+
'--label-text-left': labelPosition === 'left', '--label-text-right': labelPosition === 'right'
|
|
35
|
+
}, customClass]"
|
|
36
|
+
:labelWidth="props.labelWidth"
|
|
37
|
+
>
|
|
38
|
+
<div slot="label" class="custom-label--formItem">
|
|
39
|
+
<div class="custom-label-content">
|
|
40
|
+
<span class="label-required" v-if="props.config.requiredFlag == '1'">*</span>
|
|
41
|
+
<span class="label-text">{{ label }}</span>
|
|
42
|
+
<span class="label-tip" v-if="props.config.hintFlag == '1'" @click="handleClickTip"><cmi-icon-question-circle size="14"/></span>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<slot></slot>
|
|
46
|
+
</cmi-form-item>
|
|
47
|
+
</template>
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
cmi-form-item {
|
|
50
|
+
position: relative;
|
|
51
|
+
|
|
52
|
+
.custom-label--formItem {
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
width: 100%;
|
|
56
|
+
// height: 16px;
|
|
57
|
+
|
|
58
|
+
.custom-label-content {
|
|
59
|
+
width: 100%;
|
|
60
|
+
display: -webkit-box;
|
|
61
|
+
line-height: 16px;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
text-overflow: ellipsis;
|
|
64
|
+
-webkit-line-clamp: 2;
|
|
65
|
+
-webkit-box-orient: vertical;
|
|
66
|
+
text-align: left;
|
|
67
|
+
.label-required {
|
|
68
|
+
color: #f5222d;
|
|
69
|
+
position: relative;
|
|
70
|
+
right: 3px;
|
|
71
|
+
top: 3px;
|
|
72
|
+
}
|
|
73
|
+
.label-text {
|
|
74
|
+
padding-right: 3px;
|
|
75
|
+
}
|
|
76
|
+
.label-tip {
|
|
77
|
+
position: absolute;
|
|
78
|
+
right: 16px;
|
|
79
|
+
top: 2px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.--label-text-left {
|
|
85
|
+
.custom-label--formItem {
|
|
86
|
+
.custom-label-content {
|
|
87
|
+
text-align: left;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.--label-text-right {
|
|
93
|
+
.custom-label--formItem {
|
|
94
|
+
.custom-label-content {
|
|
95
|
+
text-align: right;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.--required {
|
|
101
|
+
.custom-label-content {
|
|
102
|
+
padding-left: 3px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { defineProps, inject, getCurrentInstance, computed, useAttrs } from 'vue'
|
|
3
3
|
import { commonPropsType } from '../../utils/index.js'
|
|
4
4
|
import { useRoute } from 'vue-router'
|
|
5
|
-
import { dispatchClickEvents } from '../helper/eventOrchestration.js';
|
|
6
5
|
|
|
7
6
|
const appContext = getCurrentInstance()?.appContext
|
|
8
7
|
|
|
@@ -41,7 +40,6 @@ const label = computed(() => {
|
|
|
41
40
|
const route = useRoute()
|
|
42
41
|
const buttonActions = inject('buttonActions', {})
|
|
43
42
|
|
|
44
|
-
const messageInstance = inject('_messageInstance')
|
|
45
43
|
const dynamicMapComp = inject('dynamicMapComp')
|
|
46
44
|
const hireRelatMapRules = inject('hireRelatMapRules')
|
|
47
45
|
const components = inject('components')
|
|
@@ -49,12 +47,11 @@ const selects = inject('selects')
|
|
|
49
47
|
const rootValue = inject('rootValue')
|
|
50
48
|
const dataLoad = inject('dataLoad')
|
|
51
49
|
const rootForm = inject('rootForm')
|
|
52
|
-
const _axiosInstance = inject('_axiosInstance')
|
|
53
50
|
const routeQuery= route?.query
|
|
54
51
|
|
|
55
52
|
|
|
56
|
-
const buttonAction = () => {
|
|
57
|
-
attrs?.onClick?.(
|
|
53
|
+
const buttonAction = (...arg) => {
|
|
54
|
+
attrs?.onClick?.(...arg) // 如果配置中有点击事件
|
|
58
55
|
const actionKey = props.config?.clickActionKey || props.config?.buttonActionKey || props.config?.hireRelat
|
|
59
56
|
const actionFn = buttonActions[actionKey]
|
|
60
57
|
actionFn && actionFn(props, {
|
|
@@ -67,16 +64,6 @@ const buttonAction = () => {
|
|
|
67
64
|
rootForm,
|
|
68
65
|
routeQuery
|
|
69
66
|
}, appContext)
|
|
70
|
-
|
|
71
|
-
const PageServiceMapVOList = props.config.lcpPageServiceMapVOList
|
|
72
|
-
if (PageServiceMapVOList?.length) {
|
|
73
|
-
dispatchClickEvents({
|
|
74
|
-
serviceList: PageServiceMapVOList,
|
|
75
|
-
axiosInstance: _axiosInstance,
|
|
76
|
-
reqData: rootValue?.value,
|
|
77
|
-
messageInstance
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
67
|
}
|
|
81
68
|
</script>
|
|
82
69
|
|
|
@@ -30,16 +30,6 @@ const checkboxProps = computed(() => {
|
|
|
30
30
|
const attrs = useAttrs()
|
|
31
31
|
const modeValue = defineModel()
|
|
32
32
|
|
|
33
|
-
const aa = [
|
|
34
|
-
{
|
|
35
|
-
columnValue: 'aaa',
|
|
36
|
-
columnDesc_zh: 'aaa',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
columnValue: 'bbb',
|
|
40
|
-
columnDesc_zh: 'bbb',
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
33
|
const onChange = ({ detail }) => {
|
|
44
34
|
modeValue.value = detail.value
|
|
45
35
|
}
|
|
@@ -49,11 +39,11 @@ const onSigleChange = ({ detail }) => {
|
|
|
49
39
|
</script>
|
|
50
40
|
|
|
51
41
|
<template>
|
|
52
|
-
<cmi-checkbox-group :value="modeValue" @change="onChange" v-if="props.options && props.options.length" v-bind="{...
|
|
42
|
+
<cmi-checkbox-group :value="modeValue" @change="onChange" v-if="props.options && props.options.length" v-bind="{...attrs, ...checkboxGroupProps}">
|
|
53
43
|
<cmi-checkbox
|
|
54
44
|
class="mr-20"
|
|
55
45
|
v-for="option in props.options" :key="option.columnValue"
|
|
56
|
-
:disabled="option.columnStatus == '0' || option.columnStatus == '2'"
|
|
46
|
+
:disabled="props.disabled || option.columnStatus == '0' || option.columnStatus == '2'"
|
|
57
47
|
:name="option.columnValue" :label="lang.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc"
|
|
58
48
|
>
|
|
59
49
|
{{lang.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc}}
|
|
@@ -9,7 +9,7 @@ const props = defineProps({
|
|
|
9
9
|
const inputProps = computed(() => {
|
|
10
10
|
return {
|
|
11
11
|
label: props.config?.label,
|
|
12
|
-
type: props.config?.
|
|
12
|
+
type: props.config?.displayType,
|
|
13
13
|
name: props.config?.name,
|
|
14
14
|
placeholder: lang?.value?.indexOf('zh') > -1 ? props.config?.defPlacehold : props.config?.defPlaceholdEn,
|
|
15
15
|
min: props.config?.min,
|
|
@@ -54,7 +54,7 @@ const selectProps = computed(() => {
|
|
|
54
54
|
multiple: isMutiple.value,
|
|
55
55
|
placeholder: lang?.value?.indexOf('zh') > -1 ? props.config?.defPlacehold : props.config?.defPlaceholdEn,
|
|
56
56
|
'max-options-visible': props.config?.['max-options-visible'] || props.config?.maxOptionsVisible,
|
|
57
|
-
required: props.required,
|
|
57
|
+
// required: props.required,
|
|
58
58
|
}
|
|
59
59
|
})
|
|
60
60
|
const clear = () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, inject, resolveComponent, useAttrs } from "vue";
|
|
2
|
+
import { computed, inject, ref, resolveComponent, useAttrs } from "vue";
|
|
3
3
|
import Renderer from '../../renderer.jsx'
|
|
4
|
-
import { commonPropsType, hasOwn } from '../../utils/index.js'
|
|
4
|
+
import { commonPropsType, DISPLAY_HIDDEN, hasOwn } from '../../utils/index.js'
|
|
5
5
|
|
|
6
6
|
const modelValue = defineModel()
|
|
7
7
|
const props = defineProps({
|
|
@@ -12,12 +12,15 @@ const props = defineProps({
|
|
|
12
12
|
noborder: [Boolean, String],
|
|
13
13
|
cardbgcolor: String,
|
|
14
14
|
})
|
|
15
|
+
|
|
16
|
+
const collapseLimt = 5
|
|
17
|
+
const isCollapse = ref(true)
|
|
15
18
|
const attrs = useAttrs()
|
|
16
19
|
const lang = inject('lang')
|
|
17
20
|
const cmiProps = computed(() => {
|
|
18
21
|
return {
|
|
19
|
-
title: lang?.value?.indexOf('zh') ? props.config?.metaNameZh : props.config?.metaNameEn,
|
|
20
|
-
subtitle: lang?.value?.indexOf('zh') ? props.config.subtitleZh : props.config.subtitleEn,
|
|
22
|
+
title: lang?.value?.indexOf('zh') > -1 ? props.config?.metaNameZh : props.config?.metaNameEn,
|
|
23
|
+
subtitle: lang?.value?.indexOf('zh') > -1 ? props.config.subtitleZh : props.config.subtitleEn,
|
|
21
24
|
content: props.content,
|
|
22
25
|
noborder: props.noborder == '1' ? true : false,
|
|
23
26
|
cardbgcolor: props.cardbgcolor || '#FAFAFA',
|
|
@@ -27,17 +30,35 @@ const cmiProps = computed(() => {
|
|
|
27
30
|
const pmPageMetaList = computed(() => {
|
|
28
31
|
return props.config?.pmPageMetaList?.filter(item => !item.collapseSlot) || []
|
|
29
32
|
})
|
|
30
|
-
|
|
33
|
+
const showCollapseBtn = computed(() => {
|
|
34
|
+
return pmPageMetaList.value.filter(item => item.displayType != DISPLAY_HIDDEN)?.length > collapseLimt
|
|
35
|
+
})
|
|
36
|
+
const showPageMeteList = computed(() => {
|
|
37
|
+
return pmPageMetaList.value.filter(item => item.displayType != DISPLAY_HIDDEN).slice(0, isCollapse.value ? collapseLimt : Number.MAX_VALUE)
|
|
38
|
+
})
|
|
39
|
+
const collapseLabel = computed(() => {
|
|
40
|
+
const isCh = lang?.value?.indexOf('zh') > -1
|
|
41
|
+
return isCollapse.value ? (isCh ? '更多' : 'More') : (isCh ? '收起' : 'Close')
|
|
42
|
+
})
|
|
43
|
+
function toCollapse() {
|
|
44
|
+
isCollapse.value = !isCollapse.value
|
|
45
|
+
}
|
|
31
46
|
</script>
|
|
32
47
|
<template>
|
|
33
|
-
<div style="">
|
|
34
|
-
|
|
35
|
-
</div>
|
|
36
48
|
<cmi-card v-bind="{...cmiProps, ...attrs}">
|
|
37
49
|
<div slot="content">
|
|
38
|
-
<Renderer :config="
|
|
50
|
+
<Renderer :config="showPageMeteList" v-model="modelValue"></Renderer>
|
|
51
|
+
<div v-if="showCollapseBtn" class="collapse-wrap">
|
|
52
|
+
<cmi-button type="text" size="small" @click="toCollapse">
|
|
53
|
+
{{ collapseLabel }}
|
|
54
|
+
</cmi-button>
|
|
55
|
+
</div>
|
|
39
56
|
</div>
|
|
40
57
|
</cmi-card>
|
|
41
58
|
</template>
|
|
42
59
|
<style lang="scss">
|
|
60
|
+
.collapse-wrap {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: end;
|
|
63
|
+
}
|
|
43
64
|
</style>
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import Renderer from '../../renderer.jsx'
|
|
3
|
-
import { computed, inject, useAttrs, defineEmits, defineProps } from 'vue'
|
|
4
|
-
import { commonPropsType } from '../../utils/index.js'
|
|
3
|
+
import { computed, inject, useAttrs, defineEmits, defineProps, ref } from 'vue'
|
|
4
|
+
import { commonPropsType, DISPLAY_HIDDEN } from '../../utils/index.js'
|
|
5
5
|
|
|
6
6
|
defineOptions({
|
|
7
7
|
inheritAttrs: false
|
|
8
8
|
})
|
|
9
9
|
|
|
10
|
+
const collapseLimt = 5
|
|
11
|
+
const isCollapse = ref(true)
|
|
10
12
|
const modelValue = defineModel()
|
|
11
13
|
const attrs = useAttrs()
|
|
12
14
|
const lang = inject('lang')
|
|
@@ -25,13 +27,46 @@ const collapseProps = computed(() => {
|
|
|
25
27
|
const pmPageMetaList = computed(() => {
|
|
26
28
|
return props.config?.pmPageMetaList?.filter(item => !item.collapseSlot) || []
|
|
27
29
|
})
|
|
30
|
+
const showCollapseBtn = computed(() => {
|
|
31
|
+
return pmPageMetaList.value.filter(item => item.displayType != DISPLAY_HIDDEN)?.length > collapseLimt
|
|
32
|
+
})
|
|
33
|
+
const showPageMeteList = computed(() => {
|
|
34
|
+
return pmPageMetaList.value.filter(item => item.displayType != DISPLAY_HIDDEN).slice(0, isCollapse.value ? collapseLimt : Number.MAX_VALUE)
|
|
35
|
+
})
|
|
36
|
+
const collapseLabel = computed(() => {
|
|
37
|
+
const isCh = lang?.value?.indexOf('zh') > -1
|
|
38
|
+
return isCollapse.value ? (isCh ? '更多' : 'More') : (isCh ? '收起' : 'Close')
|
|
39
|
+
})
|
|
40
|
+
function toCollapse() {
|
|
41
|
+
isCollapse.value = !isCollapse.value
|
|
42
|
+
}
|
|
28
43
|
</script>
|
|
29
44
|
|
|
30
45
|
<template>
|
|
31
46
|
<cmi-collapse v-bind="{...attrs, ...collapseProps}">
|
|
32
|
-
<
|
|
47
|
+
<div class="render-wrap">
|
|
48
|
+
<Renderer :config="showPageMeteList" v-model="modelValue"></Renderer>
|
|
49
|
+
</div>
|
|
50
|
+
<div v-if="showCollapseBtn" class="collapse-wrap">
|
|
51
|
+
<cmi-button type="text" size="small" @click="toCollapse">
|
|
52
|
+
{{ collapseLabel }}
|
|
53
|
+
</cmi-button>
|
|
54
|
+
</div>
|
|
33
55
|
</cmi-collapse>
|
|
34
56
|
</template>
|
|
35
57
|
|
|
36
58
|
<style lang="scss">
|
|
59
|
+
.render-wrap {
|
|
60
|
+
div:last-child {
|
|
61
|
+
cmi-cell {
|
|
62
|
+
&::after {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.collapse-wrap {
|
|
69
|
+
display: flex;
|
|
70
|
+
justify-content: end;
|
|
71
|
+
}
|
|
37
72
|
</style>
|
|
@@ -16,7 +16,7 @@ const tableProps = computed(() => {
|
|
|
16
16
|
card: props.config?.displayType === 'card',
|
|
17
17
|
display: props.config?.display,
|
|
18
18
|
open: props.config?.open === '1',
|
|
19
|
-
showlandscape: props.config?.
|
|
19
|
+
showlandscape: props.config?.showLandscape === '1',
|
|
20
20
|
}
|
|
21
21
|
})
|
|
22
22
|
|
|
@@ -367,7 +367,7 @@ export default {
|
|
|
367
367
|
{
|
|
368
368
|
tableColumnConfigs.value.map((columnConfg, configIdx) => {
|
|
369
369
|
return columnConfg.displayType == DISPLAY_HIDDEN ? null : (
|
|
370
|
-
<ElTableColumn key={columnConfg.requiredFlag} {...getTableColumnProps(columnConfg, configIdx)}>
|
|
370
|
+
<ElTableColumn key={columnConfg.requiredFlag + columnConfg.metaCode} {...getTableColumnProps(columnConfg, configIdx)}>
|
|
371
371
|
{{
|
|
372
372
|
header: () => (
|
|
373
373
|
<span className='head-span' title={lang.value.indexOf('zh') > -1 ? columnConfg.metaNameZh : columnConfg.metaNameEn}>
|
package/src/utils/render.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCodeMapRules } from '../rules/rulesDriver.js'
|
|
2
2
|
import { resolveAssetComponents, findComponent, compareComponet, normalPixel, isPlainObject, hasOwn, isFnStr, normalCapitalizeComponent, capitalize, camelize, formatDate} from './common.js'
|
|
3
|
-
import { resolveComponent, inject } from 'vue'
|
|
3
|
+
import { resolveComponent, inject, defineAsyncComponent } from 'vue'
|
|
4
4
|
import CustomComponentColH5 from '../components/packages-H5/CustomComponentColH5.vue'
|
|
5
5
|
import {
|
|
6
6
|
commonPropsType,
|
|
@@ -26,6 +26,7 @@ import { isArray, isFunction, isString } from './is.js'
|
|
|
26
26
|
import CustomComponentPlain from '../components/packages-web/CustomComponentPlain.vue'
|
|
27
27
|
import QuestionFilled from '../components/icons/question-filled.vue'
|
|
28
28
|
import { dispatchClickEvent, dispatchClickEvents, getTableConfig } from '../components/helper/eventOrchestration.js'
|
|
29
|
+
import CmiFormItem from '../components/cmiFormItem'
|
|
29
30
|
|
|
30
31
|
// 解析配置中的defStyle属性
|
|
31
32
|
export function parseDefStyle(defStyle) {
|
|
@@ -166,9 +167,6 @@ export function normalConfig({
|
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
let extendAttrObj = parseExtendAttr(config)
|
|
169
|
-
if (metaType == 'cmi-card') {
|
|
170
|
-
debugger
|
|
171
|
-
}
|
|
172
170
|
let extendObj = {
|
|
173
171
|
removeCol: findComponent(NOT_NEED_COL_ITEM_META_TYPE, extendAttrObj.renderby) !== -1 || findComponent(NOT_NEED_COL_ITEM_META_TYPE, metaType) !== -1,
|
|
174
172
|
needformItem: (findComponent(NOT_NEED_FORM_ITEM_META_TYPE, extendAttrObj.renderby) !== -1 || findComponent(NOT_NEED_FORM_ITEM_META_TYPE, metaType) !== -1) ? false : needformItem, // 表示这个配置项对应的渲染组件是否需要formItem进行包装 移动端是cmi-form-item
|
|
@@ -582,20 +580,27 @@ function generateFormItemPc (config, lang, compProps, params,) {
|
|
|
582
580
|
}
|
|
583
581
|
}
|
|
584
582
|
|
|
585
|
-
function generateFormItemH5(config, lang, compProps, params) {
|
|
583
|
+
function generateFormItemH5(config, lang, compProps, params = {}) {
|
|
584
|
+
const { messageInstance } = params
|
|
585
|
+
const props = {
|
|
586
|
+
config,
|
|
587
|
+
lang,
|
|
588
|
+
messageInstance,
|
|
589
|
+
hidemessage: config?.hidemessage == '1' ? true : false,
|
|
590
|
+
hideasterisk: config?.hideasterisk == '1' ? true : false,
|
|
591
|
+
...getFormItemExtendProps(config, lang, params),
|
|
592
|
+
}
|
|
593
|
+
// labelWidth 需要特殊处理
|
|
594
|
+
if (hasOwn(config, 'labelWidth')) {
|
|
595
|
+
props.labelWidth = props.labelWidth && `${props.labelWidth}` !== '-1' ? props.labelWidth : undefined
|
|
596
|
+
}
|
|
597
|
+
|
|
586
598
|
return node => {
|
|
587
599
|
if (!config.needformItem && !config.showFormItem) {
|
|
588
600
|
return node
|
|
589
601
|
}
|
|
590
|
-
const props = {
|
|
591
|
-
label: lang.indexOf('zh') > -1 ? config.metaNameZh : config.metaNameEn,
|
|
592
|
-
hidemessage: config?.hidemessage == '1' ? true : false,
|
|
593
|
-
hideasterisk: config?.hideasterisk == '1' ? true : false,
|
|
594
|
-
...getFormItemExtendProps(config, lang, params),
|
|
595
|
-
}
|
|
596
|
-
|
|
597
602
|
return (
|
|
598
|
-
<
|
|
603
|
+
<CmiFormItem {...props}>{node}</CmiFormItem>
|
|
599
604
|
)
|
|
600
605
|
}
|
|
601
606
|
}
|