fix(仪表板): 下拉过滤器删除带有sql注入的排序字段后依然不能点击确认按钮

This commit is contained in:
fit2cloud-chenyw 2022-07-04 10:29:01 +08:00
parent 9130a7c0a3
commit 929e869e36

View File

@ -128,6 +128,7 @@ 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)
bus.$emit('valid-values-change', true)
}).catch(e => { }).catch(e => {
bus.$emit('valid-values-change', false) bus.$emit('valid-values-change', false)
}) || (this.element.options.value = '') }) || (this.element.options.value = '')
@ -169,6 +170,7 @@ export default {
this.show = true this.show = true
this.handleCoustomStyle() this.handleCoustomStyle()
}) })
bus.$emit('valid-values-change', true)
}).catch(e => { }).catch(e => {
bus.$emit('valid-values-change', false) bus.$emit('valid-values-change', false)
}) || (this.element.options.value = '') }) || (this.element.options.value = '')
@ -226,6 +228,7 @@ 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)
bus.$emit('valid-values-change', true)
}).catch(e => { }).catch(e => {
bus.$emit('valid-values-change', false) bus.$emit('valid-values-change', false)
}) })