Merge remote-tracking branch 'origin/4.15'

This commit is contained in:
Rohit Yadav 2021-04-13 18:12:55 +05:30
commit a69bf67ac4
2 changed files with 2501 additions and 1535 deletions

File diff suppressed because it is too large Load Diff

View File

@ -40,7 +40,7 @@
slot="addonBefore"
trigger="click"
v-model="visibleFilter">
<template slot="content">
<template slot="content" v-if="visibleFilter">
<a-form
style="min-width: 170px"
:form="form"
@ -104,7 +104,7 @@
class="filter-button"
size="small"
@click="() => { searchQuery = null }">
<a-icon type="filter" :theme="Object.keys(searchParams).length > 0 ? 'twoTone' : 'outlined'" />
<a-icon type="filter" :theme="isFiltered ? 'twoTone' : 'outlined'" />
</a-button>
</a-popover>
</a-input-search>
@ -140,7 +140,8 @@ export default {
fields: [],
inputKey: null,
inputValue: null,
fieldValues: {}
fieldValues: {},
isFiltered: false
}
},
beforeCreate () {
@ -157,6 +158,13 @@ export default {
if (to && to.query && 'q' in to.query) {
this.searchQuery = to.query.q
}
this.isFiltered = false
this.searchFilters.some(item => {
if (this.searchParams[item]) {
this.isFiltered = true
return true
}
})
}
},
mounted () {
@ -417,6 +425,7 @@ export default {
field[item] = undefined
this.form.setFieldsValue(field)
})
this.isFiltered = false
this.inputKey = null
this.inputValue = null
this.searchQuery = null
@ -430,6 +439,7 @@ export default {
if (err) {
return
}
this.isFiltered = true
for (const key in values) {
const input = values[key]
if (input === '' || input === null || input === undefined) {