forked from github/dataease
perf: 过滤器在编辑页面触发两次请求
This commit is contained in:
parent
92c6c26d4c
commit
50b03eef6a
@ -509,7 +509,7 @@ export default {
|
||||
this.$store.commit('setComponentWithId', this.currentFilterCom)
|
||||
this.$store.commit('recordSnapshot', 'sureFilter')
|
||||
this.$store.commit('setCurComponent', { component: this.currentFilterCom, index: this.curComponentIndex })
|
||||
bus.$emit('reset-default-value', this.currentFilterCom.id)
|
||||
bus.$emit('reset-default-value', this.currentFilterCom)
|
||||
this.closeFilter()
|
||||
},
|
||||
reFreshComponent(component) {
|
||||
|
@ -418,8 +418,10 @@ export default {
|
||||
this.$refs.dateRef.hidePicker()
|
||||
}
|
||||
},
|
||||
resetDefaultValue(id) {
|
||||
if (this.inDraw && this.manualModify && this.element.id === id) {
|
||||
resetDefaultValue(ele) {
|
||||
const id = ele.id
|
||||
const eleVal = ele.options.value.toString()
|
||||
if (this.inDraw && this.manualModify && this.element.id === id && this.values.toString() !== eleVal && this.defaultValueStr === eleVal) {
|
||||
if (!this.element.options.attrs.default.isDynamic) {
|
||||
this.values = this.fillValueDerfault()
|
||||
this.dateChange(this.values)
|
||||
|
@ -99,8 +99,10 @@ export default {
|
||||
clearHandler() {
|
||||
this.value = null
|
||||
},
|
||||
resetDefaultValue(id) {
|
||||
if (this.inDraw && this.manualModify && this.element.id === id) {
|
||||
resetDefaultValue(ele) {
|
||||
const id = ele.id
|
||||
const eleVal = ele.options.value.toString()
|
||||
if (this.inDraw && this.manualModify && this.element.id === id && this.value.toString() !== eleVal && this.defaultValueStr === eleVal) {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.search()
|
||||
}
|
||||
|
@ -160,8 +160,10 @@ export default {
|
||||
this.form.min = null
|
||||
this.form.max = null
|
||||
},
|
||||
resetDefaultValue(id) {
|
||||
if (this.inDraw && this.manualModify && this.element.id === id) {
|
||||
resetDefaultValue(ele) {
|
||||
const id = ele.id
|
||||
const eleVal = ele.options.value.toString()
|
||||
if (this.inDraw && this.manualModify && this.element.id === id && this.defaultValueStr === eleVal) {
|
||||
if (!this.element.options.value) {
|
||||
this.form.min = null
|
||||
this.form.max = null
|
||||
|
@ -345,8 +345,10 @@ export default {
|
||||
this.$refs.deSelect.$refs.visualSelect.blur()
|
||||
}
|
||||
},
|
||||
resetDefaultValue(id) {
|
||||
if (this.inDraw && this.manualModify && this.element.id === id) {
|
||||
resetDefaultValue(ele) {
|
||||
const id = ele.id
|
||||
const eleVal = ele.options.value.toString()
|
||||
if (this.inDraw && this.manualModify && this.element.id === id && this.value.toString() !== eleVal && this.defaultValueStr === eleVal) {
|
||||
if (this.selectFirst) {
|
||||
this.fillFirstValue()
|
||||
this.firstChange(this.value)
|
||||
|
@ -282,8 +282,10 @@ export default {
|
||||
this.checkAll = false
|
||||
this.isIndeterminate = false
|
||||
},
|
||||
resetDefaultValue(id) {
|
||||
if (this.inDraw && this.manualModify && this.element.id === id) {
|
||||
resetDefaultValue(ele) {
|
||||
const id = ele.id
|
||||
const eleVal = ele.options.value.toString()
|
||||
if (this.inDraw && this.manualModify && this.element.id === id && this.value.toString() !== eleVal && this.defaultValueStr === eleVal) {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.changeValue(this.value)
|
||||
|
||||
|
@ -234,8 +234,10 @@ export default {
|
||||
this.value = this.element.options.attrs.multiple ? [] : null
|
||||
this.$refs.deSelectTree && this.$refs.deSelectTree.resetSelectAll && this.$refs.deSelectTree.resetSelectAll()
|
||||
},
|
||||
resetDefaultValue(id) {
|
||||
if (this.inDraw && this.manualModify && this.element.id === id) {
|
||||
resetDefaultValue(ele) {
|
||||
const id = ele.id
|
||||
const eleVal = ele.options.value.toString()
|
||||
if (this.inDraw && this.manualModify && this.element.id === id && this.value.toString() !== eleVal && this.defaultValueStr === eleVal) {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.changeValue(this.value)
|
||||
}
|
||||
|
@ -1269,7 +1269,7 @@ export default {
|
||||
this.$store.commit('recordSnapshot', 'sureFilter')
|
||||
this.$store.commit('setCurComponent', { component: this.currentFilterCom, index: this.curComponentIndex })
|
||||
this.$store.commit('setComponentFromList', this.currentFilterCom)
|
||||
bus.$emit('reset-default-value', this.currentFilterCom.id)
|
||||
bus.$emit('reset-default-value', this.currentFilterCom)
|
||||
this.closeFilter()
|
||||
},
|
||||
reFreshComponent(component) {
|
||||
|
Loading…
Reference in New Issue
Block a user