添加页签openPage支持传递参数

This commit is contained in:
不做码农 2022-04-08 20:20:11 +08:00
parent 861710079a
commit d05690654b

View File

@ -55,10 +55,10 @@ export default {
return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute); return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
}, },
// 添加tab页签 // 添加tab页签
openPage(title, url) { openPage(title, url, params) {
var obj = { path: url, meta: { title: title } } var obj = { path: url, meta: { title: title } }
store.dispatch('tagsView/addView', obj); store.dispatch('tagsView/addView', obj);
return router.push(url); return router.push({ path: url, query: params });
}, },
// 修改tab页签 // 修改tab页签
updatePage(obj) { updatePage(obj) {