首页+登录页
This commit is contained in:
12
src/config/store.ts
Normal file
12
src/config/store.ts
Normal file
@ -0,0 +1,12 @@
|
||||
const files = import.meta.glob("@/stores/*.ts", {
|
||||
eager: true,
|
||||
});
|
||||
|
||||
const store: Record<string, any> = {};
|
||||
// console.log("stores封装",files);
|
||||
for (const i in files) {
|
||||
const t = i.split("/");
|
||||
const name = t[t.length - 1].split(".")[0];
|
||||
store[name] = files[i];
|
||||
}
|
||||
export default store;
|
Reference in New Issue
Block a user