forked from github/dataease
fix(仪表板-过滤器): 仪表板编辑状态下切换移动布局再切回来过滤器逻辑错误
This commit is contained in:
parent
21c1402907
commit
222ba6565d
@ -244,6 +244,21 @@ const data = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clearAllViewFilter(state) {
|
||||||
|
state.componentData.forEach(item => {
|
||||||
|
if (item.type === 'view' && item.filters && item.filters.length) {
|
||||||
|
item.filters = []
|
||||||
|
}
|
||||||
|
if (item.type === 'de-tabs' && item.options.tabList && item.options.tabList.length) {
|
||||||
|
item.options.tabList.forEach(tab => {
|
||||||
|
if (tab.content && tab.content.type === 'view' && tab.content.filters && tab.content.filters.length) {
|
||||||
|
tab.content.filters = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
addViewFilter(state, data) {
|
addViewFilter(state, data) {
|
||||||
const condition = formatCondition(data)
|
const condition = formatCondition(data)
|
||||||
const vValid = valueValid(condition)
|
const vValid = valueValid(condition)
|
||||||
@ -505,6 +520,7 @@ const data = {
|
|||||||
},
|
},
|
||||||
// 启用移动端布局
|
// 启用移动端布局
|
||||||
openMobileLayout(state) {
|
openMobileLayout(state) {
|
||||||
|
this.commit('clearAllViewFilter')
|
||||||
state.componentDataCache = null
|
state.componentDataCache = null
|
||||||
state.componentDataCache = JSON.stringify(state.componentData)
|
state.componentDataCache = JSON.stringify(state.componentData)
|
||||||
state.pcComponentData = state.componentData
|
state.pcComponentData = state.componentData
|
||||||
|
Loading…
Reference in New Issue
Block a user