feat:clickSearch回显

This commit is contained in:
zhangyu
2021-12-23 19:53:17 +08:00
parent 9e50b5c6f9
commit df7cdd72f4
2 changed files with 12 additions and 2 deletions

View File

@@ -9,8 +9,18 @@ export default {
if (qv && val.type == 'number') {
qv = lodash.toNumber(qv)
}
if (qv && val.type == 'array') {
qv = qv.split(',')
}
setTimeout(() => {
this.setSearchInput(val, qv)
if (qv && val.type2 == 'array') {
const arr = qv.split(',').map(item => Number(item))
qv && this.$set(val.target2, val.propertyName, arr)
}
if (qv && val.type2 == 'json') {
qv && this.$set(val.target2, val.propertyName, qv)
}
}, 200)
qv && this.$set(val.target, val.propertyName, qv)
})

View File

@@ -840,8 +840,8 @@ export default {
},
jsonKey: 'val'
},
dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string' },
fields: { target: this.searchCheckBox, propertyName: 'fields', type: 'json' },
dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string', target2: this.selectValue, type2: 'array' },
fields: { target: this.searchCheckBox, propertyName: 'fields', type: 'json', target2: this.selectValue, type2: 'json' },
ping: { target: this.searchCheckBox, propertyName: 'ping', type: 'string' },
modelIds: { target: this.searchCheckBox, propertyName: 'modelIds', type: 'string' },
typeIds: { target: this.searchCheckBox, propertyName: 'typeIds', type: 'string' }