create-bubbles 0.1.13 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -8
- package/index.js +2 -2
- package/package.json +49 -48
- package/template-vp-monorepo-react-nestjs/.vscode/extensions.json +3 -3
- package/LICENSE +0 -21
- package/template-nextjs-vinext-eslint/.dockerignore +0 -3
- package/template-nextjs-vinext-eslint/.vscode/settings.json +0 -53
- package/template-nextjs-vinext-eslint/Dockerfile +0 -21
- package/template-nextjs-vinext-eslint/README.md +0 -100
- package/template-nextjs-vinext-eslint/commitlint.config.js +0 -1
- package/template-nextjs-vinext-eslint/docker-compose.yaml +0 -22
- package/template-nextjs-vinext-eslint/eslint.config.js +0 -20
- package/template-nextjs-vinext-eslint/lefthook.yml +0 -11
- package/template-nextjs-vinext-eslint/next.config.ts +0 -8
- package/template-nextjs-vinext-eslint/nginx.conf +0 -14
- package/template-nextjs-vinext-eslint/package.json +0 -50
- package/template-nextjs-vinext-eslint/pnpm-workspace.yaml +0 -7
- package/template-nextjs-vinext-eslint/public/file.svg +0 -1
- package/template-nextjs-vinext-eslint/public/globe.svg +0 -1
- package/template-nextjs-vinext-eslint/public/logo-white.svg +0 -128
- package/template-nextjs-vinext-eslint/public/next.svg +0 -1
- package/template-nextjs-vinext-eslint/public/vercel.svg +0 -1
- package/template-nextjs-vinext-eslint/public/window.svg +0 -1
- package/template-nextjs-vinext-eslint/src/app/_components/Header/header.module.css +0 -0
- package/template-nextjs-vinext-eslint/src/app/_components/Header/header.tsx +0 -7
- package/template-nextjs-vinext-eslint/src/app/_components/Main/index.tsx +0 -13
- package/template-nextjs-vinext-eslint/src/app/antd-provider.tsx +0 -30
- package/template-nextjs-vinext-eslint/src/app/icon.svg +0 -26
- package/template-nextjs-vinext-eslint/src/app/layout.tsx +0 -68
- package/template-nextjs-vinext-eslint/src/app/page.module.css +0 -141
- package/template-nextjs-vinext-eslint/src/app/page.tsx +0 -43
- package/template-nextjs-vinext-eslint/src/app/uno-css.tsx +0 -7
- package/template-nextjs-vinext-eslint/src/assets/icon/logo-white.svg +0 -128
- package/template-nextjs-vinext-eslint/src/assets/icon/logo.svg +0 -26
- package/template-nextjs-vinext-eslint/src/assets/image/QR.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_1.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_2.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_3.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_4.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/banner_top.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/icon_title_left.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/icon_title_right.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/img.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_COCT.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/207/347/247/221.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/205/264.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/206/266/345/273/272/345/267/245.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/344/270/255/351/223/201.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/344/272/224/345/206/266.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/344/272/244/351/200/232/345/273/272/350/256/276.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/345/273/272/344/270/232.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/345/273/272/347/255/221/347/247/221/345/255/246/351/231/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/347/224/265/345/273/272.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/344/270/255/345/233/275/351/223/201/345/273/272.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/345/256/234/351/200/232/344/270/226/347/272/252.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/346/225/260/347/273/264/347/251/272/351/227/264.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/346/226/260/346/230/212/350/276/260/345/273/272/350/256/276.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/346/236/227/345/220/214/346/243/252/345/233/275/351/231/205.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/346/270/235/351/232/206/351/233/206/345/233/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/347/273/264/345/241/224/347/247/221/346/212/200.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/350/205/276/350/256/257.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/350/265/233/350/277/252/344/277/241/346/201/257.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/344/272/244/351/200/232/345/244/247/345/255/246.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/344/272/244/351/200/232/350/201/214/344/270/232/345/255/246/351/231/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/345/244/247/345/255/246.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/345/267/245/345/225/206/350/201/214/344/270/232/345/255/246/351/231/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/345/267/245/347/250/213/350/201/214/344/270/232/346/212/200/346/234/257/345/255/246/351/231/242.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/207/215/345/272/206/345/273/272/345/267/245.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/230/277/351/207/214/344/272/221.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/231/206/345/206/233/345/206/233/345/214/273/345/244/247/345/255/246.png +0 -0
- package/template-nextjs-vinext-eslint/src/assets/image/parteners/logo_/351/276/231/346/271/226.png +0 -0
- package/template-nextjs-vinext-eslint/src/styles/globals.css +0 -47
- package/template-nextjs-vinext-eslint/src/types/vite-env.d.ts +0 -18
- package/template-nextjs-vinext-eslint/src/utils/env.ts +0 -14
- package/template-nextjs-vinext-eslint/src/utils/index.ts +0 -0
- package/template-nextjs-vinext-eslint/src/utils/request/core/index.ts +0 -182
- package/template-nextjs-vinext-eslint/src/utils/request/core/utils.ts +0 -30
- package/template-nextjs-vinext-eslint/src/utils/request/index.ts +0 -48
- package/template-nextjs-vinext-eslint/tsconfig.json +0 -34
- package/template-nextjs-vinext-eslint/uno.config.ts +0 -8
- package/template-nextjs-vinext-eslint/vite.config.ts +0 -8
- package/template-react-rsbuild-biome/.env +0 -5
- package/template-react-rsbuild-biome/.env.development +0 -1
- package/template-react-rsbuild-biome/.env.production +0 -1
- package/template-react-rsbuild-biome/.prettierignore +0 -34
- package/template-react-rsbuild-biome/.prettierrc +0 -16
- package/template-react-rsbuild-biome/.vscode/settings.json +0 -10
- package/template-react-rsbuild-biome/README.md +0 -29
- package/template-react-rsbuild-biome/biome.json +0 -116
- package/template-react-rsbuild-biome/commitlint.config.js +0 -1
- package/template-react-rsbuild-biome/index.html +0 -7
- package/template-react-rsbuild-biome/lefthook.yml +0 -14
- package/template-react-rsbuild-biome/package.json +0 -42
- package/template-react-rsbuild-biome/public/.gitkeep +0 -0
- package/template-react-rsbuild-biome/rsbuild.config.ts +0 -44
- package/template-react-rsbuild-biome/src/App.tsx +0 -9
- package/template-react-rsbuild-biome/src/assets/font/AlimamaShuHeiTi-Bold.ttf +0 -0
- package/template-react-rsbuild-biome/src/assets/icon/logo.svg +0 -7
- package/template-react-rsbuild-biome/src/components/Loading/PageLoading.tsx +0 -11
- package/template-react-rsbuild-biome/src/env.d.ts +0 -1
- package/template-react-rsbuild-biome/src/index.tsx +0 -18
- package/template-react-rsbuild-biome/src/layout/default/index.tsx +0 -10
- package/template-react-rsbuild-biome/src/pages/home/index.tsx +0 -5
- package/template-react-rsbuild-biome/src/router/index.tsx +0 -38
- package/template-react-rsbuild-biome/src/store/index.ts +0 -0
- package/template-react-rsbuild-biome/src/store/modules/user.ts +0 -11
- package/template-react-rsbuild-biome/src/styles/fonts.scss +0 -4
- package/template-react-rsbuild-biome/src/styles/index.scss +0 -19
- package/template-react-rsbuild-biome/src/styles/variables.scss +0 -4
- package/template-react-rsbuild-biome/src/types/auto-import.d.ts +0 -49
- package/template-react-rsbuild-biome/src/utils/env.ts +0 -10
- package/template-react-rsbuild-biome/src/utils/request/core/index.ts +0 -166
- package/template-react-rsbuild-biome/src/utils/request/core/utils.ts +0 -38
- package/template-react-rsbuild-biome/src/utils/request/index.ts +0 -43
- package/template-react-rsbuild-biome/tsconfig.json +0 -35
- package/template-react-rsbuild-biome/uno.config.ts +0 -8
- package/template-taro-vue-eslint/.editorconfig +0 -12
- package/template-taro-vue-eslint/.env +0 -3
- package/template-taro-vue-eslint/.env.development +0 -5
- package/template-taro-vue-eslint/.env.production +0 -5
- package/template-taro-vue-eslint/.vscode/settings.json +0 -57
- package/template-taro-vue-eslint/babel.config.js +0 -12
- package/template-taro-vue-eslint/commitlint.config.mjs +0 -1
- package/template-taro-vue-eslint/config/dev.ts +0 -27
- package/template-taro-vue-eslint/config/index.ts +0 -129
- package/template-taro-vue-eslint/config/output-root.ts +0 -11
- package/template-taro-vue-eslint/config/prod.ts +0 -39
- package/template-taro-vue-eslint/config/release.ts +0 -113
- package/template-taro-vue-eslint/eslint.config.mjs +0 -22
- package/template-taro-vue-eslint/lefthook.yaml +0 -13
- package/template-taro-vue-eslint/package.json +0 -115
- package/template-taro-vue-eslint/patches/@tarojs__plugin-mini-ci.patch +0 -13
- package/template-taro-vue-eslint/pnpm-workspace.yaml +0 -2
- package/template-taro-vue-eslint/project.config.json +0 -16
- package/template-taro-vue-eslint/src/api/common/upload.ts +0 -53
- package/template-taro-vue-eslint/src/app.config.ts +0 -19
- package/template-taro-vue-eslint/src/app.ts +0 -14
- package/template-taro-vue-eslint/src/assets/image/.gitkeep +0 -0
- package/template-taro-vue-eslint/src/index.html +0 -17
- package/template-taro-vue-eslint/src/pages/example/upload/index.config.ts +0 -3
- package/template-taro-vue-eslint/src/pages/example/upload/index.module.scss +0 -4
- package/template-taro-vue-eslint/src/pages/example/upload/index.vue +0 -71
- package/template-taro-vue-eslint/src/pages/index/index.config.ts +0 -3
- package/template-taro-vue-eslint/src/pages/index/index.module.scss +0 -4
- package/template-taro-vue-eslint/src/pages/index/index.vue +0 -71
- package/template-taro-vue-eslint/src/store/index.ts +0 -10
- package/template-taro-vue-eslint/src/store/modules/user.ts +0 -15
- package/template-taro-vue-eslint/src/store/taroStorage.ts +0 -7
- package/template-taro-vue-eslint/src/styles/index.css +0 -1
- package/template-taro-vue-eslint/src/styles/nut-theme.css +0 -4
- package/template-taro-vue-eslint/src/utils/env.ts +0 -13
- package/template-taro-vue-eslint/src/utils/index.ts +0 -40
- package/template-taro-vue-eslint/src/utils/request/core/index.ts +0 -193
- package/template-taro-vue-eslint/src/utils/request/core/utils.ts +0 -30
- package/template-taro-vue-eslint/src/utils/request/index.ts +0 -73
- package/template-taro-vue-eslint/tsconfig.json +0 -30
- package/template-taro-vue-eslint/types/components.d.ts +0 -12
- package/template-taro-vue-eslint/types/global.d.ts +0 -31
- package/template-taro-vue-eslint/types/vue.d.ts +0 -10
- package/template-taro-vue-eslint/unocss.config.ts +0 -38
- package/template-vp-monorepo-react-nestjs/.oxfmtrc.jsonc +0 -8
- package/template-vp-monorepo-react-nestjs/.oxlintrc.jsonc +0 -3
- package/template-vp-monorepo-react-nestjs/.specs//351/234/200/346/261/202.md +0 -5
- package/template-vp-monorepo-react-nestjs/.vite-hooks/commit-msg +0 -1
- package/template-vp-monorepo-react-nestjs/.vite-hooks/pre-commit +0 -1
- package/template-vp-monorepo-react-nestjs/README.md +0 -29
- package/template-vp-monorepo-react-nestjs/apps/service/.oxlintrc.jsonc +0 -3
- package/template-vp-monorepo-react-nestjs/apps/web/.env +0 -1
- package/template-vp-monorepo-react-nestjs/apps/web/.oxlintrc.jsonc +0 -4
- package/template-vp-monorepo-react-nestjs/apps/web/index.html +0 -13
- package/template-vp-monorepo-react-nestjs/apps/web/package.json +0 -39
- package/template-vp-monorepo-react-nestjs/apps/web/public/favicon.svg +0 -1
- package/template-vp-monorepo-react-nestjs/apps/web/public/icons.svg +0 -24
- package/template-vp-monorepo-react-nestjs/apps/web/src/App.tsx +0 -24
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/hero.png +0 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/react.svg +0 -1
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/vite.svg +0 -1
- package/template-vp-monorepo-react-nestjs/apps/web/src/components/Loading/PageLoading.tsx +0 -11
- package/template-vp-monorepo-react-nestjs/apps/web/src/main.tsx +0 -5
- package/template-vp-monorepo-react-nestjs/apps/web/src/pages/home/index.tsx +0 -17
- package/template-vp-monorepo-react-nestjs/apps/web/src/router/index.tsx +0 -25
- package/template-vp-monorepo-react-nestjs/apps/web/src/router/modules/.gitkeep +0 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/styles/index.css +0 -7
- package/template-vp-monorepo-react-nestjs/apps/web/src/types/auto-imports.d.ts +0 -58
- package/template-vp-monorepo-react-nestjs/apps/web/tsconfig.json +0 -32
- package/template-vp-monorepo-react-nestjs/apps/web/vite.config.ts +0 -32
- package/template-vp-monorepo-react-nestjs/commitlint.config.js +0 -0
- package/template-vp-monorepo-react-nestjs/package.json +0 -20
- package/template-vp-monorepo-react-nestjs/packages/utils/README.md +0 -23
- package/template-vp-monorepo-react-nestjs/packages/utils/package.json +0 -39
- package/template-vp-monorepo-react-nestjs/packages/utils/src/index.ts +0 -3
- package/template-vp-monorepo-react-nestjs/packages/utils/tests/index.test.ts +0 -6
- package/template-vp-monorepo-react-nestjs/packages/utils/tsconfig.json +0 -20
- package/template-vp-monorepo-react-nestjs/packages/utils/tsdown.config.ts +0 -9
- package/template-vp-monorepo-react-nestjs/packages/utils/vite.config.ts +0 -7
- package/template-vp-monorepo-react-nestjs/pnpm-workspace.yaml +0 -23
- package/template-vp-monorepo-react-nestjs/tsconfig.json +0 -9
- package/template-vp-monorepo-react-nestjs/vite.config.ts +0 -8
- package/template-vp-react/.env +0 -1
- package/template-vp-react/.oxfmtrc.jsonc +0 -8
- package/template-vp-react/.oxlintrc.jsonc +0 -11
- package/template-vp-react/.vite-hooks/commit-msg +0 -1
- package/template-vp-react/.vite-hooks/pre-commit +0 -1
- package/template-vp-react/.vscode/extensions.json +0 -3
- package/template-vp-react/.vscode/settings.json +0 -11
- package/template-vp-react/commitlint.config.js +0 -0
- package/template-vp-react/index.html +0 -13
- package/template-vp-react/package.json +0 -41
- package/template-vp-react/public/favicon.svg +0 -1
- package/template-vp-react/public/icons.svg +0 -24
- package/template-vp-react/src/App.tsx +0 -24
- package/template-vp-react/src/assets/hero.png +0 -0
- package/template-vp-react/src/assets/react.svg +0 -1
- package/template-vp-react/src/assets/vite.svg +0 -1
- package/template-vp-react/src/components/Loading/PageLoading.tsx +0 -11
- package/template-vp-react/src/main.tsx +0 -5
- package/template-vp-react/src/pages/home/index.tsx +0 -17
- package/template-vp-react/src/router/index.tsx +0 -25
- package/template-vp-react/src/router/modules/.gitkeep +0 -0
- package/template-vp-react/src/styles/index.css +0 -7
- package/template-vp-react/src/types/auto-imports.d.ts +0 -58
- package/template-vp-react/tsconfig.json +0 -32
- package/template-vp-react/vite.config.ts +0 -35
- package/template-vp-react-shadcn/.env +0 -1
- package/template-vp-react-shadcn/.oxfmtrc.jsonc +0 -8
- package/template-vp-react-shadcn/.oxlintrc.jsonc +0 -3
- package/template-vp-react-shadcn/.vite-hooks/commit-msg +0 -1
- package/template-vp-react-shadcn/.vite-hooks/pre-commit +0 -1
- package/template-vp-react-shadcn/.vscode/extensions.json +0 -3
- package/template-vp-react-shadcn/.vscode/settings.json +0 -12
- package/template-vp-react-shadcn/agents.md +0 -44
- package/template-vp-react-shadcn/commitlint.config.js +0 -1
- package/template-vp-react-shadcn/components.json +0 -25
- package/template-vp-react-shadcn/index.html +0 -13
- package/template-vp-react-shadcn/package.json +0 -56
- package/template-vp-react-shadcn/public/favicon.svg +0 -1
- package/template-vp-react-shadcn/public/icons.svg +0 -24
- package/template-vp-react-shadcn/src/App.tsx +0 -24
- package/template-vp-react-shadcn/src/api/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/assets/hero.png +0 -0
- package/template-vp-react-shadcn/src/assets/react.svg +0 -1
- package/template-vp-react-shadcn/src/assets/vite.svg +0 -1
- package/template-vp-react-shadcn/src/components/Loading/PageLoading.tsx +0 -11
- package/template-vp-react-shadcn/src/components/Player/VideoJS/index.tsx +0 -163
- package/template-vp-react-shadcn/src/components/Player/index.ts +0 -7
- package/template-vp-react-shadcn/src/components/ui/button.tsx +0 -67
- package/template-vp-react-shadcn/src/components/ui/sonner.tsx +0 -43
- package/template-vp-react-shadcn/src/components/ui/spinner.tsx +0 -17
- package/template-vp-react-shadcn/src/hooks/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/lib/utils.ts +0 -6
- package/template-vp-react-shadcn/src/main.tsx +0 -5
- package/template-vp-react-shadcn/src/pages/home/index.tsx +0 -96
- package/template-vp-react-shadcn/src/router/index.tsx +0 -25
- package/template-vp-react-shadcn/src/router/modules/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/store/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/styles/index.css +0 -16
- package/template-vp-react-shadcn/src/styles/shadcn.css +0 -127
- package/template-vp-react-shadcn/src/types/auto-imports.d.ts +0 -58
- package/template-vp-react-shadcn/src/utils/env/index.tsx +0 -6
- package/template-vp-react-shadcn/src/utils/request/alova-core/index.ts +0 -276
- package/template-vp-react-shadcn/src/utils/request/alova-core/utils.ts +0 -24
- package/template-vp-react-shadcn/src/utils/request/index.ts +0 -48
- package/template-vp-react-shadcn/src/utils/request/readme.md +0 -176
- package/template-vp-react-shadcn/tsconfig.json +0 -32
- package/template-vp-react-shadcn/vite.config.ts +0 -35
- package/template-vue-rolldown-oxc/.env +0 -4
- package/template-vue-rolldown-oxc/.env.development +0 -1
- package/template-vue-rolldown-oxc/.env.production +0 -1
- package/template-vue-rolldown-oxc/.gitlab-ci.yml +0 -84
- package/template-vue-rolldown-oxc/.oxlintrc.json +0 -4
- package/template-vue-rolldown-oxc/.prettierignore +0 -34
- package/template-vue-rolldown-oxc/.prettierrc +0 -18
- package/template-vue-rolldown-oxc/.vscode/settings.json +0 -11
- package/template-vue-rolldown-oxc/README.md +0 -3
- package/template-vue-rolldown-oxc/commitlint.config.js +0 -1
- package/template-vue-rolldown-oxc/index.html +0 -13
- package/template-vue-rolldown-oxc/lefthook.yml +0 -11
- package/template-vue-rolldown-oxc/package.json +0 -55
- package/template-vue-rolldown-oxc/public/vite.svg +0 -1
- package/template-vue-rolldown-oxc/src/App.vue +0 -17
- package/template-vue-rolldown-oxc/src/assets/icon/vue.svg +0 -1
- package/template-vue-rolldown-oxc/src/components/Icon/svg-icon.vue +0 -29
- package/template-vue-rolldown-oxc/src/layout/default/index.vue +0 -3
- package/template-vue-rolldown-oxc/src/main.ts +0 -13
- package/template-vue-rolldown-oxc/src/router/guard/index.tsx +0 -7
- package/template-vue-rolldown-oxc/src/router/guard/permissionGuard.ts +0 -8
- package/template-vue-rolldown-oxc/src/router/index.tsx +0 -15
- package/template-vue-rolldown-oxc/src/router/modules/index.tsx +0 -31
- package/template-vue-rolldown-oxc/src/store/index.ts +0 -10
- package/template-vue-rolldown-oxc/src/store/modules/user.ts +0 -17
- package/template-vue-rolldown-oxc/src/styles/element-plus-variables.css +0 -4
- package/template-vue-rolldown-oxc/src/styles/font.scss +0 -0
- package/template-vue-rolldown-oxc/src/styles/index.scss +0 -31
- package/template-vue-rolldown-oxc/src/styles/variables.scss +0 -3
- package/template-vue-rolldown-oxc/src/utils/env.ts +0 -10
- package/template-vue-rolldown-oxc/src/utils/request/core/index.ts +0 -166
- package/template-vue-rolldown-oxc/src/utils/request/core/utils.ts +0 -38
- package/template-vue-rolldown-oxc/src/utils/request/index.ts +0 -39
- package/template-vue-rolldown-oxc/src/views/home/index.vue +0 -16
- package/template-vue-rolldown-oxc/src/views/model/index.vue +0 -7
- package/template-vue-rolldown-oxc/src/vite-env.d.ts +0 -13
- package/template-vue-rolldown-oxc/tsconfig.json +0 -36
- package/template-vue-rolldown-oxc/uno.config.ts +0 -10
- package/template-vue-rolldown-oxc/vite.config.ts +0 -51
- package/template-vue-vite-eslint/.env +0 -6
- package/template-vue-vite-eslint/.env.development +0 -2
- package/template-vue-vite-eslint/.env.production +0 -1
- package/template-vue-vite-eslint/README.md +0 -3
- package/template-vue-vite-eslint/commitlint.config.js +0 -1
- package/template-vue-vite-eslint/eslint.config.js +0 -69
- package/template-vue-vite-eslint/index.html +0 -13
- package/template-vue-vite-eslint/lefthook.yml +0 -11
- package/template-vue-vite-eslint/package.json +0 -56
- package/template-vue-vite-eslint/public/vite.svg +0 -1
- package/template-vue-vite-eslint/src/App.vue +0 -19
- package/template-vue-vite-eslint/src/api/index.ts +0 -12
- package/template-vue-vite-eslint/src/assets/icon/computer-data.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/cpu.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/data-search.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/home.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/knowledge-graph.svg +0 -3
- package/template-vue-vite-eslint/src/assets/icon/logo.svg +0 -1
- package/template-vue-vite-eslint/src/assets/icon/robot.svg +0 -3
- package/template-vue-vite-eslint/src/assets/image/.gitkeep +0 -0
- package/template-vue-vite-eslint/src/components/Icon/svg-icon.vue +0 -29
- package/template-vue-vite-eslint/src/hooks/chart/lib.ts +0 -57
- package/template-vue-vite-eslint/src/hooks/chart/useEcharts.ts +0 -65
- package/template-vue-vite-eslint/src/layout/default/header/index.vue +0 -12
- package/template-vue-vite-eslint/src/layout/default/index.vue +0 -55
- package/template-vue-vite-eslint/src/main.ts +0 -16
- package/template-vue-vite-eslint/src/router/guard/index.ts +0 -7
- package/template-vue-vite-eslint/src/router/guard/permissionGuard.ts +0 -13
- package/template-vue-vite-eslint/src/router/index.ts +0 -18
- package/template-vue-vite-eslint/src/router/interface.ts +0 -9
- package/template-vue-vite-eslint/src/router/modules/example.ts +0 -21
- package/template-vue-vite-eslint/src/router/modules/index.ts +0 -36
- package/template-vue-vite-eslint/src/store/index.ts +0 -11
- package/template-vue-vite-eslint/src/store/modules/user.ts +0 -20
- package/template-vue-vite-eslint/src/styles/font.scss +0 -0
- package/template-vue-vite-eslint/src/styles/index.scss +0 -29
- package/template-vue-vite-eslint/src/styles/variables.scss +0 -3
- package/template-vue-vite-eslint/src/types/auto-import.d.ts +0 -78
- package/template-vue-vite-eslint/src/types/components.d.ts +0 -18
- package/template-vue-vite-eslint/src/types/vite-env.d.ts +0 -15
- package/template-vue-vite-eslint/src/utils/env.ts +0 -11
- package/template-vue-vite-eslint/src/utils/request/core/index.ts +0 -186
- package/template-vue-vite-eslint/src/utils/request/core/utils.ts +0 -41
- package/template-vue-vite-eslint/src/utils/request/index.ts +0 -42
- package/template-vue-vite-eslint/src/views/example/echart/config.ts +0 -1794
- package/template-vue-vite-eslint/src/views/example/echart/index.vue +0 -22
- package/template-vue-vite-eslint/src/views/example/h-full.vue +0 -24
- package/template-vue-vite-eslint/src/views/example/tree-chart.vue +0 -94
- package/template-vue-vite-eslint/src/views/home/index.vue +0 -25
- package/template-vue-vite-eslint/src/views/login/index.vue +0 -9
- package/template-vue-vite-eslint/tsconfig.json +0 -36
- package/template-vue-vite-eslint/uno.config.ts +0 -21
- package/template-vue-vite-eslint/vite.config.ts +0 -60
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="@rsbuild/core/types" />
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { Suspense } from 'react'
|
|
2
|
-
import ReactDOM from 'react-dom/client'
|
|
3
|
-
|
|
4
|
-
import App from './App'
|
|
5
|
-
import Loading from './components/Loading/PageLoading'
|
|
6
|
-
import '@/styles/index.scss'
|
|
7
|
-
|
|
8
|
-
const rootEl = document.getElementById('root')
|
|
9
|
-
if (rootEl) {
|
|
10
|
-
const root = ReactDOM.createRoot(rootEl)
|
|
11
|
-
root.render(
|
|
12
|
-
<React.StrictMode>
|
|
13
|
-
<Suspense fallback={<Loading />}>
|
|
14
|
-
<App />
|
|
15
|
-
</Suspense>
|
|
16
|
-
</React.StrictMode>,
|
|
17
|
-
)
|
|
18
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { createBrowserRouter, Navigate, type RouteObject } from 'react-router'
|
|
2
|
-
import Layout from '@/layout/default'
|
|
3
|
-
import { envVariables } from '@/utils/env'
|
|
4
|
-
export const lazyLoad = (path: string) => {
|
|
5
|
-
const Module = lazy(() => import(`@/pages/${path}.tsx`))
|
|
6
|
-
return <Module />
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const menuRoutes: RouteObject[] = [
|
|
10
|
-
{
|
|
11
|
-
path: 'home',
|
|
12
|
-
id: 'home',
|
|
13
|
-
handle: { title: '首页' },
|
|
14
|
-
element: lazyLoad('home/index'),
|
|
15
|
-
},
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
const routes: RouteObject[] = [
|
|
19
|
-
{
|
|
20
|
-
path: '/',
|
|
21
|
-
id: 'layout',
|
|
22
|
-
element: <Layout />,
|
|
23
|
-
children: [
|
|
24
|
-
{
|
|
25
|
-
path: '',
|
|
26
|
-
id: 'index',
|
|
27
|
-
element: <Navigate to={'/home'} />,
|
|
28
|
-
},
|
|
29
|
-
...menuRoutes,
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
export const router = createBrowserRouter(routes, {
|
|
35
|
-
basename: envVariables.PUBLIC_PATH,
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
export default router
|
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { create } from 'zustand'
|
|
2
|
-
|
|
3
|
-
interface searchFormState {
|
|
4
|
-
token?: string
|
|
5
|
-
setToken: (token?: string) => void
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const useUserStore = create<searchFormState>((set) => ({
|
|
9
|
-
token: undefined,
|
|
10
|
-
setToken: (token) => set(() => ({ token })),
|
|
11
|
-
}))
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
@unocss preflights;
|
|
2
|
-
@unocss default;
|
|
3
|
-
@import "./variables.scss";
|
|
4
|
-
@import "./fonts.scss";
|
|
5
|
-
|
|
6
|
-
html,
|
|
7
|
-
body,
|
|
8
|
-
#root {
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 100%;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
*,
|
|
14
|
-
*::before,
|
|
15
|
-
*::after {
|
|
16
|
-
margin: 0;
|
|
17
|
-
padding: 0;
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
// noinspection JSUnusedGlobalSymbols
|
|
5
|
-
// Generated by unplugin-auto-import
|
|
6
|
-
// biome-ignore lint: disable
|
|
7
|
-
export {}
|
|
8
|
-
declare global {
|
|
9
|
-
const Activity: typeof import('react').Activity
|
|
10
|
-
const Fragment: typeof import('react').Fragment
|
|
11
|
-
const Suspense: typeof import('react').Suspense
|
|
12
|
-
const cache: typeof import('react').cache
|
|
13
|
-
const cacheSignal: typeof import('react').cacheSignal
|
|
14
|
-
const createContext: typeof import('react').createContext
|
|
15
|
-
const createRef: typeof import('react').createRef
|
|
16
|
-
const forwardRef: typeof import('react').forwardRef
|
|
17
|
-
const lazy: typeof import('react').lazy
|
|
18
|
-
const memo: typeof import('react').memo
|
|
19
|
-
const startTransition: typeof import('react').startTransition
|
|
20
|
-
const use: typeof import('react').use
|
|
21
|
-
const useActionState: typeof import('react').useActionState
|
|
22
|
-
const useCallback: typeof import('react').useCallback
|
|
23
|
-
const useContext: typeof import('react').useContext
|
|
24
|
-
const useDebugValue: typeof import('react').useDebugValue
|
|
25
|
-
const useDeferredValue: typeof import('react').useDeferredValue
|
|
26
|
-
const useEffect: typeof import('react').useEffect
|
|
27
|
-
const useEffectEvent: typeof import('react').useEffectEvent
|
|
28
|
-
const useHref: typeof import('react-router').useHref
|
|
29
|
-
const useId: typeof import('react').useId
|
|
30
|
-
const useImperativeHandle: typeof import('react').useImperativeHandle
|
|
31
|
-
const useInRouterContext: typeof import('react-router').useInRouterContext
|
|
32
|
-
const useInsertionEffect: typeof import('react').useInsertionEffect
|
|
33
|
-
const useLayoutEffect: typeof import('react').useLayoutEffect
|
|
34
|
-
const useLocation: typeof import('react-router').useLocation
|
|
35
|
-
const useMemo: typeof import('react').useMemo
|
|
36
|
-
const useNavigate: typeof import('react-router').useNavigate
|
|
37
|
-
const useNavigationType: typeof import('react-router').useNavigationType
|
|
38
|
-
const useOptimistic: typeof import('react').useOptimistic
|
|
39
|
-
const useOutlet: typeof import('react-router').useOutlet
|
|
40
|
-
const useOutletContext: typeof import('react-router').useOutletContext
|
|
41
|
-
const useParams: typeof import('react-router').useParams
|
|
42
|
-
const useReducer: typeof import('react').useReducer
|
|
43
|
-
const useRef: typeof import('react').useRef
|
|
44
|
-
const useResolvedPath: typeof import('react-router').useResolvedPath
|
|
45
|
-
const useRoutes: typeof import('react-router').useRoutes
|
|
46
|
-
const useState: typeof import('react').useState
|
|
47
|
-
const useSyncExternalStore: typeof import('react').useSyncExternalStore
|
|
48
|
-
const useTransition: typeof import('react').useTransition
|
|
49
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 通过一个文件导出所有的环境变量这样方便统一修改
|
|
3
|
-
* @returns
|
|
4
|
-
*/
|
|
5
|
-
export const envVariables = {
|
|
6
|
-
PUBLIC_PORT: import.meta.env.PUBLIC_PORT,
|
|
7
|
-
PUBLIC_PATH: import.meta.env.PUBLIC_PATH,
|
|
8
|
-
PUBLIC_APP_NAME: import.meta.env.PUBLIC_APP_NAME,
|
|
9
|
-
PUBLIC_API_AFFIX: import.meta.env.PUBLIC_API_AFFIX,
|
|
10
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { type AlovaGenerics, type AlovaOptions, createAlova } from 'alova'
|
|
2
|
-
import adapterFetch from 'alova/fetch'
|
|
3
|
-
import { deepMergeObject, isReadableStream } from './utils'
|
|
4
|
-
|
|
5
|
-
interface statusMap {
|
|
6
|
-
success?: number
|
|
7
|
-
unAuthorized?: number
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface codeMap {
|
|
11
|
-
success?: number[]
|
|
12
|
-
unAuthorized?: number[]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface baseRequestOption<AG extends AlovaGenerics> {
|
|
16
|
-
baseUrl?: string
|
|
17
|
-
timeout?: number
|
|
18
|
-
commonHeaders?: Record<string, string | (() => string)>
|
|
19
|
-
statusMap?: statusMap
|
|
20
|
-
codeMap?: codeMap
|
|
21
|
-
responseDataKey?: string
|
|
22
|
-
responseMessageKey?: string
|
|
23
|
-
isTransformResponse?: boolean
|
|
24
|
-
isShowSuccessMessage?: boolean
|
|
25
|
-
successDefaultMessage?: string
|
|
26
|
-
isShowErrorMessage?: boolean
|
|
27
|
-
errorDefaultMessage?: string
|
|
28
|
-
statesHook?: AlovaOptions<AG>['statesHook']
|
|
29
|
-
successMessageFunc?: (message: string) => void
|
|
30
|
-
errorMessageFunc?: (message: string) => void
|
|
31
|
-
unAuthorizedResponseFunc?: () => void
|
|
32
|
-
requestAdapter?: AlovaOptions<AG>['requestAdapter']
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface CustomConfig {
|
|
36
|
-
isTransformResponse?: boolean
|
|
37
|
-
isShowSuccessMessage?: boolean
|
|
38
|
-
isShowErrorMessage?: boolean
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
type requestOption = baseRequestOption<AlovaGenerics> & CustomConfig
|
|
42
|
-
|
|
43
|
-
export const createInstance = (option: requestOption) => {
|
|
44
|
-
const defaultOption: requestOption = {
|
|
45
|
-
baseUrl: '/',
|
|
46
|
-
timeout: 0,
|
|
47
|
-
statusMap: {
|
|
48
|
-
success: 200,
|
|
49
|
-
unAuthorized: 401,
|
|
50
|
-
},
|
|
51
|
-
codeMap: {
|
|
52
|
-
success: [200],
|
|
53
|
-
unAuthorized: [401],
|
|
54
|
-
},
|
|
55
|
-
responseDataKey: 'data',
|
|
56
|
-
responseMessageKey: 'message',
|
|
57
|
-
isTransformResponse: true,
|
|
58
|
-
isShowSuccessMessage: false,
|
|
59
|
-
successDefaultMessage: '操作成功',
|
|
60
|
-
isShowErrorMessage: true,
|
|
61
|
-
errorDefaultMessage: '服务异常',
|
|
62
|
-
requestAdapter: adapterFetch(),
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const mergeOption: baseRequestOption<AlovaGenerics> & CustomConfig = deepMergeObject(
|
|
66
|
-
defaultOption,
|
|
67
|
-
option,
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
const instance = createAlova({
|
|
71
|
-
baseURL: mergeOption.baseUrl,
|
|
72
|
-
timeout: mergeOption.timeout,
|
|
73
|
-
statesHook: mergeOption?.statesHook,
|
|
74
|
-
requestAdapter: mergeOption.requestAdapter as AlovaOptions<AlovaGenerics>['requestAdapter'],
|
|
75
|
-
beforeRequest: async (method) => {
|
|
76
|
-
for (const [key, value] of Object.entries(option?.commonHeaders ?? {})) {
|
|
77
|
-
method.config.headers[key] = typeof value === 'function' ? value() : value
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
responded: {
|
|
81
|
-
onSuccess: async (response) => {
|
|
82
|
-
if (!mergeOption?.isTransformResponse) return response
|
|
83
|
-
const { status } = response
|
|
84
|
-
|
|
85
|
-
// 判断响应类型:如果使用 adapterFetch,response.data 是可读流,则调用 json();否则直接使用 response.data
|
|
86
|
-
const data =
|
|
87
|
-
response?.body && isReadableStream(response.body)
|
|
88
|
-
? await response.json() // adapterFetch 的响应,使用 json() 解析可读流
|
|
89
|
-
: response.data // 其他适配器的响应
|
|
90
|
-
// 不成功的情况
|
|
91
|
-
if (status !== mergeOption.statusMap?.success) {
|
|
92
|
-
// 如果后端使用status 字段来表示未授权,则返回401
|
|
93
|
-
if (mergeOption?.statusMap?.unAuthorized === status) {
|
|
94
|
-
mergeOption?.unAuthorizedResponseFunc?.()
|
|
95
|
-
}
|
|
96
|
-
return Promise.reject(response)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const {
|
|
100
|
-
responseDataKey,
|
|
101
|
-
codeMap,
|
|
102
|
-
isShowSuccessMessage,
|
|
103
|
-
responseMessageKey,
|
|
104
|
-
isShowErrorMessage,
|
|
105
|
-
} = mergeOption
|
|
106
|
-
const {
|
|
107
|
-
code,
|
|
108
|
-
[responseDataKey as string]: responseData,
|
|
109
|
-
[responseMessageKey as string]: responseMessage,
|
|
110
|
-
} = data
|
|
111
|
-
if (!codeMap?.success?.includes(+code)) {
|
|
112
|
-
// code unAuthorized 处理
|
|
113
|
-
if (codeMap?.unAuthorized?.includes(+code)) {
|
|
114
|
-
mergeOption?.unAuthorizedResponseFunc?.()
|
|
115
|
-
return Promise.reject(response)
|
|
116
|
-
}
|
|
117
|
-
// 其他错误直接打印msg
|
|
118
|
-
|
|
119
|
-
const errorMessage = data[responseMessageKey as string] ?? mergeOption.errorDefaultMessage
|
|
120
|
-
if (isShowErrorMessage) mergeOption?.errorMessageFunc?.(errorMessage)
|
|
121
|
-
return Promise.reject(response)
|
|
122
|
-
}
|
|
123
|
-
if (isShowSuccessMessage)
|
|
124
|
-
mergeOption?.successMessageFunc?.(responseMessage ?? mergeOption.successDefaultMessage)
|
|
125
|
-
return responseData
|
|
126
|
-
},
|
|
127
|
-
onError: (error) => {
|
|
128
|
-
if (mergeOption?.isShowErrorMessage)
|
|
129
|
-
mergeOption.errorMessageFunc?.(
|
|
130
|
-
error.response?.data?.message ?? mergeOption?.errorDefaultMessage,
|
|
131
|
-
)
|
|
132
|
-
},
|
|
133
|
-
// onComplete: (_method) => {},
|
|
134
|
-
},
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
return instance
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// 🚀 创建双重调用实例的工厂函数
|
|
141
|
-
export const createDualCallInstance = (baseConfig: baseRequestOption<AlovaGenerics>) => {
|
|
142
|
-
// 创建默认实例
|
|
143
|
-
const defaultInstance = createInstance(baseConfig)
|
|
144
|
-
|
|
145
|
-
// 双重调用函数
|
|
146
|
-
const dualInstance = (option?: CustomConfig) => {
|
|
147
|
-
if (option) {
|
|
148
|
-
// 合并配置并创建新实例
|
|
149
|
-
const mergedConfig = { ...baseConfig, ...option }
|
|
150
|
-
return createInstance(mergedConfig)
|
|
151
|
-
}
|
|
152
|
-
return defaultInstance
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// 🎯 直接绑定 HTTP 方法,无需复杂类型注释
|
|
156
|
-
dualInstance.Get = defaultInstance.Get.bind(defaultInstance)
|
|
157
|
-
dualInstance.Post = defaultInstance.Post.bind(defaultInstance)
|
|
158
|
-
dualInstance.Put = defaultInstance.Put.bind(defaultInstance)
|
|
159
|
-
dualInstance.Delete = defaultInstance.Delete.bind(defaultInstance)
|
|
160
|
-
dualInstance.Patch = defaultInstance.Patch.bind(defaultInstance)
|
|
161
|
-
dualInstance.Head = defaultInstance.Head.bind(defaultInstance)
|
|
162
|
-
dualInstance.Options = defaultInstance.Options.bind(defaultInstance)
|
|
163
|
-
dualInstance.Request = defaultInstance.Request.bind(defaultInstance)
|
|
164
|
-
|
|
165
|
-
return dualInstance
|
|
166
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export const deepMergeObject = <T = any>(source: T, target: Partial<T>): T => {
|
|
2
|
-
const isObject = (obj: any): obj is Record<string, any> =>
|
|
3
|
-
obj && typeof obj === 'object' && !Array.isArray(obj)
|
|
4
|
-
|
|
5
|
-
const merge = (src: any, tgt: any): any => {
|
|
6
|
-
if (isObject(src) && isObject(tgt)) {
|
|
7
|
-
Object.keys(tgt).forEach((key) => {
|
|
8
|
-
if (isObject(tgt[key])) {
|
|
9
|
-
src[key] = merge(src[key] || {}, tgt[key])
|
|
10
|
-
} else {
|
|
11
|
-
src[key] = tgt[key]
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
}
|
|
15
|
-
return src
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return merge({ ...source }, target)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 判断一个变量是不是可读流
|
|
23
|
-
* @param data
|
|
24
|
-
*/
|
|
25
|
-
export const isReadableStream = (data: unknown): boolean => {
|
|
26
|
-
if (!(data instanceof ReadableStream)) {
|
|
27
|
-
return false
|
|
28
|
-
}
|
|
29
|
-
if (typeof data.locked !== 'boolean') return false
|
|
30
|
-
|
|
31
|
-
const instanceFunc = ['cancel', 'getReader', 'pipeThrough', 'pipeTo', 'tee'] as const
|
|
32
|
-
|
|
33
|
-
for (const func of instanceFunc) {
|
|
34
|
-
if (typeof data[func] !== 'function') return false
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return true
|
|
38
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { envVariables } from '../env'
|
|
2
|
-
import { createDualCallInstance } from './core'
|
|
3
|
-
import { router } from '@/router'
|
|
4
|
-
import { message } from 'antd'
|
|
5
|
-
import 'element-plus/es/components/message/style/css'
|
|
6
|
-
import vueHook from 'alova/vue'
|
|
7
|
-
import { axiosRequestAdapter } from '@alova/adapter-axios'
|
|
8
|
-
|
|
9
|
-
// 🎯 获取基础配置
|
|
10
|
-
const getBaseConfig = (): Parameters<typeof createDualCallInstance>[0] => {
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
baseUrl: `/${envVariables.PUBLIC_API_AFFIX}`,
|
|
14
|
-
statusMap: {
|
|
15
|
-
success: 200,
|
|
16
|
-
unAuthorized: 401,
|
|
17
|
-
},
|
|
18
|
-
codeMap: {
|
|
19
|
-
success: [200],
|
|
20
|
-
},
|
|
21
|
-
responseDataKey: 'data',
|
|
22
|
-
responseMessageKey: 'msg',
|
|
23
|
-
commonHeaders: {
|
|
24
|
-
},
|
|
25
|
-
successMessageFunc: (msg: string) => {
|
|
26
|
-
message.success(msg)
|
|
27
|
-
},
|
|
28
|
-
errorMessageFunc: (msg: string) => {
|
|
29
|
-
message.error(msg)
|
|
30
|
-
},
|
|
31
|
-
unAuthorizedResponseFunc: () => {
|
|
32
|
-
router.navigate('/login')
|
|
33
|
-
message.error('登录过期或未登录')
|
|
34
|
-
},
|
|
35
|
-
statesHook: vueHook,
|
|
36
|
-
requestAdapter: axiosRequestAdapter(),
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// 🚀 使用 alova-core 的双重调用功能,超级简洁!
|
|
41
|
-
const alovaRequest = createDualCallInstance(getBaseConfig())
|
|
42
|
-
|
|
43
|
-
export default alovaRequest
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"lib": ["DOM", "ES2020"],
|
|
4
|
-
"jsx": "react-jsx",
|
|
5
|
-
"target": "ES2020",
|
|
6
|
-
"noEmit": true,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"useDefineForClassFields": true,
|
|
9
|
-
|
|
10
|
-
/* modules */
|
|
11
|
-
"module": "ESNext",
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"resolveJsonModule": true,
|
|
14
|
-
"moduleResolution": "Bundler",
|
|
15
|
-
"allowImportingTsExtensions": true,
|
|
16
|
-
|
|
17
|
-
/* type checking */
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
|
|
22
|
-
"baseUrl": ".",
|
|
23
|
-
"paths": {
|
|
24
|
-
"@/*": ["src/*"]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"include": [
|
|
28
|
-
"src/**/*.ts",
|
|
29
|
-
"src/**/*.d.ts",
|
|
30
|
-
"src/**/*.tsx",
|
|
31
|
-
"src/types/**/*.d.ts",
|
|
32
|
-
"src/types/**/*.ts"
|
|
33
|
-
],
|
|
34
|
-
"exclude": ["node_modules", "dist", "**/*.js"]
|
|
35
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Disable the default formatter, use eslint instead
|
|
3
|
-
"oxc.enable": false,
|
|
4
|
-
"biome.enabled": false,
|
|
5
|
-
"prettier.enable": false,
|
|
6
|
-
"editor.formatOnSave": false,
|
|
7
|
-
|
|
8
|
-
// Auto fix
|
|
9
|
-
"editor.codeActionsOnSave": {
|
|
10
|
-
"source.fixAll.eslint": "explicit",
|
|
11
|
-
"source.organizeImports": "never"
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
// Silent the stylistic rules in your IDE, but still auto fix them
|
|
15
|
-
"eslint.rules.customizations": [
|
|
16
|
-
{ "rule": "style/*", "severity": "off", "fixable": true },
|
|
17
|
-
{ "rule": "format/*", "severity": "off", "fixable": true },
|
|
18
|
-
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
|
19
|
-
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
|
20
|
-
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
|
21
|
-
{ "rule": "*-order", "severity": "off", "fixable": true },
|
|
22
|
-
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
|
23
|
-
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
|
24
|
-
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
|
25
|
-
{ "rule": "*semi", "severity": "off", "fixable": true }
|
|
26
|
-
],
|
|
27
|
-
|
|
28
|
-
// Enable eslint for all supported languages
|
|
29
|
-
"eslint.validate": [
|
|
30
|
-
"javascript",
|
|
31
|
-
"javascriptreact",
|
|
32
|
-
"typescript",
|
|
33
|
-
"typescriptreact",
|
|
34
|
-
"vue",
|
|
35
|
-
"html",
|
|
36
|
-
"markdown",
|
|
37
|
-
"json",
|
|
38
|
-
"json5",
|
|
39
|
-
"jsonc",
|
|
40
|
-
"yaml",
|
|
41
|
-
"toml",
|
|
42
|
-
"xml",
|
|
43
|
-
"gql",
|
|
44
|
-
"graphql",
|
|
45
|
-
"astro",
|
|
46
|
-
"svelte",
|
|
47
|
-
"css",
|
|
48
|
-
"less",
|
|
49
|
-
"scss",
|
|
50
|
-
"pcss",
|
|
51
|
-
"postcss"
|
|
52
|
-
],
|
|
53
|
-
"cSpell.words": [
|
|
54
|
-
"Alova",
|
|
55
|
-
"tarojs"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// babel-preset-taro 更多选项和默认值:
|
|
2
|
-
// https://docs.taro.zone/docs/next/babel-config
|
|
3
|
-
module.exports = {
|
|
4
|
-
presets: [
|
|
5
|
-
['taro', {
|
|
6
|
-
framework: 'vue3',
|
|
7
|
-
ts: true,
|
|
8
|
-
compiler: 'webpack5',
|
|
9
|
-
useBuiltIns: process.env.TARO_ENV === 'h5' ? 'usage' : false
|
|
10
|
-
}]
|
|
11
|
-
]
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default { extends: ["@commitlint/config-conventional"] };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { UserConfigExport } from '@tarojs/cli'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
logger: {
|
|
5
|
-
quiet: false,
|
|
6
|
-
stats: true,
|
|
7
|
-
},
|
|
8
|
-
mini: {},
|
|
9
|
-
h5: {
|
|
10
|
-
devServer: {
|
|
11
|
-
open: false,
|
|
12
|
-
port: 9970,
|
|
13
|
-
proxy: {
|
|
14
|
-
[`/${process.env.TARO_APP_API_AFFIX}`]: {
|
|
15
|
-
target: process.env.TARO_APP_API_URL,
|
|
16
|
-
changeOrigin: true,
|
|
17
|
-
secure: false,
|
|
18
|
-
},
|
|
19
|
-
[`/${process.env.TARO_APP_UPLOAD_API_AFFIX}`]: {
|
|
20
|
-
target: process.env.TARO_APP_API_URL,
|
|
21
|
-
changeOrigin: true,
|
|
22
|
-
secure: false,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
} satisfies UserConfigExport<'webpack5'>
|