Skip to content

Commit 8456c67

Browse files
committed
2 parents bf629a9 + e92361e commit 8456c67

File tree

302 files changed

+9795
-8108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

302 files changed

+9795
-8108
lines changed

.env

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@ VITE_APP_TENANT_ENABLE=true
1313
# 验证码的开关
1414
VITE_APP_CAPTCHA_ENABLE=true
1515

16-
# 验证码的开关
17-
VITE_APP_CAPTCHA_ENABLE=true
18-
1916
# 百度统计
2017
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc

.env.front

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,18 @@ VITE_API_URL=/admin-api
1717

1818
# 打包路径
1919
VITE_BASE_PATH=/
20+
21+
# 项目本地运行端口号, 与.vscode/launch.json配合
22+
VITE_PORT=80
23+
24+
# 是否删除debugger
25+
VITE_DROP_DEBUGGER=false
26+
27+
# 是否删除console.log
28+
VITE_DROP_CONSOLE=false
29+
30+
# 是否sourcemap
31+
VITE_SOURCEMAP=true
32+
33+
# 验证码的开关
34+
VITE_APP_CAPTCHA_ENABLE=false

.env.stage

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 生产环境
2+
NODE_ENV=production
3+
4+
VITE_DEV=false
5+
6+
# 请求路径
7+
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
8+
9+
# 上传路径
10+
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
11+
12+
# 接口前缀
13+
VITE_API_BASEPATH=
14+
15+
# 接口地址
16+
VITE_API_URL=/admin-api
17+
18+
# 是否删除debugger
19+
VITE_DROP_DEBUGGER=true
20+
21+
# 是否删除console.log
22+
VITE_DROP_CONSOLE=true
23+
24+
# 是否sourcemap
25+
VITE_SOURCEMAP=false
26+
27+
# 打包路径
28+
VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/'
29+
30+
# 输出路径
31+
VITE_OUT_DIR=dist-stage

.env.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=false
2525
VITE_SOURCEMAP=true
2626

2727
# 打包路径
28-
VITE_BASE_PATH=/dist-test/
28+
VITE_BASE_PATH=/
2929

3030
# 输出路径
3131
VITE_OUT_DIR=dist-test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ dist-ssr
66
/dist*
77
*-lock.*
88
pnpm-debug
9-
9+
auto-*.d.ts
1010
.idea
1111
.history

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "msedge",
9+
"request": "launch",
10+
"name": "Launch Edge against localhost",
11+
"url": "http://localhost",
12+
"webRoot": "${workspaceFolder}/src",
13+
"sourceMaps": true
14+
}
15+
]
16+
}

.vscode/settings.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,15 @@
4040
"i18n-ally.displayLanguage": "zh-CN",
4141
"i18n-ally.enabledFrameworks": ["vue", "react"],
4242
"god.tsconfig": "./tsconfig.json",
43-
"vue-i18n.i18nPaths": "src/locales"
43+
"vue-i18n.i18nPaths": "src/locales",
44+
"explorer.fileNesting.enabled": true,
45+
"explorer.fileNesting.expand": false,
46+
"explorer.fileNesting.patterns": {
47+
"*.ts": "$(capture).test.ts, $(capture).test.tsx",
48+
"*.tsx": "$(capture).test.ts, $(capture).test.tsx",
49+
"*.env": "$(capture).env.*",
50+
"CHANGELOG.md": "CHANGELOG*",
51+
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc,vite.config.*,windi.*,tailwind.*,tsconfig.*,postcss*",
52+
".eslintrc.js": ".eslintignore,.eslintrc-*,.prettierignore,.stylelintignore,.commitlintrc.js,.prettierrc.js,.stylelint*,stylelint*,prettier.*,.editorconfig"
53+
}
4454
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
## 🐶 新手必读
1111

1212
* nodejs > 16.0.0 && pnpm > 7.30.0
13-
* 演示地址:<http://dashboard.yudao.iocoder.cn>
13+
* 演示地址【Vue3 + element-plus】:<http://dashboard-vue3.yudao.iocoder.cn>
14+
* 演示地址【Vue2 + element-ui】:<http://dashboard.yudao.iocoder.cn>
1415
* 启动文档:<https://doc.iocoder.cn/quick-start/>
1516
* 视频教程:<https://doc.iocoder.cn/video/>
1617

