befly-admin 4.0.11 → 4.0.13
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/README.md +11 -13
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
- **SCSS** - CSS 预处理器
|
|
12
12
|
- **Vue Router** - 路由管理
|
|
13
13
|
- **Pinia** - 状态管理
|
|
14
|
-
- **unplugin-
|
|
15
|
-
- **unplugin-vue-components** - 组件自动导入
|
|
14
|
+
- **unplugin-vue-components** - 组件自动注册
|
|
16
15
|
|
|
17
16
|
## 特性
|
|
18
17
|
|
|
19
|
-
- ✅
|
|
20
|
-
- ✅
|
|
21
|
-
- ✅ 自动导入 Vue Router 和 Pinia API
|
|
18
|
+
- ✅ 自动注册 TDesign 组件(无需手动注册)
|
|
19
|
+
- ✅ Vue Router / Pinia / Vue API 统一显式导入
|
|
22
20
|
- ✅ JavaScript
|
|
23
21
|
- ✅ SCSS 支持(全局变量 + Mixins)
|
|
24
22
|
- ✅ 响应式布局
|
|
@@ -64,25 +62,25 @@ admin/
|
|
|
64
62
|
└── package.json
|
|
65
63
|
```
|
|
66
64
|
|
|
67
|
-
##
|
|
65
|
+
## 导入说明
|
|
68
66
|
|
|
69
|
-
### API
|
|
67
|
+
### API 导入
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
Vue、Vue Router、Pinia API 需要显式导入:
|
|
72
70
|
|
|
73
71
|
```javascript
|
|
74
|
-
//
|
|
72
|
+
// ✅ 需要显式导入
|
|
75
73
|
import { ref, computed, onMounted } from "vue";
|
|
76
74
|
import { useRouter, useRoute } from "vue-router";
|
|
77
75
|
import { defineStore } from "pinia";
|
|
78
76
|
|
|
79
|
-
//
|
|
77
|
+
// 然后再使用
|
|
80
78
|
const count = ref(0);
|
|
81
79
|
const router = useRouter();
|
|
82
80
|
const store = defineStore("main", {});
|
|
83
81
|
```
|
|
84
82
|
|
|
85
|
-
###
|
|
83
|
+
### 组件自动注册
|
|
86
84
|
|
|
87
85
|
TDesign 组件无需手动导入和注册:
|
|
88
86
|
|
|
@@ -104,7 +102,7 @@ TDesign 组件无需手动导入和注册:
|
|
|
104
102
|
|
|
105
103
|
### Vite 配置
|
|
106
104
|
|
|
107
|
-
-
|
|
105
|
+
- **组件自动注册配置**: `unplugin-vue-components`
|
|
108
106
|
- **路径别名**: `@` 指向 `src` 目录
|
|
109
107
|
- **开发服务器**: 端口 5173,自动打开浏览器
|
|
110
108
|
- **代理配置**: `/api` 代理到 `http://localhost:3000`
|
|
@@ -131,7 +129,7 @@ bun run build
|
|
|
131
129
|
|
|
132
130
|
## 注意事项
|
|
133
131
|
|
|
134
|
-
1.
|
|
132
|
+
1. **API 导入**:Vue、Pinia、Vue Router API 需要显式导入
|
|
135
133
|
2. **登录功能**:当前为模拟登录,需要对接真实 API
|
|
136
134
|
3. **Token 存储**:统一通过 `@/plugins/store.js` 中的 `$Store.local` 访问,底层默认使用 localStorage,生产环境建议使用更安全的方式
|
|
137
135
|
4. **API 代理**:开发环境 `/api` 代理到 `http://localhost:3000`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly-admin",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.13",
|
|
4
4
|
"gitHead": "282f7accca9c8d55956a5490c0365cce4a1ad90d",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Befly Admin - 基于 Vue3 + TDesign Vue Next 的后台管理系统",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"preview": "bunx --bun befly-vite preview"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"befly-admin-ui": "^1.10.
|
|
32
|
-
"befly-shared": "^2.0.
|
|
33
|
-
"befly-vite": "^1.7.
|
|
31
|
+
"befly-admin-ui": "^1.10.13",
|
|
32
|
+
"befly-shared": "^2.0.19",
|
|
33
|
+
"befly-vite": "^1.7.13",
|
|
34
34
|
"pinia": "^3.0.4",
|
|
35
35
|
"tdesign-icons-vue-next": "^0.4.4",
|
|
36
36
|
"tdesign-vue-next": "^1.20.0",
|