befly-admin 3.4.28 → 3.4.29

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.28",
3
+ "version": "3.4.29",
4
4
  "description": "Befly Admin - 基于 Vue3 + OpenTiny Vue 的后台管理系统",
5
5
  "type": "module",
6
6
  "private": false,
@@ -29,16 +29,40 @@
29
29
  "sync:admin": "bunx befly sync:admin"
30
30
  },
31
31
  "dependencies": {
32
- "@opentiny/vue": "^3.27.0",
32
+ "@opentiny/vue-button": "~3.27.0",
33
+ "@opentiny/vue-checkbox": "~3.27.0",
34
+ "@opentiny/vue-checkbox-group": "~3.27.0",
35
+ "@opentiny/vue-dialog-box": "~3.27.0",
36
+ "@opentiny/vue-dropdown": "~3.27.0",
37
+ "@opentiny/vue-dropdown-item": "~3.27.0",
38
+ "@opentiny/vue-dropdown-menu": "~3.27.0",
39
+ "@opentiny/vue-form": "~3.27.0",
40
+ "@opentiny/vue-form-item": "~3.27.0",
41
+ "@opentiny/vue-grid": "~3.27.0",
42
+ "@opentiny/vue-grid-column": "~3.27.0",
43
+ "@opentiny/vue-icon": "~3.27.0",
44
+ "@opentiny/vue-input": "~3.27.0",
45
+ "@opentiny/vue-loading": "~3.27.0",
46
+ "@opentiny/vue-message": "~3.27.0",
47
+ "@opentiny/vue-modal": "~3.27.0",
48
+ "@opentiny/vue-notify": "~3.27.0",
49
+ "@opentiny/vue-numeric": "~3.27.0",
50
+ "@opentiny/vue-pager": "~3.27.0",
51
+ "@opentiny/vue-progress": "~3.27.0",
52
+ "@opentiny/vue-radio": "~3.27.0",
53
+ "@opentiny/vue-radio-group": "~3.27.0",
54
+ "@opentiny/vue-search": "~3.27.0",
55
+ "@opentiny/vue-select": "~3.27.0",
56
+ "@opentiny/vue-tag": "~3.27.0",
57
+ "@opentiny/vue-tree": "~3.27.0",
33
58
  "axios": "^1.13.2",
34
59
  "pinia": "^3.0.4",
35
60
  "vue": "^3.5.22",
36
61
  "vue-router": "^4.6.3"
37
62
  },
38
63
  "devDependencies": {
39
- "@befly-addon/admin": "1.0.30",
64
+ "@befly-addon/admin": "1.0.31",
40
65
  "@iconify-json/lucide": "^1.2.72",
41
- "@opentiny/unplugin-tiny-vue": "^1.0.0",
42
66
  "@unocss/preset-attributify": "^66.5.6",
43
67
  "@unocss/preset-uno": "^66.5.6",
44
68
  "@vitejs/plugin-vue": "^6.0.1",
@@ -58,5 +82,5 @@
58
82
  "node": ">=24.0.0",
59
83
  "pnpm": ">=10.0.0"
60
84
  },
61
- "gitHead": "178b2045d0a76ba734ec623b7e478b3024a58e6d"
85
+ "gitHead": "f279b3e03931a8f13ac1c559e545d18052ce2b87"
62
86
  }
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { Modal } from '@opentiny/vue';
2
+ import Modal from '@opentiny/vue-modal';
3
3
  import { $Storage } from './storage';
4
4
 
