befly-admin-ui 1.8.24 → 1.8.26

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.
@@ -18,6 +18,7 @@
18
18
  import { onBeforeUnmount, onMounted, ref, watch } from "vue";
19
19
 
20
20
  import { Button as TButton, Dialog as TDialog, Popconfirm as TPopconfirm } from "tdesign-vue-next";
21
+ import "tdesign-vue-next/es/dialog/style/index.css";
21
22
 
22
23
  defineOptions({
23
24
  inheritAttrs: false
@@ -353,7 +353,7 @@ async function loadList(options) {
353
353
  }
354
354
  }
355
355
 
356
- const res = await $Http.json(listEndpoint.path, data, listEndpoint.dropValues, listEndpoint.dropKeyValue);
356
+ const res = await $Http(listEndpoint.path, data, listEndpoint.dropValues, listEndpoint.dropKeyValue);
357
357
 
358
358
  // 并发保护:旧请求返回后不应覆盖新请求的状态
359
359
  if (seq !== requestSeq) {
@@ -517,7 +517,7 @@ async function deleteRow(row) {
517
517
  }
518
518
  }
519
519
 
520
- await $Http.json(ep.path, data, ep.dropValues, ep.dropKeyValue);
520
+ await $Http(ep.path, data, ep.dropValues, ep.dropKeyValue);
521
521
 
522
522
  MessagePlugin.success("删除成功");
523
523
  destroy();
@@ -136,7 +136,7 @@ const $Data = reactive({
136
136
 
137
137
  async function fetchUserMenus() {
138
138
  try {
139
- const { data } = await $Http.json("/core/menu/all");
139
+ const { data } = await $Http("/core/menu/all");
140
140
  const lists = Array.isArray(data?.lists) ? data.lists : [];
141
141
 
142
142
  const normalizedLists = lists.map((menu) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "befly-admin-ui",
3
- "version": "1.8.24",
4
- "gitHead": "0690bdde6ac3f8c13ba8f580d39a7f2f6e31f10a",
3
+ "version": "1.8.26",
4
+ "gitHead": "2c93dd639462a4979befc0672a9ea134fc7f4dd6",
5
5
  "private": false,
6
6
  "description": "Befly - 管理后台功能组件",
7
7
  "keywords": [
@@ -45,8 +45,5 @@
45
45
  "dev": "vite",
46
46
  "build": "vite build",
47
47
  "preview": "vite preview"
48
- },
49
- "peerDependencies": {
50
- "tdesign-icons-vue-next": "^0.4.0"
51
48
  }
52
49
  }
@@ -83,7 +83,7 @@ async function handleSubmit() {
83
83
  params["id"] = row["id"];
84
84
  }
85
85
 
86
- await $Http.json(apiUrl, params);
86
+ await $Http(apiUrl, params);
87
87
  MessagePlugin.success(props.actionType === "add" ? "添加成功" : "更新成功");
88
88
  visible.value = false;
89
89
  $Emit("success");
@@ -115,7 +115,7 @@ async function initData() {
115
115
 
116
116
  async function apiDictTypeAll() {
117
117
  try {
118
- const res = await $Http.json("/core/dictType/all", {}, [""]);
118
+ const res = await $Http("/core/dictType/all", {}, [""]);
119
119
  $Data.typeList = res.data.lists || [];
120
120
  } catch (error) {
121
121
  MessagePlugin.error(error.msg || error.message || "加载数据失败");
@@ -75,7 +75,7 @@ async function handleSubmit() {
75
75
  params["id"] = row["id"];
76
76
  }
77
77
 
78
- await $Http.json(apiUrl, params);
78
+ await $Http(apiUrl, params);
79
79
  MessagePlugin.success(props.actionType === "add" ? "添加成功" : "更新成功");
80
80
  visible.value = false;
81
81
  $Emit("success");
@@ -149,7 +149,7 @@ async function onSubmit(context) {
149
149
  $Data.submitting = true;
150
150
  try {
151
151
  const api = $Prop.actionType === "upd" ? "/core/sysConfig/upd" : "/core/sysConfig/ins";
152
- await $Http.json(api, $Data.formData);
152
+ await $Http(api, $Data.formData);
153
153
 
154
154
  MessagePlugin.success($Prop.actionType === "upd" ? "编辑成功" : "添加成功");
155
155
  $Emit("success");
@@ -35,7 +35,7 @@ const addonList = reactive([]);
35
35
  // 获取数据
36
36
  const fetchData = async () => {
37
37
  try {
38
- const res = await $Http.json("/core/dashboard/addonList", {}, [""]);
38
+ const res = await $Http("/core/dashboard/addonList", {}, [""]);
39
39
  addonList.splice(0, addonList.length, ...res.data);
40
40
  } catch (_error) {
41
41
  // 静默失败:不阻断页面展示
@@ -53,7 +53,7 @@ const environmentInfo = reactive({
53
53
  // 获取数据
54
54
  const fetchData = async () => {
55
55
  try {
56
- const res = await $Http.json("/core/dashboard/environmentInfo", {}, [""]);
56
+ const res = await $Http("/core/dashboard/environmentInfo", {}, [""]);
57
57
  Object.assign(environmentInfo, res.data);
58
58
  } catch (_error) {
59
59
  // 静默失败:不阻断页面展示
@@ -69,7 +69,7 @@ const performanceMetrics = reactive({
69
69
  // 获取数据
70
70
  const fetchData = async () => {
71
71
  try {
72
- const res = await $Http.json("/core/dashboard/performanceMetrics", {}, [""]);
72
+ const res = await $Http("/core/dashboard/performanceMetrics", {}, [""]);
73
73
  Object.assign(performanceMetrics, res.data);
74
74
  } catch (_error) {
75
75
  // 静默失败:不阻断页面展示
@@ -45,7 +45,7 @@ const services = reactive([]);
45
45
  // 获取数据
46
46
  const fetchData = async () => {
47
47
  try {
48
- const res = await $Http.json("/core/dashboard/serviceStatus", {}, [""]);
48
+ const res = await $Http("/core/dashboard/serviceStatus", {}, [""]);
49
49
  services.splice(0, services.length, ...res.data.services);
50
50
  } catch (_error) {
51
51
  // 静默失败:不阻断页面展示
@@ -49,7 +49,7 @@ const permissionStats = reactive({
49
49
  // 获取数据
50
50
  const fetchData = async () => {
51
51
  try {
52
- const res = await $Http.json("/core/dashboard/systemOverview", {}, [""]);
52
+ const res = await $Http("/core/dashboard/systemOverview", {}, [""]);
53
53
  Object.assign(permissionStats, res.data);
54
54
  } catch (_error) {
55
55
  // 静默失败:不阻断页面展示
@@ -54,7 +54,7 @@ const systemResources = reactive({
54
54
  // 获取数据
55
55
  const fetchData = async () => {
56
56
  try {
57
- const res = await $Http.json("/core/dashboard/systemResources", {}, [""]);
57
+ const res = await $Http("/core/dashboard/systemResources", {}, [""]);
58
58
  Object.assign(systemResources, res.data);
59
59
  } catch (_error) {
60
60
  // 静默失败:不阻断页面展示
@@ -52,7 +52,7 @@ const $Data = reactive({
52
52
 
53
53
  async function fetchData() {
54
54
  try {
55
- const res = await $Http.json("/core/admin/detail", {}, [""]);
55
+ const res = await $Http("/core/admin/detail", {}, [""]);
56
56
  Object.assign($Data.userInfo, res.data);
57
57
  } catch (error) {
58
58
  MessagePlugin.error(error.msg || error.message || "获取用户信息失败");
@@ -62,7 +62,7 @@ async function fetchData() {
62
62
  async function handleRefreshCache() {
63
63
  try {
64
64
  $Data.refreshing = true;
65
- const result = await $Http.json("/core/admin/cacheRefresh");
65
+ const result = await $Http("/core/admin/cacheRefresh");
66
66
 
67
67
  const apis = result.data.apis;
68
68
  const menus = result.data.menus;
@@ -145,7 +145,7 @@ async function onSend(reload, context) {
145
145
 
146
146
  $Data.sending = true;
147
147
  try {
148
- const res = await $Http.json("/core/email/send", {
148
+ const res = await $Http("/core/email/send", {
149
149
  to: $Data.sendForm.to,
150
150
  subject: $Data.sendForm.subject,
151
151
  content: $Data.sendForm.content,
@@ -171,7 +171,7 @@ async function onSend(reload, context) {
171
171
 
172
172
  async function onVerify() {
173
173
  try {
174
- await $Http.json("/core/email/verify");
174
+ await $Http("/core/email/verify");
175
175
  MessagePlugin.success("邮件服务配置正常");
176
176
  } catch (error) {
177
177
  MessagePlugin.error(error.msg || error.message || "验证失败");
@@ -103,7 +103,7 @@ async function apiLogin() {
103
103
 
104
104
  const hashedPassword = await hashPassword($Data.formData.password);
105
105
 
106
- const res = await $Http.json("/core/auth/login", {
106
+ const res = await $Http("/core/auth/login", {
107
107
  loginType: $Data.formData.loginType,
108
108
  account: $Data.formData.account,
109
109
  password: hashedPassword
@@ -108,7 +108,7 @@ async function initData() {
108
108
 
109
109
  async function apiRoleLists() {
110
110
  try {
111
- const result = await $Http.json("/core/role/all", {}, [""]);
111
+ const result = await $Http("/core/role/all", {}, [""]);
112
112
  $Data.allRoleLists = result.data || [];
113
113
  } catch (error) {
114
114
  MessagePlugin.error(error.msg || error.message || "加载角色列表失败");
@@ -134,7 +134,7 @@ async function onSubmit(context) {
134
134
  formData["password"] = await hashPassword(password);
135
135
  }
136
136
 
137
- const result = await $Http.json($Prop.actionType === "upd" ? "/core/admin/upd" : "/core/admin/ins", formData);
137
+ const result = await $Http($Prop.actionType === "upd" ? "/core/admin/upd" : "/core/admin/ins", formData);
138
138
 
139
139
  MessagePlugin.success(result.msg);
140
140
  $Emit("success");
@@ -90,7 +90,7 @@ async function initData() {
90
90
  async function loadApiAll() {
91
91
  $Data.loading = true;
92
92
  try {
93
- const res = await $Http.json("/core/api/all", {}, [""]);
93
+ const res = await $Http("/core/api/all", {}, [""]);
94
94
  const list = res.data?.lists || [];
95
95
  $Data.allData = list;
96
96
  $Data.tableData = list;
@@ -60,7 +60,7 @@ async function initData() {
60
60
  async function apiMenuList() {
61
61
  $Data.loading = true;
62
62
  try {
63
- const res = await $Http.json("/core/menu/all", {}, [""]);
63
+ const res = await $Http("/core/menu/all", {}, [""]);
64
64
  const lists = Array.isArray(res?.data?.lists) ? res.data.lists : [];
65
65
 
66
66
  const treeResult = arrayToTree(lists, "path", "parentPath", "children", "sort");
@@ -99,7 +99,7 @@ async function initData() {
99
99
 
100
100
  async function apiApiAll() {
101
101
  try {
102
- const res = await $Http.json("/core/api/all", {}, [""]);
102
+ const res = await $Http("/core/api/all", {}, [""]);
103
103
 
104
104
  const apiMap = new Map();
105
105
 
@@ -160,7 +160,7 @@ async function apiRoleApiDetail() {
160
160
  if (!$Prop.rowData.id) return;
161
161
 
162
162
  try {
163
- const res = await $Http.json(
163
+ const res = await $Http(
164
164
  "/core/role/apis",
165
165
  {
166
166
  roleCode: $Prop.rowData.code
@@ -207,7 +207,7 @@ async function onSubmit(context) {
207
207
  try {
208
208
  $Data.submitting = true;
209
209
 
210
- const res = await $Http.json("/core/role/apiSave", {
210
+ const res = await $Http("/core/role/apiSave", {
211
211
  roleCode: $Prop.rowData.code,
212
212
  apiPaths: $Data.checkedApiPaths
213
213
  });
@@ -113,7 +113,7 @@ async function onSubmit(context) {
113
113
 
114
114
  $Data.submitting = true;
115
115
  const formData = $Prop.actionType === "add" ? fieldClear($Data.formData, { omitKeys: ["id", "state"] }) : $Data.formData;
116
- const res = await $Http.json($Prop.actionType === "upd" ? "/core/role/upd" : "/core/role/ins", formData);
116
+ const res = await $Http($Prop.actionType === "upd" ? "/core/role/upd" : "/core/role/ins", formData);
117
117
 
118
118
  MessagePlugin.success(res.msg);
119
119
  $Emit("success");
@@ -76,7 +76,7 @@ async function initData() {
76
76
 
77
77
  async function apiMenuAll() {
78
78
  try {
79
- const res = await $Http.json("/core/menu/all", {}, [""]);
79
+ const res = await $Http("/core/menu/all", {}, [""]);
80
80
  const lists = Array.isArray(res?.data?.lists) ? res.data.lists : [];
81
81
 
82
82
  const treeResult = arrayToTree(lists, "path", "parentPath", "children", "sort");
@@ -130,7 +130,7 @@ async function apiRoleMenuDetail() {
130
130
  if (!$Prop.rowData.id) return;
131
131
 
132
132
  try {
133
- const res = await $Http.json(
133
+ const res = await $Http(
134
134
  "/core/role/menus",
135
135
  {
136
136
  roleCode: $Prop.rowData.code
@@ -175,7 +175,7 @@ async function onSubmit(context) {
175
175
  try {
176
176
  $Data.submitting = true;
177
177
 
178
- const res = await $Http.json("/core/role/menuSave", {
178
+ const res = await $Http("/core/role/menuSave", {
179
179
  roleCode: $Prop.rowData.code,
180
180
  menuPaths: $Data.checkedMenuPaths
181
181
  });