@@ -42,7 +43,6 @@
4243
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 4.9.5 |
4344
| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.33 |
4445
| [vueuse](https://vueuse.org/) | 常用工具集 | 9.13.0 |
45-
| [vxe-table](https://vxetable.cn/) | Vue 最强表单 | 4.3.10 |
4646
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 |
4747
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.1.6 |
4848
| [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 |

build/vite/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@ import Components from 'unplugin-vue-components/vite'
1313
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
1414
import viteCompression from 'vite-plugin-compression'
1515
import topLevelAwait from 'vite-plugin-top-level-await'
16-
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
16+
import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'
1717
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
1818
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
1919

2020
export function createVitePlugins() {
2121
const root = process.cwd()
22+
2223
// 路径查找
2324
function pathResolve(dir: string) {
2425
return resolve(root, '.', dir)
2526
}
27+
2628
return [
2729
Vue(),
2830
VueJsx(),
@@ -45,8 +47,6 @@ export function createVitePlugins() {
4547
{
4648
'@/hooks/web/useI18n': ['useI18n'],
4749
'@/hooks/web/useMessage': ['useMessage'],
48-
'@/hooks/web/useXTable': ['useXTable'],
49-
'@/hooks/web/useVxeCrudSchemas': ['useVxeCrudSchemas'],
5050
'@/hooks/web/useTable': ['useTable'],
5151
'@/hooks/web/useCrudSchemas': ['useCrudSchemas'],
5252
'@/utils/formRules': ['required'],
@@ -98,7 +98,8 @@ export function createVitePlugins() {
9898
deleteOriginFile: false //压缩后是否删除源文件
9999
}),
100100
ViteEjsPlugin(),
101-
topLevelAwait({ // https://juejin.cn/post/7152191742513512485
101+
topLevelAwait({
102+
// https://juejin.cn/post/7152191742513512485
102103
// The export name of top-level await promise for each chunk module
103104
promiseExportName: '__tla',
104105
// The function to generate import names of top-level await promise in each chunk module

build/vite/optimize.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ const include = [
1818
'lodash-es',
1919
'nprogress',
2020
'animate.css',
21-
'vxe-table',
22-
'vxe-table/es/style',
23-
'vxe-table/lib/locale/lang/zh-CN',
24-
'vxe-table/lib/locale/lang/en-US',
2521
'web-storage-cache',
2622
'@iconify/iconify',
2723
'@vueuse/core',
@@ -68,6 +64,7 @@ const include = [
6864
'element-plus/es/components/dropdown-menu/style/index',
6965
'element-plus/es/components/dropdown-item/style/index',
7066
'element-plus/es/components/skeleton/style/index',
67+
7168
'element-plus/es/components/skeleton/style/css',
7269
'element-plus/es/components/backtop/style/css',
7370
'element-plus/es/components/menu/style/css',
@@ -79,7 +76,22 @@ const include = [
7976
'element-plus/es/components/dropdown-item/style/css',
8077
'element-plus/es/components/badge/style/css',
8178
'element-plus/es/components/breadcrumb/style/css',
82-
'element-plus/es/components/breadcrumb-item/style/css'
79+
'element-plus/es/components/breadcrumb-item/style/css',
80+
'element-plus/es/components/image/style/css',
81+
'element-plus/es/components/tag/style/css',
82+
'element-plus/es/components/dialog/style/css',
83+
'element-plus/es/components/form/style/css',
84+
'element-plus/es/components/form-item/style/css',
85+
'element-plus/es/components/card/style/css',
86+
'element-plus/es/components/tooltip/style/css',
87+
'element-plus/es/components/radio-group/style/css',
88+
'element-plus/es/components/radio/style/css',
89+
'element-plus/es/components/input-number/style/css',
90+
'element-plus/es/components/tree-select/style/css',
91+
'element-plus/es/components/drawer/style/css',
92+
'element-plus/es/components/image-viewer/style/css',
93+
'element-plus/es/components/upload/style/css',
94+
'element-plus/es/components/switch/style/css'
8395
]
8496

8597
const exclude = ['@iconify/json']

0 commit comments

Comments
 (0)