mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-10 20:02:54 +00:00
解决 ctx 格式异常问题
This commit is contained in:
parent
3cf7ee003e
commit
732000aec4
6
packages/vite-plugin/dist/index.js
vendored
6
packages/vite-plugin/dist/index.js
vendored
@ -1660,6 +1660,12 @@
|
||||
// 删除临时页面
|
||||
ctx.pages = ctx.pages?.filter((e) => !e.isTemp);
|
||||
ctx.subPackages = ctx.subPackages?.filter((e) => !e.isTemp);
|
||||
// 删除不需要的数据
|
||||
for (const i in ctx) {
|
||||
if (!["pages", "subPackages", "tabBar", "globalStyle", "uniIdRouter"].includes(i)) {
|
||||
delete ctx[i];
|
||||
}
|
||||
}
|
||||
// 加载 uni_modules 配置文件
|
||||
const files = await glob.glob(rootDir("uni_modules") + "/**/pages_init.json", {
|
||||
stat: true,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-vue/vite-plugin",
|
||||
"version": "8.2.13",
|
||||
"version": "8.2.14",
|
||||
"description": "cool-admin、cool-uni builder",
|
||||
"types": "./dist/index.d.ts",
|
||||
"main": "/dist/index.js",
|
||||
|
||||
@ -29,6 +29,13 @@ export async function createCtx() {
|
||||
ctx.pages = ctx.pages?.filter((e) => !e.isTemp);
|
||||
ctx.subPackages = ctx.subPackages?.filter((e) => !e.isTemp);
|
||||
|
||||
// 删除不需要的数据
|
||||
for (const i in ctx) {
|
||||
if (!["pages", "subPackages", "tabBar", "globalStyle", "uniIdRouter"].includes(i)) {
|
||||
delete ctx[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 加载 uni_modules 配置文件
|
||||
const files = await glob(rootDir("uni_modules") + "/**/pages_init.json", {
|
||||
stat: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user