routeTabs-292b8612.js 691 B

1
  1. import{j as o,r as a}from"./index-ca637554.js";const i=o("routeTabs",{state:()=>({historyRoutes:[],activeKey:0}),persist:{enabled:!0,strategies:[{storage:localStorage,paths:["historyRoutes","activeKey"]}]},getters:{},actions:{saveRoute(e){if(!this.historyRoutes.some(t=>t.name==e.name))return this.historyRoutes.push({meta:e.meta,name:e.name,path:e.path,query:e.query})},delRoute(e,s){if(console.log(e,s),a.options.routes[1].children,this.historyRoutes=this.historyRoutes.filter(t=>{if(t.name!==e)return t}),e==s){if(this.historyRoutes.length>0)return a.replace({name:this.historyRoutes[0].name});if(this.historyRoutes.length==0)return a.replace({name:"dataDashboard"})}}}});export{i as u};