befly-admin 3.4.35 → 3.4.37
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/.gitignore +1 -0
- package/package.json +4 -18
- package/src/types/components.d.ts +0 -51
- package/src/types/typed-router.d.ts +0 -39
- package/vite.config.js +5 -196
- package/tsconfig.json +0 -34
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly-admin",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.37",
|
|
4
4
|
"description": "Befly Admin - 基于 Vue3 + OpenTiny Vue 的后台管理系统",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"public",
|
|
14
14
|
"index.html",
|
|
15
15
|
"vite.config.js",
|
|
16
|
-
"tsconfig.json",
|
|
17
16
|
".env",
|
|
18
17
|
".env.development",
|
|
19
18
|
".env.production",
|
|
@@ -25,7 +24,6 @@
|
|
|
25
24
|
"dev": "vite",
|
|
26
25
|
"build": "vite build",
|
|
27
26
|
"preview": "vite preview",
|
|
28
|
-
"type-check": "vue-tsc --noEmit",
|
|
29
27
|
"sync:admin": "bunx befly sync:admin"
|
|
30
28
|
},
|
|
31
29
|
"dependencies": {
|
|
@@ -38,24 +36,12 @@
|
|
|
38
36
|
},
|
|
39
37
|
"devDependencies": {
|
|
40
38
|
"@iconify-json/lucide": "^1.2.72",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"@vitejs/plugin-vue": "^6.0.1",
|
|
44
|
-
"@vue-macros/reactivity-transform": "^3.1.1",
|
|
45
|
-
"sass": "^1.94.0",
|
|
46
|
-
"typescript": "^5.9.3",
|
|
47
|
-
"unocss": "^66.5.6",
|
|
48
|
-
"unplugin-auto-import": "^20.2.0",
|
|
49
|
-
"unplugin-icons": "^22.5.0",
|
|
50
|
-
"unplugin-vue-components": "^30.0.0",
|
|
51
|
-
"unplugin-vue-router": "^0.17.0",
|
|
52
|
-
"vite": "^7.2.2",
|
|
53
|
-
"vite-plugin-vue-devtools": "^8.0.3",
|
|
54
|
-
"vue-tsc": "^3.1.3"
|
|
39
|
+
"befly-vite": "1.0.2",
|
|
40
|
+
"vite": "^7.2.2"
|
|
55
41
|
},
|
|
56
42
|
"engines": {
|
|
57
43
|
"node": ">=24.0.0",
|
|
58
44
|
"pnpm": ">=10.0.0"
|
|
59
45
|
},
|
|
60
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "784849eea6ddee5491efbad70a9f829a4b6e77f5"
|
|
61
47
|
}
|
|
@@ -11,67 +11,16 @@ export {}
|
|
|
11
11
|
/* prettier-ignore */
|
|
12
12
|
declare module 'vue' {
|
|
13
13
|
export interface GlobalComponents {
|
|
14
|
-
'ILucide:activity': typeof import('~icons/lucide/activity')['default']
|
|
15
|
-
'ILucide:alertCircle': typeof import('~icons/lucide/alert-circle')['default']
|
|
16
|
-
'ILucide:alertTriangle': typeof import('~icons/lucide/alert-triangle')['default']
|
|
17
|
-
'ILucide:checkCircle': typeof import('~icons/lucide/check-circle')['default']
|
|
18
|
-
'ILucide:circle': typeof import('~icons/lucide/circle')['default']
|
|
19
|
-
'ILucide:clock': typeof import('~icons/lucide/clock')['default']
|
|
20
|
-
'ILucide:cloud': typeof import('~icons/lucide/cloud')['default']
|
|
21
|
-
'ILucide:code': typeof import('~icons/lucide/code')['default']
|
|
22
|
-
'ILucide:cpu': typeof import('~icons/lucide/cpu')['default']
|
|
23
|
-
'ILucide:database': typeof import('~icons/lucide/database')['default']
|
|
24
|
-
'ILucide:disc': typeof import('~icons/lucide/disc')['default']
|
|
25
14
|
'ILucide:fileText': typeof import('~icons/lucide/file-text')['default']
|
|
26
15
|
'ILucide:folder': typeof import('~icons/lucide/folder')['default']
|
|
27
|
-
'ILucide:hardDrive': typeof import('~icons/lucide/hard-drive')['default']
|
|
28
16
|
'ILucide:home': typeof import('~icons/lucide/home')['default']
|
|
29
|
-
'ILucide:info': typeof import('~icons/lucide/info')['default']
|
|
30
|
-
'ILucide:lock': typeof import('~icons/lucide/lock')['default']
|
|
31
|
-
'ILucide:mail': typeof import('~icons/lucide/mail')['default']
|
|
32
|
-
'ILucide:menu': typeof import('~icons/lucide/menu')['default']
|
|
33
|
-
'ILucide:pencil': typeof import('~icons/lucide/pencil')['default']
|
|
34
|
-
'ILucide:plus': typeof import('~icons/lucide/plus')['default']
|
|
35
|
-
'ILucide:rotateCw': typeof import('~icons/lucide/rotate-cw')['default']
|
|
36
|
-
'ILucide:search': typeof import('~icons/lucide/search')['default']
|
|
37
|
-
'ILucide:server': typeof import('~icons/lucide/server')['default']
|
|
38
|
-
'ILucide:settings': typeof import('~icons/lucide/settings')['default']
|
|
39
|
-
'ILucide:smile': typeof import('~icons/lucide/smile')['default']
|
|
40
|
-
'ILucide:square': typeof import('~icons/lucide/square')['default']
|
|
41
|
-
'ILucide:trash2': typeof import('~icons/lucide/trash2')['default']
|
|
42
|
-
'ILucide:trendingUp': typeof import('~icons/lucide/trending-up')['default']
|
|
43
|
-
'ILucide:user': typeof import('~icons/lucide/user')['default']
|
|
44
|
-
'ILucide:users': typeof import('~icons/lucide/users')['default']
|
|
45
|
-
'ILucide:webhook': typeof import('~icons/lucide/webhook')['default']
|
|
46
17
|
'ILucide:x': typeof import('~icons/lucide/x')['default']
|
|
47
|
-
'ILucide:xCircle': typeof import('~icons/lucide/x-circle')['default']
|
|
48
|
-
'ILucide:zap': typeof import('~icons/lucide/zap')['default']
|
|
49
18
|
RouterLink: typeof import('vue-router')['RouterLink']
|
|
50
19
|
RouterView: typeof import('vue-router')['RouterView']
|
|
51
20
|
TButton: typeof import('tdesign-vue-next')['Button']
|
|
52
|
-
TCheckbox: typeof import('tdesign-vue-next')['Checkbox']
|
|
53
|
-
TCheckboxGroup: typeof import('tdesign-vue-next')['CheckboxGroup']
|
|
54
|
-
TDialog: typeof import('tdesign-vue-next')['Dialog']
|
|
55
|
-
TDivider: typeof import('tdesign-vue-next')['Divider']
|
|
56
|
-
TDropdown: typeof import('tdesign-vue-next')['Dropdown']
|
|
57
|
-
TDropdownItem: typeof import('tdesign-vue-next')['DropdownItem']
|
|
58
|
-
TDropdownMenu: typeof import('tdesign-vue-next')['DropdownMenu']
|
|
59
|
-
TForm: typeof import('tdesign-vue-next')['Form']
|
|
60
|
-
TFormItem: typeof import('tdesign-vue-next')['FormItem']
|
|
61
|
-
TInput: typeof import('tdesign-vue-next')['Input']
|
|
62
|
-
TInputNumber: typeof import('tdesign-vue-next')['InputNumber']
|
|
63
|
-
TLink: typeof import('tdesign-vue-next')['Link']
|
|
64
21
|
TMenu: typeof import('tdesign-vue-next')['Menu']
|
|
65
22
|
TMenuItem: typeof import('tdesign-vue-next')['MenuItem']
|
|
66
|
-
TPagination: typeof import('tdesign-vue-next')['Pagination']
|
|
67
|
-
TProgress: typeof import('tdesign-vue-next')['Progress']
|
|
68
|
-
TRadio: typeof import('tdesign-vue-next')['Radio']
|
|
69
|
-
TRadioGroup: typeof import('tdesign-vue-next')['RadioGroup']
|
|
70
|
-
TSelect: typeof import('tdesign-vue-next')['Select']
|
|
71
|
-
TSpace: typeof import('tdesign-vue-next')['Space']
|
|
72
23
|
TSubmenu: typeof import('tdesign-vue-next')['Submenu']
|
|
73
|
-
TTable: typeof import('tdesign-vue-next')['Table']
|
|
74
24
|
TTag: typeof import('tdesign-vue-next')['Tag']
|
|
75
|
-
TTree: typeof import('tdesign-vue-next')['Tree']
|
|
76
25
|
}
|
|
77
26
|
}
|
|
@@ -65,20 +65,6 @@ declare module 'vue-router/auto-routes' {
|
|
|
65
65
|
Record<never, never>,
|
|
66
66
|
| never
|
|
67
67
|
>,
|
|
68
|
-
'/addon/admin/news/': RouteRecordInfo<
|
|
69
|
-
'/addon/admin/news/',
|
|
70
|
-
'/addon/admin/news',
|
|
71
|
-
Record<never, never>,
|
|
72
|
-
Record<never, never>,
|
|
73
|
-
| never
|
|
74
|
-
>,
|
|
75
|
-
'/addon/admin/news/detail/': RouteRecordInfo<
|
|
76
|
-
'/addon/admin/news/detail/',
|
|
77
|
-
'/addon/admin/news/detail',
|
|
78
|
-
Record<never, never>,
|
|
79
|
-
Record<never, never>,
|
|
80
|
-
| never
|
|
81
|
-
>,
|
|
82
68
|
'/addon/admin/role/': RouteRecordInfo<
|
|
83
69
|
'/addon/admin/role/',
|
|
84
70
|
'/addon/admin/role',
|
|
@@ -86,13 +72,6 @@ declare module 'vue-router/auto-routes' {
|
|
|
86
72
|
Record<never, never>,
|
|
87
73
|
| never
|
|
88
74
|
>,
|
|
89
|
-
'/addon/admin/user/': RouteRecordInfo<
|
|
90
|
-
'/addon/admin/user/',
|
|
91
|
-
'/addon/admin/user',
|
|
92
|
-
Record<never, never>,
|
|
93
|
-
Record<never, never>,
|
|
94
|
-
| never
|
|
95
|
-
>,
|
|
96
75
|
}
|
|
97
76
|
|
|
98
77
|
/**
|
|
@@ -142,30 +121,12 @@ declare module 'vue-router/auto-routes' {
|
|
|
142
121
|
views:
|
|
143
122
|
| never
|
|
144
123
|
}
|
|
145
|
-
'node_modules/@befly-addon/admin/views/news/index.vue': {
|
|
146
|
-
routes:
|
|
147
|
-
| '/addon/admin/news/'
|
|
148
|
-
views:
|
|
149
|
-
| never
|
|
150
|
-
}
|
|
151
|
-
'node_modules/@befly-addon/admin/views/news/detail/index.vue': {
|
|
152
|
-
routes:
|
|
153
|
-
| '/addon/admin/news/detail/'
|
|
154
|
-
views:
|
|
155
|
-
| never
|
|
156
|
-
}
|
|
157
124
|
'node_modules/@befly-addon/admin/views/role/index.vue': {
|
|
158
125
|
routes:
|
|
159
126
|
| '/addon/admin/role/'
|
|
160
127
|
views:
|
|
161
128
|
| never
|
|
162
129
|
}
|
|
163
|
-
'node_modules/@befly-addon/admin/views/user/index.vue': {
|
|
164
|
-
routes:
|
|
165
|
-
| '/addon/admin/user/'
|
|
166
|
-
views:
|
|
167
|
-
| never
|
|
168
|
-
}
|
|
169
130
|
}
|
|
170
131
|
|
|
171
132
|
/**
|
package/vite.config.js
CHANGED
|
@@ -1,198 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import VueRouter from 'unplugin-vue-router/vite';
|
|
4
|
-
import { VueRouterAutoImports } from 'unplugin-vue-router';
|
|
5
|
-
import VueDevTools from 'vite-plugin-vue-devtools';
|
|
6
|
-
import AutoImport from 'unplugin-auto-import/vite';
|
|
7
|
-
import Components from 'unplugin-vue-components/vite';
|
|
8
|
-
import { TDesignResolver } from 'unplugin-vue-components/resolvers';
|
|
9
|
-
import Icons from 'unplugin-icons/vite';
|
|
10
|
-
import IconsResolver from 'unplugin-icons/resolver';
|
|
11
|
-
import ReactivityTransform from '@vue-macros/reactivity-transform/vite';
|
|
12
|
-
import UnoCSS from 'unocss/vite';
|
|
13
|
-
import { fileURLToPath, URL } from 'node:url';
|
|
14
|
-
import { scanBeflyAddonViews } from '@befly-addon/admin/utils/scanBeflyAddonViews';
|
|
1
|
+
import { createBeflyViteConfig, scanBeflyAddonViews } from 'befly-vite';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
15
3
|
|
|
16
|
-
export default
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// 插件配置
|
|
21
|
-
plugins: [
|
|
22
|
-
// UnoCSS
|
|
23
|
-
UnoCSS(),
|
|
24
|
-
|
|
25
|
-
// Vue DevTools(仅开发环境)
|
|
26
|
-
VueDevTools(),
|
|
27
|
-
|
|
28
|
-
// VueRouter 必须在 Vue 插件之前
|
|
29
|
-
VueRouter({
|
|
30
|
-
routesFolder: scanBeflyAddonViews(),
|
|
31
|
-
dts: './src/types/typed-router.d.ts',
|
|
32
|
-
extensions: ['.vue'],
|
|
33
|
-
importMode: 'async',
|
|
34
|
-
// 全局排除 components 目录
|
|
35
|
-
exclude: ['**/components/**']
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
// Vue 插件
|
|
39
|
-
vue({
|
|
40
|
-
script: {
|
|
41
|
-
defineModel: true,
|
|
42
|
-
propsDestructure: true
|
|
43
|
-
}
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
// Vue Reactivity Transform 支持
|
|
47
|
-
ReactivityTransform({
|
|
48
|
-
exclude: []
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
// API 自动导入
|
|
52
|
-
AutoImport({
|
|
53
|
-
imports: ['vue', 'pinia', VueRouterAutoImports],
|
|
54
|
-
resolvers: [
|
|
55
|
-
TDesignResolver({
|
|
56
|
-
library: 'vue-next'
|
|
57
|
-
})
|
|
58
|
-
],
|
|
59
|
-
dts: 'src/types/auto-imports.d.ts',
|
|
60
|
-
dirs: ['src/utils', 'src/plugins', 'src/config'],
|
|
61
|
-
vueTemplate: true
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
// 组件自动导入
|
|
65
|
-
Components({
|
|
66
|
-
resolvers: [
|
|
67
|
-
TDesignResolver({
|
|
68
|
-
library: 'vue-next'
|
|
69
|
-
}),
|
|
70
|
-
IconsResolver({})
|
|
71
|
-
],
|
|
72
|
-
dirs: ['src/components'],
|
|
73
|
-
deep: true,
|
|
74
|
-
dts: 'src/types/components.d.ts'
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
// 图标
|
|
78
|
-
Icons({
|
|
79
|
-
compiler: 'vue3',
|
|
80
|
-
autoInstall: false,
|
|
81
|
-
defaultClass: 'icon-befly',
|
|
82
|
-
defaultStyle: 'margin-right: 8px; vertical-align: middle;'
|
|
83
|
-
})
|
|
84
|
-
],
|
|
85
|
-
|
|
86
|
-
// 路径别名
|
|
87
|
-
resolve: {
|
|
88
|
-
alias: {
|
|
89
|
-
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
// 服务器配置
|
|
94
|
-
server: {
|
|
95
|
-
port: 5600,
|
|
96
|
-
host: '0.0.0.0',
|
|
97
|
-
strictPort: true,
|
|
98
|
-
open: false,
|
|
99
|
-
hmr: true
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
// 构建配置
|
|
103
|
-
build: {
|
|
104
|
-
target: 'es2020',
|
|
105
|
-
outDir: 'dist',
|
|
106
|
-
assetsDir: 'assets',
|
|
107
|
-
sourcemap: false,
|
|
108
|
-
minify: 'esbuild',
|
|
109
|
-
chunkSizeWarningLimit: 1000,
|
|
110
|
-
rollupOptions: {
|
|
111
|
-
output: {
|
|
112
|
-
chunkFileNames: 'assets/js/[name]-[hash].js',
|
|
113
|
-
entryFileNames: 'assets/js/[name]-[hash].js',
|
|
114
|
-
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
|
|
115
|
-
manualChunks: (id) => {
|
|
116
|
-
// Vue 核心框架(独立文件)
|
|
117
|
-
if (id.includes('node_modules/vue/') || id.includes('node_modules/@vue/')) {
|
|
118
|
-
return 'framework-vue';
|
|
119
|
-
}
|
|
120
|
-
if (id.includes('node_modules/vue-router/')) {
|
|
121
|
-
return 'framework-vue-router';
|
|
122
|
-
}
|
|
123
|
-
if (id.includes('node_modules/pinia/')) {
|
|
124
|
-
return 'framework-pinia';
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// TDesign Vue Next
|
|
128
|
-
if (id.includes('node_modules/tdesign-vue-next/') || id.includes('node_modules/.bun/tdesign-vue-next')) {
|
|
129
|
-
return 'tdesign';
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// 工具库(独立文件)
|
|
133
|
-
if (id.includes('node_modules/axios/')) {
|
|
134
|
-
return 'lib-axios';
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// lodash-es 独立拆分(体积较大)
|
|
138
|
-
if (id.includes('node_modules/lodash-es/') || id.includes('node_modules/.bun/lodash-es')) {
|
|
139
|
-
return 'lib-lodash';
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// echarts 及相关库
|
|
143
|
-
if (id.includes('node_modules/echarts/') || id.includes('node_modules/.bun/echarts')) {
|
|
144
|
-
return 'lib-echarts';
|
|
145
|
-
}
|
|
146
|
-
if (id.includes('node_modules/zrender/') || id.includes('node_modules/.bun/zrender')) {
|
|
147
|
-
return 'lib-zrender';
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Lucide 图标
|
|
151
|
-
if (id.includes('node_modules/@iconify/') || id.includes('~icons/')) {
|
|
152
|
-
return 'icons';
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// Vue Macros
|
|
156
|
-
if (id.includes('node_modules/@vue-macros/') || id.includes('node_modules/vue-macros/')) {
|
|
157
|
-
return 'vue-macros';
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// befly-addon
|
|
161
|
-
if (id.includes('@befly-addon/') || id.includes('packages/addonAdmin/') || id.includes('packages\\addonAdmin\\')) {
|
|
162
|
-
return 'befly-addon';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// 其他 node_modules 依赖
|
|
166
|
-
if (id.includes('node_modules/')) {
|
|
167
|
-
return 'vendor';
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
// CSS 配置
|
|
175
|
-
css: {
|
|
176
|
-
preprocessorOptions: {
|
|
177
|
-
scss: {
|
|
178
|
-
api: 'modern-compiler',
|
|
179
|
-
// 自动导入全局 SCSS 变量
|
|
180
|
-
additionalData: `@use "@/styles/variables.scss" as *;`
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
// 优化配置
|
|
186
|
-
optimizeDeps: {
|
|
187
|
-
include: [
|
|
188
|
-
// Vue 核心框架
|
|
189
|
-
'vue',
|
|
190
|
-
'vue-router',
|
|
191
|
-
'pinia',
|
|
192
|
-
'axios',
|
|
193
|
-
'vue-macros/macros',
|
|
194
|
-
// TDesign Vue Next(按需加载,无需预配置)
|
|
195
|
-
'tdesign-vue-next'
|
|
196
|
-
]
|
|
197
|
-
}
|
|
4
|
+
export default createBeflyViteConfig({
|
|
5
|
+
root: fileURLToPath(new URL('.', import.meta.url)),
|
|
6
|
+
scanViews: scanBeflyAddonViews
|
|
198
7
|
});
|
package/tsconfig.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Bundler mode */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowImportingTsExtensions": true,
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"moduleDetection": "force",
|
|
14
|
-
"noEmit": true,
|
|
15
|
-
|
|
16
|
-
/* Linting */
|
|
17
|
-
"strict": true,
|
|
18
|
-
"noUnusedLocals": false,
|
|
19
|
-
"noUnusedParameters": false,
|
|
20
|
-
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"noUncheckedSideEffectImports": true,
|
|
22
|
-
|
|
23
|
-
/* Path mapping */
|
|
24
|
-
"baseUrl": ".",
|
|
25
|
-
"paths": {
|
|
26
|
-
"@/*": ["./src/*"]
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
/* Type definitions */
|
|
30
|
-
"types": ["vite/client", "node", "unplugin-vue-router/client", "vite-plugin-vue-layouts-next/client"]
|
|
31
|
-
},
|
|
32
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/types/**/*.d.ts", "./src/types/typed-router.d.ts"],
|
|
33
|
-
"exclude": ["node_modules", "dist"]
|
|
34
|
-
}
|