ebike-plus-ui/src/store/route-list.ts

22 lines
499 B
TypeScript
Raw Normal View History

2024-04-11 00:15:57 +08:00
import { defineStore } from "pinia";
/**
*
* @methods setRoutesList
* @methods setrouteNames
*/
export const useRoutesListStore = defineStore("routeList", {
state: (): any => ({
routeList: [], // 路由数据
routeNames: [] // 路由名称
}),
actions: {
async setRouteList(data: Array<string>) {
this.routesList = data;
},
async setrouteNames(data: Array<string>) {
this.routeNames = data;
}
}
});