befly-admin 4.0.9 → 4.0.10

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": "4.0.9",
3
+ "version": "4.0.10",
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.9",
32
- "befly-shared": "^2.0.15",
33
- "befly-vite": "^1.7.9",
31
+ "befly-admin-ui": "^1.10.10",
32
+ "befly-shared": "^2.0.16",
33
+ "befly-vite": "^1.7.10",
34
34
  "pinia": "^3.0.4",
35
35
  "tdesign-icons-vue-next": "^0.4.4",
36
36
  "tdesign-vue-next": "^1.20.0",
package/src/main.js CHANGED
@@ -4,7 +4,12 @@ import "tdesign-vue-next/es/style/index.css";
4
4
  import "befly-admin-ui/styles/variables.scss";
5
5
  // 引入全局基础样式(reset、通用类、滚动条等)
6
6
  import "@/styles/global.scss";
7
+ import { createPinia } from "pinia";
8
+ import { createApp } from "vue";
9
+
7
10
  import App from "./App.vue";
11
+ import { setupReport } from "./plugins/report.js";
12
+ import { $Router } from "./plugins/router.js";
8
13
 
9
14
  const app = createApp(App);
10
15
 
@@ -3,6 +3,9 @@
3
3
  * 集中管理所有全局数据,避免分散到多个 store 文件
4
4
  */
5
5
 
6
+ import { defineStore } from "pinia";
7
+ import { reactive } from "vue";
8
+
6
9
  export const useGlobal = defineStore("global", () => {
7
10
  // ==================== 全局数据 ====================
8
11
  const data = reactive({});
@@ -1,5 +1,7 @@
1
1
  import { createHttp } from "befly-shared/createHttp";
2
2
 
3
+ import { $Config } from "@/plugins/config.js";
4
+ import { $Router } from "@/plugins/router.js";
3
5
  import { $Store } from "@/plugins/store.js";
4
6
 
5
7
  let redirecting = false;
@@ -25,7 +25,7 @@ const finalRoutes = Layouts(routes, $Config.homePath, (layoutName) => {
25
25
  export const $Router = createRouter({
26
26
  history: createWebHashHistory(import.meta.env.BASE_URL),
27
27
  routes: finalRoutes,
28
- scrollBehavior(to, _from, savedPosition) {
28
+ scrollBehavior: function (to, _from, savedPosition) {
29
29
  if (savedPosition) {
30
30
  return savedPosition;
31
31
  }