|
@@ -157,7 +157,7 @@ const assembleList = async ({ key, idsStr, isRefresh = false }) => {
|
|
|
})
|
|
|
}
|
|
|
// 添加
|
|
|
- const ids = idsStr.split('_') || []
|
|
|
+ const ids = typeof idsStr === 'string' ? idsStr.split('_') : []
|
|
|
const obj = getItemObj({ key, ids, dictArr: list.value })
|
|
|
if (!obj) return
|
|
|
const index = showSelectList.value.findIndex(i => i.key === key)
|
|
@@ -181,6 +181,7 @@ watch(
|
|
|
...arr.filter(key => !key.includes('cityId_')),
|
|
|
] : ''
|
|
|
// 回显已选筛选-标签
|
|
|
+
|
|
|
if (!newKeyList) { // 路由没有参数
|
|
|
showSelectList.value = []
|
|
|
list.value = list.value.filter(e => !(e.cityLevel && e.cityLevel > 1))
|
|
@@ -190,9 +191,9 @@ watch(
|
|
|
assembleList({ key, idsStr: newVal[key], isRefresh: true })
|
|
|
})
|
|
|
}
|
|
|
- else if (newKeyList && Object.keys(oldVal).length) { //路由参数更新
|
|
|
+ else { // 路由参数更新
|
|
|
newKeyList.forEach(key => {
|
|
|
- if (newVal[key] === oldVal[key]) return
|
|
|
+ // if (newVal[key] === oldVal[key]) return
|
|
|
assembleList({ key, idsStr: newVal[key] })
|
|
|
})
|
|
|
// showSelectList去掉newVal里面没有的key
|