提交 6f5fec69 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

fix: 文本过滤组件空默认值异常

上级 490fad14
......@@ -64,7 +64,7 @@ export default {
},
created() {
if (this.element.options.value) {
this.value = this.element.options.value
this.value = this.fillValueDerfault()
this.search()
}
},
......
......@@ -68,7 +68,7 @@ class TextInputServiceImpl extends WidgetService {
})
}
getParam(element) {
const value = element.options.value
const value = this.fillValueDerfault(element)
const param = {
component: element,
value: !value ? [] : Array.isArray(value) ? value : [value],
......@@ -76,6 +76,11 @@ class TextInputServiceImpl extends WidgetService {
}
return param
}
fillValueDerfault(element) {
const defaultV = element.options.value === null ? '' : element.options.value.toString()
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') return null
return defaultV.split(',')[0]
}
}
const textInputServiceImpl = new TextInputServiceImpl()
export default textInputServiceImpl
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论