lw-cdp-ui 1.3.53 → 1.3.55
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 +25 -24
- package/dist/components/lwFormMini/FormItem.vue +11 -2
- package/dist/components/lwTableForm/index.vue +11 -1
- package/dist/lw-cdp-ui.esm.js +1661 -1640
- package/dist/lw-cdp-ui.umd.js +12 -12
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -90,54 +90,55 @@ export default {
|
|
|
90
90
|
},
|
|
91
91
|
// 获取组件属性
|
|
92
92
|
getComponentProps(item) {
|
|
93
|
-
let
|
|
93
|
+
let propsItem = {}
|
|
94
|
+
const { type, startPlaceholder, endPlaceholder, controlsPosition, items, ...options } = item?.options || {}
|
|
94
95
|
if (item?.options) {
|
|
95
96
|
// 通用属性
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
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
|
|
99
100
|
if (item.options?.maxlength) {
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
propsItem.maxlength = item.options.maxlength
|
|
102
|
+
propsItem.showWordLimit = true // 正确启用字数统计
|
|
102
103
|
}
|
|
103
104
|
if (item.options?.activeText) {
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
propsItem.maxlength = item.options.maxlength
|
|
106
|
+
propsItem.inlinePrompt = true
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
// 组件特有属性
|
|
109
110
|
switch (item.component) {
|
|
110
111
|
case 'select':
|
|
111
|
-
|
|
112
|
+
propsItem.filterable = true
|
|
112
113
|
break
|
|
113
114
|
case 'date':
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
propsItem.type = type || 'date'
|
|
116
|
+
propsItem.startPlaceholder = startPlaceholder || '开始日期'
|
|
117
|
+
propsItem.endPlaceholder = endPlaceholder || '结束日期'
|
|
117
118
|
break
|
|
118
119
|
case 'number':
|
|
119
|
-
|
|
120
|
+
propsItem.controlsPosition = controlsPosition || 'right'
|
|
120
121
|
break
|
|
121
122
|
case 'treeSelect':
|
|
122
|
-
|
|
123
|
+
propsItem.data = items || []
|
|
123
124
|
break
|
|
124
125
|
case 'cascader':
|
|
125
|
-
|
|
126
|
+
propsItem.options = items || []
|
|
126
127
|
break
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
|
|
130
|
-
|
|
131
|
-
...
|
|
132
|
-
...
|
|
131
|
+
propsItem = {
|
|
132
|
+
...options,
|
|
133
|
+
...propsItem
|
|
134
|
+
}
|
|
135
|
+
if ( item.component == 'cascader') {
|
|
136
|
+
console.log(propsItem)
|
|
133
137
|
}
|
|
134
138
|
// 清除
|
|
135
|
-
delete
|
|
136
|
-
return
|
|
139
|
+
delete propsItem.disabled
|
|
140
|
+
return propsItem
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
}
|
|
140
|
-
</script>
|
|
141
|
-
|
|
142
|
-
<style>
|
|
143
|
-
</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"
|