befly-admin 3.4.27 → 3.4.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly-admin",
3
- "version": "3.4.27",
3
+ "version": "3.4.28",
4
4
  "description": "Befly Admin - 基于 Vue3 + OpenTiny Vue 的后台管理系统",
5
5
  "type": "module",
6
6
  "private": false,
@@ -36,7 +36,7 @@
36
36
  "vue-router": "^4.6.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@befly-addon/admin": "1.0.29",
39
+ "@befly-addon/admin": "1.0.30",
40
40
  "@iconify-json/lucide": "^1.2.72",
41
41
  "@opentiny/unplugin-tiny-vue": "^1.0.0",
42
42
  "@unocss/preset-attributify": "^66.5.6",
@@ -49,7 +49,7 @@
49
49
  "unplugin-auto-import": "^20.2.0",
50
50
  "unplugin-icons": "^22.5.0",
51
51
  "unplugin-vue-components": "^30.0.0",
52
- "unplugin-vue-router": "^0.16.2",
52
+ "unplugin-vue-router": "^0.17.0",
53
53
  "vite": "^7.2.2",
54
54
  "vite-plugin-vue-devtools": "^8.0.3",
55
55
  "vue-tsc": "^3.1.3"
@@ -58,5 +58,5 @@
58
58
  "node": ">=24.0.0",
59
59
  "pnpm": ">=10.0.0"
60
60
  },
61
- "gitHead": "ff2020bb13c5f14bf6486e51a12e31aebf2bb712"
61
+ "gitHead": "178b2045d0a76ba734ec623b7e478b3024a58e6d"
62
62
  }
@@ -6,9 +6,9 @@
6
6
  // biome-ignore lint: disable
7
7
  export {}
