fix: 修复高级搜索输入框无法输入的bug

This commit is contained in:
q4speed 2020-07-17 10:59:26 +08:00
parent b9586a2b5d
commit ff42d6c96e
2 changed files with 9 additions and 5 deletions

View File

@ -72,9 +72,13 @@
reset() {
let source = this.condition.components;
this.config.components.forEach((component, index) => {
let operator = source[index].operator.value;
component.operator.value = operator === undefined ? component.operator.options[0].value : operator;
component.value = source[index].value;
if (component.operator.value !== undefined) {
let operator = source[index].operator.value;
component.operator.value = operator === undefined ? component.operator.options[0].value : operator;
}
if (component.value !== undefined) {
component.value = source[index].value;
}
})
},
open() {

View File

@ -215,8 +215,8 @@ export const MODULE = {
name: 'MsTableSearchInput',
label: "test_track.case.module",
operator: {
value: OPERATORS.LIKE.value, // 如果未设置value初始值则value初始值为options[0]
options: [OPERATORS.LIKE, OPERATORS.NOT_LIKE] // 运算符候选项
value: OPERATORS.LIKE.value,
options: [OPERATORS.LIKE, OPERATORS.NOT_LIKE]
},
}