@xuekl/cli-components 1.1.5 → 1.1.7
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/XklForm.vue +13 -2
- package/package.json +1 -1
package/XklForm.vue
CHANGED
|
@@ -80,7 +80,12 @@ const opts = form._opts || {}
|
|
|
80
80
|
const modeFields: any = {}
|
|
81
81
|
Object.keys(form).forEach(prop => {
|
|
82
82
|
if (form['get' + setUpperFirst(prop)]) {
|
|
83
|
-
|
|
83
|
+
let field: FormItem = form['get' + setUpperFirst(prop)]()
|
|
84
|
+
if (field.query) {
|
|
85
|
+
Object.assign(field, field.query)
|
|
86
|
+
} else if (field.search) {
|
|
87
|
+
Object.assign(field, field.search)
|
|
88
|
+
}
|
|
84
89
|
field.rules = field.rules || []
|
|
85
90
|
field.refRules = ref(field.rules)
|
|
86
91
|
field.show = field.show || (() => true)
|
|
@@ -110,9 +115,15 @@ Object.keys(form).forEach(prop => {
|
|
|
110
115
|
placeholder: placeholderStart + field.label.replace(':', '').replace(':', ''),
|
|
111
116
|
clearable: true
|
|
112
117
|
}
|
|
118
|
+
if (opts.placeholder === false) {
|
|
119
|
+
field.element.placeholder = ''
|
|
120
|
+
}
|
|
113
121
|
} else {
|
|
114
|
-
field.element.placeholder = placeholderStart + field.label.replace(':', '').replace(':', '')
|
|
122
|
+
field.element.placeholder = field.element.placeholder || placeholderStart + field.label.replace(':', '').replace(':', '')
|
|
115
123
|
field.element.clearable = typeof field.element.clearable === 'undefined' ? true : field.element.clearable
|
|
124
|
+
if (opts.placeholder === false) {
|
|
125
|
+
field.element.placeholder = ''
|
|
126
|
+
}
|
|
116
127
|
}
|
|
117
128
|
const item = {
|
|
118
129
|
prop,
|