refactor: 使用vite-plugin-fake-server替换vite-plugin-mock,使用@faker-js/faker替换mockjs (#763)

This commit is contained in:
xiaoming
2023-11-10 12:33:22 +08:00
committed by GitHub
parent 743691ba5d
commit 6e195c8b5c
12 changed files with 1393 additions and 1302 deletions

View File

@@ -1,5 +1,5 @@
// 模拟后端动态生成路由
import { MockMethod } from "vite-plugin-mock";
import { defineFakeRoute } from "vite-plugin-fake-server/client";
import { system, permission, frame, tabs } from "@/router/enums";
/**
@@ -198,7 +198,7 @@ const tabsRouter = {
]
};
export default [
export default defineFakeRoute([
{
url: "/get-async-routes",
method: "get",
@@ -209,4 +209,4 @@ export default [
};
}
}
] as MockMethod[];
]);