lw-cdp-ui 1.3.52 → 1.3.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/dist/components/lwFormMini/FormComponent.vue +27 -25
- package/dist/components/lwFormMini/FormItem.vue +11 -2
- package/dist/components/lwTableForm/index.vue +11 -1
- package/dist/lw-cdp-ui.esm.js +4396 -4383
- package/dist/lw-cdp-ui.umd.js +13 -13
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -62,6 +62,7 @@ export default {
|
|
|
62
62
|
componentMap: {
|
|
63
63
|
input: 'el-input',
|
|
64
64
|
checkbox: 'el-checkbox',
|
|
65
|
+
treeSelect: 'el-tree-select',
|
|
65
66
|
checkboxGroup: 'el-checkbox-group',
|
|
66
67
|
switch: 'el-switch',
|
|
67
68
|
select: 'el-select',
|
|
@@ -89,54 +90,55 @@ export default {
|
|
|
89
90
|
},
|
|
90
91
|
// 获取组件属性
|
|
91
92
|
getComponentProps(item) {
|
|
92
|
-
let
|
|
93
|
+
let propsItem = {}
|
|
94
|
+
const { type, startPlaceholder, endPlaceholder, controlsPosition, items, ...options } = item?.options
|
|
93
95
|
if (item?.options) {
|
|
94
96
|
// 通用属性
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (item.options.type)
|
|
97
|
+
propsItem.placeholder = item.options.placeholder || ''
|
|
98
|
+
propsItem.clearable = item.options.clearable || true
|
|
99
|
+
if (item.options.type) propsItem.type = item.options.type
|
|
98
100
|
if (item.options?.maxlength) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
propsItem.maxlength = item.options.maxlength
|
|
102
|
+
propsItem.showWordLimit = true // 正确启用字数统计
|
|
101
103
|
}
|
|
102
104
|
if (item.options?.activeText) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
propsItem.maxlength = item.options.maxlength
|
|
106
|
+
propsItem.inlinePrompt = true
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
// 组件特有属性
|
|
108
110
|
switch (item.component) {
|
|
109
111
|
case 'select':
|
|
110
|
-
|
|
112
|
+
propsItem.filterable = true
|
|
111
113
|
break
|
|
112
114
|
case 'date':
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
propsItem.type = type || 'date'
|
|
116
|
+
propsItem.startPlaceholder = startPlaceholder || '开始日期'
|
|
117
|
+
propsItem.endPlaceholder = endPlaceholder || '结束日期'
|
|
116
118
|
break
|
|
117
119
|
case 'number':
|
|
118
|
-
|
|
120
|
+
propsItem.controlsPosition = controlsPosition || 'right'
|
|
119
121
|
break
|
|
120
122
|
case 'treeSelect':
|
|
121
|
-
|
|
123
|
+
propsItem.data = items || []
|
|
122
124
|
break
|
|
123
|
-
case '
|
|
124
|
-
|
|
125
|
+
case 'cascader':
|
|
126
|
+
propsItem.options = items || []
|
|
125
127
|
break
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
|
|
130
|
-
...
|
|
131
|
-
...
|
|
131
|
+
propsItem = {
|
|
132
|
+
...options,
|
|
133
|
+
...propsItem
|
|
134
|
+
}
|
|
135
|
+
if ( item.component == 'cascader') {
|
|
136
|
+
console.log(propsItem)
|
|
132
137
|
}
|
|
133
138
|
// 清除
|
|
134
|
-
delete
|
|
135
|
-
return
|
|
139
|
+
delete propsItem.disabled
|
|
140
|
+
return propsItem
|
|
136
141
|
}
|
|
137
142
|
}
|
|
138
143
|
}
|
|
139
|
-
</script>
|
|
140
|
-
|
|
141
|
-
<style>
|
|
142
|
-
</style>
|
|
144
|
+
</script>
|
|
@@ -36,9 +36,18 @@
|
|
|
36
36
|
<el-icon><el-icon-question-filled /></el-icon>
|
|
37
37
|
</el-tooltip>
|
|
38
38
|
</template>
|
|
39
|
-
|
|
39
|
+
<!-- cascader 组个组件有问题 动态加载下拉文字不会显示 -->
|
|
40
|
+
<template v-if="item.component == 'cascader'">
|
|
41
|
+
<el-cascader v-model="objItem.value"
|
|
42
|
+
style="width: 100%;"
|
|
43
|
+
:props="item?.options?.props"
|
|
44
|
+
:separator="item?.options?.separator"
|
|
45
|
+
:disabled="item?.options?.disabled"
|
|
46
|
+
:options="item?.options.items"
|
|
47
|
+
clearable></el-cascader>
|
|
48
|
+
</template>
|
|
40
49
|
<!-- 动态组件 -->
|
|
41
|
-
<template v-if="componentType.includes(item.component)">
|
|
50
|
+
<template v-else-if="componentType.includes(item.component)">
|
|
42
51
|
<FormComponent v-model="objItem.value"
|
|
43
52
|
:item="item"
|
|
44
53
|
:disabled="item?.options?.disabled" />
|
|
@@ -27,8 +27,18 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
|
29
29
|
<template #default="{ row, $index, column }">
|
|
30
|
+
<!-- cascader 组个组件有问题 动态加载下拉文字不会显示 -->
|
|
31
|
+
<template v-if="item.component == 'cascader'">
|
|
32
|
+
<el-cascader v-model="row[item.name]"
|
|
33
|
+
style="width: 100%;"
|
|
34
|
+
:props="item?.options?.props"
|
|
35
|
+
:separator="item?.options?.separator"
|
|
36
|
+
:disabled="item?.options?.disabled"
|
|
37
|
+
:options="item?.options.items"
|
|
38
|
+
clearable></el-cascader>
|
|
39
|
+
</template>
|
|
30
40
|
<!-- 动态组件 -->
|
|
31
|
-
<template v-if="componentType.includes(item.component)">
|
|
41
|
+
<template v-else-if="componentType.includes(item.component)">
|
|
32
42
|
<FormComponent v-model="row[item.name]"
|
|
33
43
|
:size="config.size || 'small'"
|
|
34
44
|
:item="item"
|