8
8
  declare global {
9
- const $Config: typeof import('../config/index').$Config
10
- const $Http: typeof import('../plugins/http').$Http
11
- const $Storage: typeof import('../plugins/storage').$Storage
9
+ const $Config: typeof import('../config/index.js').$Config
10
+ const $Http: typeof import('../plugins/http.js').$Http
11
+ const $Storage: typeof import('../plugins/storage.js').$Storage
12
12
  const EffectScope: typeof import('vue').EffectScope
13
13
  const Loading: typeof import('@opentiny/vue').Loading
14
14
  const Message: typeof import('@opentiny/vue').Message
@@ -16,7 +16,7 @@ declare global {
16
16
  const Modal: typeof import('@opentiny/vue').Modal
17
17
  const Notify: typeof import('@opentiny/vue').Notify
18
18
  const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
19
- const arrayToTree: typeof import('../utils/index').arrayToTree
19
+ const arrayToTree: typeof import('../utils/index.js').arrayToTree
20
20
  const computed: typeof import('vue').computed
21
21
  const createApp: typeof import('vue').createApp
22
22
  const createPinia: typeof import('pinia').createPinia
@@ -80,7 +80,7 @@ declare global {
80
80
  const useAttrs: typeof import('vue').useAttrs
81
81
  const useCssModule: typeof import('vue').useCssModule
82
82
  const useCssVars: typeof import('vue').useCssVars
83
- const useGlobal: typeof import('../plugins/global').useGlobal
83
+ const useGlobal: typeof import('../plugins/global.js').useGlobal
84
84
  const useId: typeof import('vue').useId
85
85
  const useModel: typeof import('vue').useModel
86
86
  const useRoute: typeof import('vue-router').useRoute
@@ -104,9 +104,9 @@ import { UnwrapRef } from 'vue'
104
104
  declare module 'vue' {
105
105
  interface GlobalComponents {}
106
106
  interface ComponentCustomProperties {
107
- readonly $Config: UnwrapRef<typeof import('../config/index')['$Config']>
108
- readonly $Http: UnwrapRef<typeof import('../plugins/http')['$Http']>
109
- readonly $Storage: UnwrapRef<typeof import('../plugins/storage')['$Storage']>
107
+ readonly $Config: UnwrapRef<typeof import('../config/index.js')['$Config']>
108
+ readonly $Http: UnwrapRef<typeof import('../plugins/http.js')['$Http']>
109
+ readonly $Storage: UnwrapRef<typeof import('../plugins/storage.js')['$Storage']>
110
110
  readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
111
111
  readonly Loading: UnwrapRef<typeof import('@opentiny/vue')['Loading']>
112
112
  readonly Message: UnwrapRef<typeof import('@opentiny/vue')['Message']>
@@ -114,7 +114,7 @@ declare module 'vue' {
114
114
  readonly Modal: UnwrapRef<typeof import('@opentiny/vue')['Modal']>
115
115
  readonly Notify: UnwrapRef<typeof import('@opentiny/vue')['Notify']>
116
116
  readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
117
- readonly arrayToTree: UnwrapRef<typeof import('../utils/index')['arrayToTree']>
117
+ readonly arrayToTree: UnwrapRef<typeof import('../utils/index.js')['arrayToTree']>
118
118
  readonly computed: UnwrapRef<typeof import('vue')['computed']>
119
119
  readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
120
120
  readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
@@ -177,7 +177,7 @@ declare module 'vue' {
177
177
  readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
178
178
  readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
179
179
  readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
180
- readonly useGlobal: UnwrapRef<typeof import('../plugins/global')['useGlobal']>
180
+ readonly useGlobal: UnwrapRef<typeof import('../plugins/global.js')['useGlobal']>
181
181
  readonly useId: UnwrapRef<typeof import('vue')['useId']>
182
182
  readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
183
183
  readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
@@ -17,9 +17,6 @@ declare module 'vue' {
17
17
  RouterLink: typeof import('vue-router')['RouterLink']
18
18
  RouterView: typeof import('vue-router')['RouterView']
19
19
  TinyButton: typeof import('@opentiny/vue-button')['default']
20
- TinyCol: typeof import('@opentiny/vue-col')['default']
21
- TinyDivider: typeof import('@opentiny/vue-divider')['default']
22
- TinyRow: typeof import('@opentiny/vue-row')['default']
23
20
  TinyTag: typeof import('@opentiny/vue-tag')['default']
24
21
  TinyTreeMenu: typeof import('@opentiny/vue-tree-menu')['default']
25
22
  }
package/vite.config.js CHANGED
@@ -13,9 +13,10 @@ import UnoCSS from 'unocss/vite';
13
13
  import { fileURLToPath, URL } from 'node:url';
14
14
  import { scanBeflyAddonViews } from '@befly-addon/admin/utils/scanBeflyAddonViews';
15
15
 
16
- const routesFolders = scanBeflyAddonViews();
17
-
18
16
  export default defineConfig({
17
+ // 基础路径配置(支持二级目录部署)
18
+ base: './',
19
+
19
20
  // 插件配置
20
21
  plugins: [
21
22
  // UnoCSS
@@ -26,7 +27,7 @@ export default defineConfig({
26
27
 
27
28
  // VueRouter 必须在 Vue 插件之前
28
29
  VueRouter({
29
- routesFolder: routesFolders,
30
+ routesFolder: scanBeflyAddonViews(),
30
31
  dts: './src/types/typed-router.d.ts',
31
32
  extensions: ['.vue'],
32
33
  importMode: 'async',
@@ -101,11 +102,18 @@ export default defineConfig({
101
102
  sourcemap: false,
102
103
  minify: 'esbuild',
103
104
  rollupOptions: {
104
- external: ['vue', 'vue-router', 'pinia', '@opentiny/vue', 'axios', 'vue-macros/macros'],
105
105
  output: {
106
- chunkFileNames: 'assets/[name]-[hash].js',
107
- entryFileNames: 'assets/[name]-[hash].js',
108
- assetFileNames: 'assets/[name]-[hash].[ext]'
106
+ chunkFileNames: 'assets/js/[name]-[hash].js',
107
+ entryFileNames: 'assets/js/[name]-[hash].js',
108
+ assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
109
+ manualChunks: {
110
+ // Vue 核心
111
+ 'vue-vendor': ['vue', 'vue-router', 'pinia'],
112
+ // UI 组件库
113
+ 'ui-vendor': ['@opentiny/vue'],
114
+ // 工具库
115
+ 'utils-vendor': ['axios']
116
+ }
109
117
  }
110
118
  }
111
119
  },
@@ -123,6 +131,6 @@ export default defineConfig({
123
131
 
124
132
  // 优化配置
125
133
  optimizeDeps: {
126
- include: ['vue', 'vue-router', 'pinia', 'axios', '@opentiny/vue']
134
+ include: ['vue', 'vue-router', 'pinia', 'axios', '@opentiny/vue', 'vue-macros/macros']
127
135
  }
128
136
  });