5
5
  /**
@@ -10,11 +10,11 @@ declare global {
10
10
  const $Http: typeof import('../plugins/http.js').$Http
11
11
  const $Storage: typeof import('../plugins/storage.js').$Storage
12
12
  const EffectScope: typeof import('vue').EffectScope
13
- const Loading: typeof import('@opentiny/vue').Loading
14
- const Message: typeof import('@opentiny/vue').Message
15
- const MessageBox: typeof import('@opentiny/vue').MessageBox
16
- const Modal: typeof import('@opentiny/vue').Modal
17
- const Notify: typeof import('@opentiny/vue').Notify
13
+ const Loading: typeof import('@opentiny/vue-loading').default
14
+ const Message: typeof import('@opentiny/vue-message').default
15
+ const MessageBox: typeof import('@opentiny/vue-modal').default
16
+ const Modal: typeof import('@opentiny/vue-modal').default
17
+ const Notify: typeof import('@opentiny/vue-notify').default
18
18
  const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
19
19
  const arrayToTree: typeof import('../utils/index.js').arrayToTree
20
20
  const computed: typeof import('vue').computed
@@ -108,11 +108,11 @@ declare module 'vue' {
108
108
  readonly $Http: UnwrapRef<typeof import('../plugins/http.js')['$Http']>
109
109
  readonly $Storage: UnwrapRef<typeof import('../plugins/storage.js')['$Storage']>
110
110
  readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
111
- readonly Loading: UnwrapRef<typeof import('@opentiny/vue')['Loading']>
112
- readonly Message: UnwrapRef<typeof import('@opentiny/vue')['Message']>
113
- readonly MessageBox: UnwrapRef<typeof import('@opentiny/vue')['MessageBox']>
114
- readonly Modal: UnwrapRef<typeof import('@opentiny/vue')['Modal']>
115
- readonly Notify: UnwrapRef<typeof import('@opentiny/vue')['Notify']>
111
+ readonly Loading: UnwrapRef<typeof import('@opentiny/vue-loading')['default']>
112
+ readonly Message: UnwrapRef<typeof import('@opentiny/vue-message')['default']>
113
+ readonly MessageBox: UnwrapRef<typeof import('@opentiny/vue-modal')['default']>
114
+ readonly Modal: UnwrapRef<typeof import('@opentiny/vue-modal')['default']>
115
+ readonly Notify: UnwrapRef<typeof import('@opentiny/vue-notify')['default']>
116
116
  readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
117
117
  readonly arrayToTree: UnwrapRef<typeof import('../utils/index.js')['arrayToTree']>
118
118
  readonly computed: UnwrapRef<typeof import('vue')['computed']>
@@ -16,8 +16,5 @@ declare module 'vue' {
16
16
  'ILucide:home': typeof import('~icons/lucide/home')['default']
17
17
  RouterLink: typeof import('vue-router')['RouterLink']
18
18
  RouterView: typeof import('vue-router')['RouterView']
19
- TinyButton: typeof import('@opentiny/vue-button')['default']
20
- TinyTag: typeof import('@opentiny/vue-tag')['default']
21
- TinyTreeMenu: typeof import('@opentiny/vue-tree-menu')['default']
22
19
  }
23
20
  }
package/vite.config.js CHANGED
@@ -8,7 +8,6 @@ import Components from 'unplugin-vue-components/vite';
8
8
  import Icons from 'unplugin-icons/vite';
9
9
  import IconsResolver from 'unplugin-icons/resolver';
10
10
  import ReactivityTransform from '@vue-macros/reactivity-transform/vite';
11
- import { TinyVueSingleResolver } from '@opentiny/unplugin-tiny-vue';
12
11
  import UnoCSS from 'unocss/vite';
13
12
  import { fileURLToPath, URL } from 'node:url';
14
13
  import { scanBeflyAddonViews } from '@befly-addon/admin/utils/scanBeflyAddonViews';
@@ -53,7 +52,13 @@ export default defineConfig({
53
52
  'pinia',
54
53
  VueRouterAutoImports,
55
54
  {
56
- '@opentiny/vue': ['Modal', 'Notify', 'Message', 'MessageBox', 'Loading']
55
+ '@opentiny/vue-modal': [
56
+ ['default', 'Modal'],
57
+ ['default', 'MessageBox']
58
+ ],
59
+ '@opentiny/vue-notify': [['default', 'Notify']],
60
+ '@opentiny/vue-message': [['default', 'Message']],
61
+ '@opentiny/vue-loading': [['default', 'Loading']]
57
62
  }
58
63
  ],
59
64
  dts: 'src/types/auto-imports.d.ts',
@@ -63,7 +68,7 @@ export default defineConfig({
63
68
 
64
69
  // 组件自动导入
65
70
  Components({
66
- resolvers: [TinyVueSingleResolver, IconsResolver({})],
71
+ resolvers: [IconsResolver({})],
67
72
  dirs: ['src/components'],
68
73
  deep: true,
69
74
  dts: 'src/types/components.d.ts'
@@ -101,18 +106,90 @@ export default defineConfig({
101
106
  assetsDir: 'assets',
102
107
  sourcemap: false,
103
108
  minify: 'esbuild',
109
+ chunkSizeWarningLimit: 1000,
104
110
  rollupOptions: {
105
111
  output: {
106
112
  chunkFileNames: 'assets/js/[name]-[hash].js',
107
113
  entryFileNames: 'assets/js/[name]-[hash].js',
108
114
  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']
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
+ // TinyVue 细粒度拆分
128
+ if (id.includes('@opentiny/vue-renderless/src/grid')) {
129
+ return 'tiny-grid';
130
+ }
131
+ if (id.includes('@opentiny/vue-renderless/src/table')) {
132
+ return 'tiny-table';
133
+ }
134
+ if (id.includes('@opentiny/vue-renderless/src/tree')) {
135
+ return 'tiny-tree';
136
+ }
137
+ if (id.includes('@opentiny/vue-renderless/src/form')) {
138
+ return 'tiny-form';
139
+ }
140
+ if (id.includes('node_modules/@opentiny/vue-renderless/')) {
141
+ return 'tiny-renderless';
142
+ }
143
+ if (id.includes('node_modules/@opentiny/vue-theme/')) {
144
+ return 'tiny-theme';
145
+ }
146
+ if (id.includes('node_modules/@opentiny/vue-locale/')) {
147
+ return 'tiny-locale';
148
+ }
149
+ if (id.includes('node_modules/@opentiny/vue-common/')) {
150
+ return 'tiny-common';
151
+ }
152
+ if (id.includes('node_modules/@opentiny/vue-icon/')) {
153
+ return 'tiny-icon';
154
+ }
155
+
156
+ // 工具库(独立文件)
157
+ if (id.includes('node_modules/axios/')) {
158
+ return 'lib-axios';
159
+ }
160
+
161
+ // lodash-es 独立拆分(体积较大)
162
+ if (id.includes('node_modules/lodash-es/') || id.includes('node_modules/.bun/lodash-es')) {
163
+ return 'lib-lodash';
164
+ }
165
+
166
+ // echarts 及相关库(TinyVue 图表组件依赖)
167
+ if (id.includes('node_modules/echarts/') || id.includes('node_modules/.bun/echarts')) {
168
+ return 'lib-echarts';
169
+ }
170
+ if (id.includes('node_modules/zrender/') || id.includes('node_modules/.bun/zrender')) {
171
+ return 'lib-zrender';
172
+ }
173
+
174
+ // Lucide 图标
175
+ if (id.includes('node_modules/@iconify/') || id.includes('~icons/')) {
176
+ return 'icons';
177
+ }
178
+
179
+ // Vue Macros
180
+ if (id.includes('node_modules/@vue-macros/') || id.includes('node_modules/vue-macros/')) {
181
+ return 'vue-macros';
182
+ }
183
+
184
+ // befly-addon
185
+ if (id.includes('@befly-addon/')) {
186
+ return 'befly-addon';
187
+ }
188
+
189
+ // 其他 node_modules 依赖
190
+ if (id.includes('node_modules/')) {
191
+ return 'vendor';
192
+ }
116
193
  }
117
194
  }
118
195
  }
@@ -131,6 +208,6 @@ export default defineConfig({
131
208
 
132
209
  // 优化配置
133
210
  optimizeDeps: {
134
- include: ['vue', 'vue-router', 'pinia', 'axios', '@opentiny/vue', 'vue-macros/macros']
211
+ include: ['vue', 'vue-router', 'pinia', 'axios', 'vue-macros/macros']
135
212
  }
136
213
  });