Merge pull request #2559 from dataease/pr@dev@fix_select_sql_inject

fix(仪表板): 下拉过滤器排序字段出现sql注入参数后依然能够点击确认
This commit is contained in:
fit2cloud-chenyw 2022-07-03 21:44:36 +08:00 committed by GitHub
commit 9130a7c0a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,6 +128,8 @@ export default {
this.element.options.attrs.fieldId.length > 0 && this.element.options.attrs.fieldId.length > 0 &&
method(param).then(res => { method(param).then(res => {
this.datas = this.optionDatas(res.data) this.datas = this.optionDatas(res.data)
}).catch(e => {
bus.$emit('valid-values-change', false)
}) || (this.element.options.value = '') }) || (this.element.options.value = '')
}, },
'element.options.attrs.multiple': function(value, old) { 'element.options.attrs.multiple': function(value, old) {
@ -167,6 +169,8 @@ export default {
this.show = true this.show = true
this.handleCoustomStyle() this.handleCoustomStyle()
}) })
}).catch(e => {
bus.$emit('valid-values-change', false)
}) || (this.element.options.value = '') }) || (this.element.options.value = '')
} }
@ -222,6 +226,8 @@ export default {
} }
method({ fieldIds: this.element.options.attrs.fieldId.split(','), sort: this.element.options.attrs.sort }).then(res => { method({ fieldIds: this.element.options.attrs.fieldId.split(','), sort: this.element.options.attrs.sort }).then(res => {
this.datas = this.optionDatas(res.data) this.datas = this.optionDatas(res.data)
}).catch(e => {
bus.$emit('valid-values-change', false)
}) })
} }
if (this.element.options.value) { if (this.element.options.value) {