|
|
@@ -35,15 +35,14 @@ const onChange = (val)=>{
|
|
|
let path = historyRoutes.value.filter(element => element.name == val)
|
|
|
router.push({name:path[0].name,query:path[0].query,meta:{keepAlive:false}})
|
|
|
}
|
|
|
-watch(() => router.currentRoute.value,(to, from) => {
|
|
|
- store.appData(to.meta.name)
|
|
|
+router.beforeEach((to,from,next)=>{
|
|
|
+ let rs = historyRoutes.value.some(item=>item.name == from.name)
|
|
|
+
|
|
|
rotTabs.saveRoute(to)
|
|
|
+ store.appData(to.meta.name)
|
|
|
activeKey.value = to.name
|
|
|
+ next()
|
|
|
})
|
|
|
-// router.beforeEach((to,from,next)=>{
|
|
|
-
|
|
|
-// next()
|
|
|
-// })
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
.sw-tabs{
|