acdr-ui/dist/build/mp-weixin/store/routers.js

2 lines
991 B
JavaScript
Raw Normal View History

2024-09-19 07:20:14 +08:00
"use strict";const e=require("../common/vendor.js"),t=e.defineStore("routers",(()=>{const t=e.ref([{text:"首页",iconPath:"/static/tabbar/home.png",selectedIconPath:"/static/tabbar/homeL.png",pagePath:"/pages/index/index"},{iconPath:"/static/tabbar/space.png",selectedIconPath:"/static/tabbar/spaceL.png",pagePath:"/pages/space/index",text:"互动空间"},{iconPath:"/static/tabbar/24gl-paperPlane.png",selectedIconPath:"/static/tabbar/24gl-paperPlaneL.png",pagePath:"/pages/push/index",text:"发布"},{iconPath:"/static/tabbar/message.png",selectedIconPath:"/static/tabbar/messageL.png",pagePath:"/pages/message/index",text:"消息"},{iconPath:"/static/tabbar/my.png",selectedIconPath:"/static/tabbar/myL.png",pagePath:"/pages/my/index",text:"我的"}]),a=e.ref(0),s=e.ref(t.value[0].pagePath),n=e.computed((()=>t.value.findIndex((e=>e.pagePath===s.value))));return{tabList:t,currentTab:s,setCurrentTab:e=>{s.value=e,a.value=n.value},selected:a}}),{persist:!0});exports.useRoutersStore=t;