@befly-addon/admin 1.1.15 → 1.1.19

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/apis/menu/all.ts CHANGED
@@ -18,7 +18,7 @@ export default {
18
18
  });
19
19
 
20
20
  if (!role) {
21
- return befly.tool.No('角色不存在', []);
21
+ return befly.tool.No('角色不存在', { lists: [] });
22
22
  }
23
23
 
24
24
  // 3. 解析菜单ID列表(逗号分隔的字符串)
@@ -28,7 +28,7 @@ export default {
28
28
  .filter((id: number) => !isNaN(id));
29
29
 
30
30
  if (menuIds.length === 0) {
31
- return befly.tool.Yes('菜单为空', []);
31
+ return befly.tool.Yes('菜单为空', { lists: [] });
32
32
  }
33
33
 
34
34
  // 4. 从缓存获取所有菜单
@@ -45,7 +45,7 @@ export default {
45
45
  }
46
46
 
47
47
  if (allMenus.length === 0) {
48
- return befly.tool.Yes('菜单为空', []);
48
+ return befly.tool.Yes('菜单为空', { lists: [] });
49
49
  }
50
50
 
51
51
  // 5. 根据角色权限过滤菜单
@@ -53,7 +53,7 @@ export default {
53
53
  const authorizedMenus = allMenus.filter((menu: any) => menuIdSet.has(String(menu.id)));
54
54
 
55
55
  // 6. 返回一维数组(由前端构建树形结构)
56
- return befly.tool.Yes('获取菜单成功', authorizedMenus);
56
+ return befly.tool.Yes('获取菜单成功', { lists: authorizedMenus });
57
57
  } catch (error: any) {
58
58
  befly.logger.error({ err: error }, '获取用户菜单失败');
59
59
  return befly.tool.No('获取菜单失败');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@befly-addon/admin",
3
- "version": "1.1.15",
3
+ "version": "1.1.19",
4
4
  "title": "管理后台",
5
5
  "description": "Befly - 管理后台功能组件",
6
6
  "type": "module",
@@ -44,10 +44,10 @@
44
44
  "url": "https://github.com/chenbimo/befly.git",
45
45
  "directory": "packages/addon-admin"
46
46
  },
47
- "gitHead": "1f449cb3921fc8536f7392f039a6655b1b07b5e5",
47
+ "gitHead": "f1d08a65a7e98e89da1d42688f1ed96fd06b444d",
48
48
  "dependencies": {
49
- "befly": "^3.9.27",
50
- "befly-shared": "^1.2.3",
49
+ "befly": "^3.9.30",
50
+ "befly-shared": "^1.2.6",
51
51
  "nodemailer": "^7.0.11",
52
52
  "ua-parser-js": "^2.0.7"
53
53
  },
@@ -114,7 +114,7 @@
114
114
  --footer-height: 40px;
115
115
  --search-height: 52px;
116
116
  --pagination-height: 52px;
117
- --detail-width: 260px;
117
+ --detail-width: 300px;
118
118
  --detail-bg: #fafbfc;
119
119
  --layout-gap: 12px;
120
120
  --card-radius: 10px;
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
  <div class="main-content">
20
20
  <div class="main-table">
21
- <TTable :data="$Data.dictList" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - 94px)" active-row-type="single" @active-change="$Method.onActiveChange">
21
+ <TTable :data="$Data.dictList" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - var(--search-height) - var(--pagination-height) - var(--layout-gap) * 4)" active-row-type="single" @active-change="$Method.onActiveChange">
22
22
  <template #state="{ row }">
23
23
  <TTag v-if="row.state === 1" shape="round" theme="success" variant="light-outline">正常</TTag>
24
24
  <TTag v-else-if="row.state === 2" shape="round" theme="warning" variant="light-outline">禁用</TTag>
@@ -19,7 +19,7 @@
19
19
 
20
20
  <div class="main-content">
21
21
  <div class="main-table">
22
- <TTable :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - 94px)" active-row-type="single" @active-change="$Method.onActiveChange">
22
+ <TTable :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - var(--search-height) - var(--pagination-height) - var(--layout-gap) * 4)" active-row-type="single" @active-change="$Method.onActiveChange">
23
23
  <template #state="{ row }">
24
24
  <TTag v-if="row.state === 1" shape="round" theme="success" variant="light-outline">正常</TTag>
25
25
  <TTag v-else-if="row.state === 2" shape="round" theme="warning" variant="light-outline">禁用</TTag>
@@ -20,7 +20,7 @@
20
20
 
21
21
  <div class="main-content">
22
22
  <div class="main-table">
23
- <TTable :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - 94px)" active-row-type="single" @active-change="$Method.onActiveChange">
23
+ <TTable :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - var(--search-height) - var(--layout-gap) * 2)" active-row-type="single" @active-change="$Method.onActiveChange">
24
24
  <template #method="{ row }">
25
25
  <TTag v-if="row.method === 'GET'" shape="round" theme="success" variant="light-outline">GET</TTag>
26
26
  <TTag v-else-if="row.method === 'POST'" shape="round" theme="primary" variant="light-outline">POST</TTag>
@@ -13,7 +13,7 @@
13
13
 
14
14
  <div class="main-content">
15
15
  <div class="main-table">
16
- <TTable v-bind="withTreeTableProps()" :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - 94px)" active-row-type="single" @active-change="$Method.onActiveChange">
16
+ <TTable v-bind="withTreeTableProps()" :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - var(--search-height) - var(--layout-gap) * 2)" active-row-type="single" @active-change="$Method.onActiveChange">
17
17
  <template #state="{ row }">
18
18
  <TTag v-if="row.state === 1" shape="round" theme="success" variant="light-outline">正常</TTag>
19
19
  <TTag v-else-if="row.state === 2" shape="round" theme="warning" variant="light-outline">禁用</TTag>
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
  <div class="main-content">
20
20
  <div class="main-table">
21
- <TTable :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - 94px)" active-row-type="single" @active-change="$Method.onActiveChange">
21
+ <TTable :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - var(--search-height) - var(--pagination-height) - var(--layout-gap) * 4)" active-row-type="single" @active-change="$Method.onActiveChange">
22
22
  <template #state="{ row }">
23
23
  <TTag v-if="row.state === 1" shape="round" theme="success" variant="light-outline">正常</TTag>
24
24
  <TTag v-else-if="row.state === 2" shape="round" theme="warning" variant="light-outline">禁用</TTag>