@befly-addon/admin 1.1.29 → 1.1.31

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.
Files changed (123) hide show
  1. package/apis/admin/cacheRefresh.ts +29 -24
  2. package/apis/admin/del.ts +12 -12
  3. package/apis/admin/detail.ts +9 -41
  4. package/apis/admin/ins.ts +28 -21
  5. package/apis/admin/list.ts +12 -12
  6. package/apis/admin/upd.ts +49 -14
  7. package/apis/api/all.ts +14 -10
  8. package/apis/api/list.ts +16 -25
  9. package/apis/auth/login.ts +55 -52
  10. package/apis/auth/sendSmsCode.ts +6 -6
  11. package/apis/dashboard/configStatus.ts +18 -18
  12. package/apis/dashboard/environmentInfo.ts +12 -12
  13. package/apis/dashboard/performanceMetrics.ts +5 -5
  14. package/apis/dashboard/permissionStats.ts +7 -7
  15. package/apis/dashboard/serviceStatus.ts +29 -29
  16. package/apis/dashboard/systemInfo.ts +5 -5
  17. package/apis/dashboard/systemOverview.ts +7 -7
  18. package/apis/dashboard/systemResources.ts +8 -8
  19. package/apis/dict/all.ts +24 -7
  20. package/apis/dict/del.ts +9 -17
  21. package/apis/dict/detail.ts +30 -16
  22. package/apis/dict/ins.ts +36 -18
  23. package/apis/dict/items.ts +27 -0
  24. package/apis/dict/list.ts +35 -10
  25. package/apis/dict/upd.ts +54 -20
  26. package/apis/dictType/all.ts +11 -0
  27. package/apis/dictType/del.ts +32 -0
  28. package/apis/dictType/detail.ts +17 -0
  29. package/apis/dictType/ins.ts +30 -0
  30. package/apis/dictType/list.ts +22 -0
  31. package/apis/dictType/upd.ts +42 -0
  32. package/apis/email/config.ts +4 -4
  33. package/apis/email/logList.ts +10 -10
  34. package/apis/email/send.ts +18 -18
  35. package/apis/email/verify.ts +5 -5
  36. package/apis/loginLog/list.ts +10 -10
  37. package/apis/menu/all.ts +17 -20
  38. package/apis/menu/list.ts +12 -13
  39. package/apis/operateLog/list.ts +10 -10
  40. package/apis/role/all.ts +7 -7
  41. package/apis/role/apiSave.ts +14 -16
  42. package/apis/role/apis.ts +24 -0
  43. package/apis/role/del.ts +27 -19
  44. package/apis/role/detail.ts +6 -7
  45. package/apis/role/ins.ts +10 -10
  46. package/apis/role/list.ts +11 -11
  47. package/apis/role/menuSave.ts +12 -14
  48. package/apis/role/menus.ts +24 -0
  49. package/apis/role/save.ts +14 -15
  50. package/apis/role/upd.ts +10 -10
  51. package/apis/sysConfig/all.ts +5 -6
  52. package/apis/sysConfig/del.ts +10 -10
  53. package/apis/sysConfig/get.ts +10 -11
  54. package/apis/sysConfig/ins.ts +11 -11
  55. package/apis/sysConfig/list.ts +9 -9
  56. package/apis/sysConfig/upd.ts +11 -11
  57. package/libs/emailHelper.ts +7 -7
  58. package/package.json +46 -34
  59. package/plugins/email.ts +9 -9
  60. package/tables/admin.json +0 -6
  61. package/tables/dict.json +13 -19
  62. package/tables/dictType.json +28 -0
  63. package/tables/role.json +4 -2
  64. package/views/403_1/index.vue +19 -3
  65. package/views/config/dict/components/edit.vue +76 -124
  66. package/views/config/dict/index.vue +142 -84
  67. package/views/config/dictType/components/edit.vue +105 -0
  68. package/views/config/dictType/index.vue +242 -0
  69. package/views/config/index.vue +12 -0
  70. package/views/config/system/components/edit.vue +36 -36
  71. package/views/config/system/index.vue +79 -50
  72. package/views/index/components/addonList.vue +3 -3
  73. package/views/index/components/environmentInfo.vue +10 -10
  74. package/views/index/components/operationLogs.vue +10 -10
  75. package/views/index/components/performanceMetrics.vue +8 -8
  76. package/views/index/components/quickActions.vue +3 -3
  77. package/views/index/components/serviceStatus.vue +19 -19
  78. package/views/index/components/systemNotifications.vue +12 -12
  79. package/views/index/components/systemOverview.vue +7 -7
  80. package/views/index/components/systemResources.vue +11 -11
  81. package/views/index/components/userInfo.vue +20 -19
  82. package/views/index/index.vue +12 -5
  83. package/views/log/email/index.vue +58 -51
  84. package/views/log/index.vue +12 -0
  85. package/views/log/login/index.vue +45 -38
  86. package/views/log/operate/index.vue +55 -48
  87. package/views/login_1/index.vue +191 -2
  88. package/views/people/admin/components/edit.vue +28 -29
  89. package/views/people/admin/index.vue +76 -40
  90. package/views/people/index.vue +12 -0
  91. package/views/permission/api/index.vue +21 -15
  92. package/views/permission/index.vue +12 -0
  93. package/views/permission/menu/index.vue +31 -16
  94. package/views/permission/role/components/api.vue +23 -23
  95. package/views/permission/role/components/edit.vue +18 -18
  96. package/views/permission/role/components/menu.vue +17 -19
  97. package/views/permission/role/index.vue +84 -49
  98. package/apis/admin/roleDetail.ts +0 -29
  99. package/apis/admin/roleSave.ts +0 -39
  100. package/apis/auth/logout.ts +0 -17
  101. package/apis/auth/register.ts +0 -43
  102. package/apis/dashboard/changelog.ts +0 -31
  103. package/apis/role/apiDetail.ts +0 -24
  104. package/apis/role/menuDetail.ts +0 -24
  105. package/views/403_1/meta.json +0 -4
  106. package/views/config/dict/meta.json +0 -4
  107. package/views/config/meta.json +0 -4
  108. package/views/config/system/meta.json +0 -4
  109. package/views/index/meta.json +0 -4
  110. package/views/log/email/meta.json +0 -4
  111. package/views/log/login/meta.json +0 -4
  112. package/views/log/meta.json +0 -4
  113. package/views/log/operate/meta.json +0 -4
  114. package/views/login_1/components/emailLoginForm.vue +0 -174
  115. package/views/login_1/components/registerForm.vue +0 -175
  116. package/views/login_1/components/welcomePanel.vue +0 -61
  117. package/views/login_1/meta.json +0 -4
  118. package/views/people/admin/meta.json +0 -4
  119. package/views/people/meta.json +0 -4
  120. package/views/permission/api/meta.json +0 -4
  121. package/views/permission/menu/meta.json +0 -4
  122. package/views/permission/meta.json +0 -4
  123. package/views/permission/role/meta.json +0 -4
@@ -1,33 +1,33 @@
1
1
  export default {
2
- name: '删除系统配置',
2
+ name: "删除系统配置",
3
3
  fields: {
4
- id: '@id'
4
+ id: "@id"
5
5
  },
6
6
  handler: async (befly, ctx) => {
7
7
  try {
8
8
  // 检查是否为系统配置
9
9
  const config = await befly.db.getDetail({
10
- table: 'addon_admin_sys_config',
10
+ table: "addon_admin_sys_config",
11
11
  where: { id: ctx.body.id }
12
12
  });
13
13
 
14
- if (!config) {
15
- return befly.tool.No('配置不存在');
14
+ if (!config?.id) {
15
+ return befly.tool.No("配置不存在");
16
16
  }
17
17
 
18
18
  if (config.isSystem === 1) {
19
- return befly.tool.No('系统配置不允许删除');
19
+ return befly.tool.No("系统配置不允许删除");
20
20
  }
21
21
 
22
22
  await befly.db.delData({
23
- table: 'addon_admin_sys_config',
23
+ table: "addon_admin_sys_config",
24
24
  where: { id: ctx.body.id }
25
25
  });
26
26
 
27
- return befly.tool.Yes('操作成功');
27
+ return befly.tool.Yes("操作成功");
28
28
  } catch (error) {
29
- befly.logger.error({ err: error }, '删除系统配置失败');
30
- return befly.tool.No('操作失败');
29
+ befly.logger.error({ err: error }, "删除系统配置失败");
30
+ return befly.tool.No("操作失败");
31
31
  }
32
32
  }
33
33
  };
@@ -1,27 +1,26 @@
1
1
  export default {
2
- name: '根据代码获取配置值',
2
+ name: "根据代码获取配置值",
3
3
  auth: false,
4
4
  fields: {
5
- code: { name: '配置代码', type: 'string', min: 1, max: 50 }
5
+ code: { name: "配置代码", type: "string", min: 1, max: 50 }
6
6
  },
7
7
  handler: async (befly, ctx) => {
8
8
  const config = await befly.db.getDetail({
9
- table: 'addon_admin_sys_config',
10
- fields: ['code', 'value', 'valueType'],
9
+ table: "addon_admin_sys_config",
11
10
  where: { code: ctx.body.code }
12
11
  });
13
12
 
14
- if (!config) {
15
- return befly.tool.No('配置不存在');
13
+ if (!config?.id) {
14
+ return befly.tool.No("配置不存在");
16
15
  }
17
16
 
18
17
  // 根据类型转换值
19
18
  let value = config.value;
20
- if (config.valueType === 'number') {
19
+ if (config.valueType === "number") {
21
20
  value = Number(config.value);
22
- } else if (config.valueType === 'boolean') {
23
- value = config.value === 'true' || config.value === '1';
24
- } else if (config.valueType === 'json') {
21
+ } else if (config.valueType === "boolean") {
22
+ value = config.value === "true" || config.value === "1";
23
+ } else if (config.valueType === "json") {
25
24
  try {
26
25
  value = JSON.parse(config.value);
27
26
  } catch {
@@ -29,6 +28,6 @@ export default {
29
28
  }
30
29
  }
31
30
 
32
- return befly.tool.Yes('操作成功', { code: config.code, value: value });
31
+ return befly.tool.Yes("操作成功", { code: config.code, value: value });
33
32
  }
34
33
  };
@@ -1,38 +1,38 @@
1
- import sysConfigTable from '../../tables/sysConfig.json';
1
+ import sysConfigTable from "../../tables/sysConfig.json";
2
2
 
3
3
  export default {
4
- name: '添加系统配置',
4
+ name: "添加系统配置",
5
5
  fields: sysConfigTable,
6
6
  handler: async (befly, ctx) => {
7
7
  try {
8
8
  // 检查 code 是否已存在
9
9
  const existing = await befly.db.getDetail({
10
- table: 'addon_admin_sys_config',
10
+ table: "addon_admin_sys_config",
11
11
  where: { code: ctx.body.code }
12
12
  });
13
13
 
14
14
  if (existing) {
15
- return befly.tool.No('配置代码已存在');
15
+ return befly.tool.No("配置代码已存在");
16
16
  }
17
17
 
18
18
  const configId = await befly.db.insData({
19
- table: 'addon_admin_sys_config',
19
+ table: "addon_admin_sys_config",
20
20
  data: {
21
21
  name: ctx.body.name,
22
22
  code: ctx.body.code,
23
23
  value: ctx.body.value,
24
- valueType: ctx.body.valueType || 'string',
25
- group: ctx.body.group || '',
24
+ valueType: ctx.body.valueType || "string",
25
+ group: ctx.body.group || "",
26
26
  sort: ctx.body.sort || 0,
27
27
  isSystem: ctx.body.isSystem || 0,
28
- description: ctx.body.description || ''
28
+ description: ctx.body.description || ""
29
29
  }
30
30
  });
31
31
 
32
- return befly.tool.Yes('操作成功', { id: configId });
32
+ return befly.tool.Yes("操作成功", { id: configId });
33
33
  } catch (error) {
34
- befly.logger.error({ err: error }, '添加系统配置失败');
35
- return befly.tool.No('操作失败');
34
+ befly.logger.error({ err: error }, "添加系统配置失败");
35
+ return befly.tool.No("操作失败");
36
36
  }
37
37
  }
38
38
  };
@@ -1,20 +1,20 @@
1
1
  export default {
2
- name: '获取系统配置列表',
2
+ name: "获取系统配置列表",
3
3
  fields: {
4
- page: '@page',
5
- limit: '@limit',
6
- keyword: '@keyword',
7
- state: '@state'
4
+ page: "@page",
5
+ limit: "@limit",
6
+ keyword: "@keyword",
7
+ state: "@state"
8
8
  },
9
9
  handler: async (befly, ctx) => {
10
10
  const result = await befly.db.getList({
11
- table: 'addon_admin_sys_config',
12
- fields: ['id', 'name', 'code', 'value', 'valueType', 'group', 'sort', 'isSystem', 'description', 'state', 'createdAt', 'updatedAt'],
11
+ table: "addon_admin_sys_config",
12
+ fields: ["id", "name", "code", "value", "valueType", "group", "sort", "isSystem", "description", "state", "createdAt", "updatedAt"],
13
13
  page: ctx.body.page,
14
14
  limit: ctx.body.limit,
15
- orderBy: ['group#ASC', 'sort#ASC', 'id#ASC']
15
+ orderBy: ["group#ASC", "sort#ASC", "id#ASC"]
16
16
  });
17
17
 
18
- return befly.tool.Yes('操作成功', result);
18
+ return befly.tool.Yes("操作成功", result);
19
19
  }
20
20
  };
@@ -1,27 +1,27 @@
1
- import sysConfigTable from '../../tables/sysConfig.json';
1
+ import sysConfigTable from "../../tables/sysConfig.json";
2
2
 
3
3
  export default {
4
- name: '更新系统配置',
4
+ name: "更新系统配置",
5
5
  fields: {
6
- id: '@id',
6
+ id: "@id",
7
7
  ...sysConfigTable
8
8
  },
9
9
  handler: async (befly, ctx) => {
10
10
  try {
11
11
  // 检查是否为系统配置
12
12
  const config = await befly.db.getDetail({
13
- table: 'addon_admin_sys_config',
13
+ table: "addon_admin_sys_config",
14
14
  where: { id: ctx.body.id }
15
15
  });
16
16
 
17
- if (!config) {
18
- return befly.tool.No('配置不存在');
17
+ if (!config?.id) {
18
+ return befly.tool.No("配置不存在");
19
19
  }
20
20
 
21
21
  // 系统配置只能修改 value
22
22
  if (config.isSystem === 1) {
23
23
  await befly.db.updData({
24
- table: 'addon_admin_sys_config',
24
+ table: "addon_admin_sys_config",
25
25
  data: {
26
26
  value: ctx.body.value
27
27
  },
@@ -29,7 +29,7 @@ export default {
29
29
  });
30
30
  } else {
31
31
  await befly.db.updData({
32
- table: 'addon_admin_sys_config',
32
+ table: "addon_admin_sys_config",
33
33
  data: {
34
34
  name: ctx.body.name,
35
35
  code: ctx.body.code,
@@ -44,10 +44,10 @@ export default {
44
44
  });
45
45
  }
46
46
 
47
- return befly.tool.Yes('操作成功');
47
+ return befly.tool.Yes("操作成功");
48
48
  } catch (error) {
49
- befly.logger.error({ err: error }, '更新系统配置失败');
50
- return befly.tool.No('操作失败');
49
+ befly.logger.error({ err: error }, "更新系统配置失败");
50
+ return befly.tool.No("操作失败");
51
51
  }
52
52
  }
53
53
  };
@@ -3,10 +3,10 @@
3
3
  * 提供邮件发送功能,支持 SMTP 配置
4
4
  */
5
5
 
6
- import nodemailer from 'nodemailer';
6
+ import type { BeflyContext } from "befly/types/befly";
7
+ import type { Transporter } from "nodemailer";
7
8
 
8
- import type { Transporter } from 'nodemailer';
9
- import type { BeflyContext } from 'befly/types/befly.js';
9
+ import nodemailer from "nodemailer";
10
10
 
11
11
  /** 邮件配置 */
12
12
  export interface EmailConfig {
@@ -80,7 +80,7 @@ export class EmailHelper {
80
80
  if (!this.transporter) {
81
81
  return {
82
82
  success: false,
83
- error: '邮件服务未配置,请检查 SMTP 配置'
83
+ error: "邮件服务未配置,请检查 SMTP 配置"
84
84
  };
85
85
  }
86
86
 
@@ -104,7 +104,7 @@ export class EmailHelper {
104
104
  } catch (error: any) {
105
105
  return {
106
106
  success: false,
107
- error: error.message || '发送失败'
107
+ error: error.message || "发送失败"
108
108
  };
109
109
  }
110
110
  }
@@ -128,10 +128,10 @@ export class EmailHelper {
128
128
  /**
129
129
  * 获取当前配置(隐藏密码)
130
130
  */
131
- getConfig(): Omit<EmailConfig, 'pass'> & { pass: string } {
131
+ getConfig(): Omit<EmailConfig, "pass"> & { pass: string } {
132
132
  return {
133
133
  ...this.config,
134
- pass: this.config.pass ? '******' : ''
134
+ pass: this.config.pass ? "******" : ""
135
135
  };
136
136
  }
137
137
  }
package/package.json CHANGED
@@ -1,58 +1,70 @@
1
1
  {
2
2
  "name": "@befly-addon/admin",
3
- "version": "1.1.29",
4
- "title": "管理后台",
5
- "description": "Befly - 管理后台功能组件",
6
- "type": "module",
3
+ "version": "1.1.31",
7
4
  "private": false,
8
- "publishConfig": {
9
- "access": "public",
10
- "registry": "https://registry.npmjs.org"
5
+ "description": "Befly - 管理后台功能组件",
6
+ "keywords": [
7
+ "addon",
8
+ "admin",
9
+ "auth",
10
+ "befly",
11
+ "rbac",
12
+ "typescript"
13
+ ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/chenbimo/befly.git",
17
+ "directory": "packages/addon-admin"
11
18
  },
19
+ "author": "chenbimo",
20
+ "license": "Apache-2.0",
21
+ "type": "module",
12
22
  "main": "package.json",
13
23
  "exports": {
14
24
  ".": "./package.json",
15
25
  "./styles/*": "./styles/*"
16
26
  },
17
- "scripts": {
18
- "dev": "vite",
19
- "build": "vite build",
20
- "preview": "vite preview"
21
- },
22
27
  "files": [
28
+ "README.md",
23
29
  "apis",
24
30
  "libs",
31
+ "package.json",
25
32
  "plugins",
26
33
  "styles",
27
34
  "tables",
28
- "views",
29
- "package.json",
30
- "README.md"
35
+ "views"
31
36
  ],
32
- "keywords": [
33
- "befly",
34
- "addon",
35
- "admin",
36
- "rbac",
37
- "auth",
38
- "typescript"
39
- ],
40
- "author": "chenbimo",
41
- "license": "Apache-2.0",
42
- "repository": {
43
- "type": "git",
44
- "url": "https://github.com/chenbimo/befly.git",
45
- "directory": "packages/addon-admin"
37
+ "scripts": {
38
+ "dev": "vite",
39
+ "build": "vite build",
40
+ "preview": "vite preview"
46
41
  },
47
- "gitHead": "e078b94f087ddf21f289b55ab86c0b8dce105807",
48
42
  "dependencies": {
49
- "befly": "^3.9.37",
50
- "befly-shared": "^1.2.8",
43
+ "befly": "^3.9.39",
44
+ "befly-vite": "^1.1.12",
51
45
  "nodemailer": "^7.0.11",
52
46
  "ua-parser-js": "^2.0.7"
53
47
  },
54
48
  "devDependencies": {
49
+ "@iconify-json/lucide": "^1.2.80",
55
50
  "@types/nodemailer": "^7.0.4",
56
- "@types/ua-parser-js": "^0.7.39"
57
- }
51
+ "@types/ua-parser-js": "^0.7.39",
52
+ "pinia": "^3.0.4",
53
+ "tdesign-vue-next": "^1.17.7",
54
+ "vue": "^3.5.26",
55
+ "vue-router": "^4.6.4"
56
+ },
57
+ "peerDependencies": {
58
+ "@iconify-json/lucide": "^1.2.80",
59
+ "pinia": "^3.0.4",
60
+ "tdesign-vue-next": "^1.17.7",
61
+ "vue": "^3.5.26",
62
+ "vue-router": "^4.6.4"
63
+ },
64
+ "publishConfig": {
65
+ "access": "public",
66
+ "registry": "https://registry.npmjs.org"
67
+ },
68
+ "gitHead": "d42bf60ba6b8b11fef7e759fa008ada075829772",
69
+ "title": "管理后台"
58
70
  }
package/plugins/email.ts CHANGED
@@ -3,27 +3,27 @@
3
3
  * 提供邮件发送功能,支持 SMTP 配置
4
4
  */
5
5
 
6
- import { EmailHelper } from '../libs/emailHelper.js';
6
+ import type { EmailConfig } from "../libs/emailHelper.js";
7
+ import type { BeflyContext } from "befly/types/befly";
8
+ import type { Plugin } from "befly/types/plugin";
7
9
 
8
- import type { EmailConfig } from '../libs/emailHelper.js';
9
- import type { Plugin } from 'befly/types/plugin.js';
10
- import type { BeflyContext } from 'befly/types/befly.js';
10
+ import { EmailHelper } from "../libs/emailHelper.js";
11
11
 
12
12
  /** 默认配置 */
13
13
  const defaultConfig: EmailConfig = {
14
- host: 'smtp.qq.com',
14
+ host: "smtp.qq.com",
15
15
  port: 465,
16
16
  secure: true,
17
- user: '',
18
- pass: '',
19
- fromName: 'Befly System'
17
+ user: "",
18
+ pass: "",
19
+ fromName: "Befly System"
20
20
  };
21
21
 
22
22
  /**
23
23
  * 邮件插件
24
24
  */
25
25
  const emailPlugin: Plugin = {
26
- after: ['db', 'logger', 'config'],
26
+ after: ["db", "logger", "config"],
27
27
  async handler(befly: BeflyContext): Promise<EmailHelper> {
28
28
  // 从 befly.config.addons.admin.email 获取配置
29
29
  const addonEmailConfig = befly.config?.addons?.admin?.email || {};
package/tables/admin.json CHANGED
@@ -35,12 +35,6 @@
35
35
  "type": "string",
36
36
  "max": 500
37
37
  },
38
- "roleId": {
39
- "name": "角色ID",
40
- "type": "number",
41
- "min": 1,
42
- "index": true
43
- },
44
38
  "roleCode": {
45
39
  "name": "角色编码",
46
40
  "type": "string",
package/tables/dict.json CHANGED
@@ -1,24 +1,25 @@
1
1
  {
2
- "name": {
3
- "name": "字典名称",
2
+ "typeCode": {
3
+ "name": "字典类型代码",
4
4
  "type": "string",
5
5
  "min": 2,
6
6
  "max": 50,
7
- "index": true
7
+ "index": true,
8
+ "regexp": "@alphanumeric_"
8
9
  },
9
- "code": {
10
- "name": "字典代码",
10
+ "key": {
11
+ "name": "字典键",
11
12
  "type": "string",
12
- "min": 2,
13
+ "min": 1,
13
14
  "max": 50,
14
15
  "index": true,
15
16
  "regexp": "@alphanumeric_"
16
17
  },
17
- "value": {
18
- "name": "字典值",
18
+ "label": {
19
+ "name": "字典标签",
19
20
  "type": "string",
20
- "max": 200,
21
- "index": true
21
+ "min": 1,
22
+ "max": 100
22
23
  },
23
24
  "sort": {
24
25
  "name": "排序",
@@ -27,15 +28,8 @@
27
28
  "max": 9999,
28
29
  "default": 0
29
30
  },
30
- "pid": {
31
- "name": "父级ID",
32
- "type": "number",
33
- "min": 0,
34
- "default": 0,
35
- "index": true
36
- },
37
- "description": {
38
- "name": "描述",
31
+ "remark": {
32
+ "name": "备注",
39
33
  "type": "string",
40
34
  "max": 200
41
35
  }
@@ -0,0 +1,28 @@
1
+ {
2
+ "code": {
3
+ "name": "类型代码",
4
+ "type": "string",
5
+ "min": 2,
6
+ "max": 50,
7
+ "unique": true,
8
+ "regexp": "@alphanumeric_"
9
+ },
10
+ "name": {
11
+ "name": "类型名称",
12
+ "type": "string",
13
+ "min": 2,
14
+ "max": 50
15
+ },
16
+ "description": {
17
+ "name": "描述",
18
+ "type": "string",
19
+ "max": 200
20
+ },
21
+ "sort": {
22
+ "name": "排序",
23
+ "type": "number",
24
+ "min": 0,
25
+ "max": 9999,
26
+ "default": 0
27
+ }
28
+ }
package/tables/role.json CHANGED
@@ -21,11 +21,13 @@
21
21
  },
22
22
  "menus": {
23
23
  "name": "菜单权限",
24
- "type": "array_text"
24
+ "type": "array_number_text",
25
+ "detail": "菜单ID数组,如 [1,2,3]"
25
26
  },
26
27
  "apis": {
27
28
  "name": "接口权限",
28
- "type": "array_text"
29
+ "type": "array_number_text",
30
+ "detail": "接口ID数组,如 [1,2,3]"
29
31
  },
30
32
  "sort": {
31
33
  "name": "排序",
@@ -13,14 +13,21 @@
13
13
  </template>
14
14
 
15
15
  <script setup>
16
- import { useRouter } from 'vue-router';
17
- import { Button as TButton } from 'tdesign-vue-next';
16
+ import { useRouter } from "vue-router";
17
+ import { Button as TButton } from "tdesign-vue-next";
18
+
19
+ definePage({
20
+ meta: {
21
+ title: "403",
22
+ order: 101
23
+ }
24
+ });
18
25
 
19
26
  const router = useRouter();
20
27
 
21
28
  const $Method = {
22
29
  goHome() {
23
- router.push('/');
30
+ router.push("/");
24
31
  },
25
32
  goBack() {
26
33
  router.back();
@@ -56,4 +63,13 @@ const $Method = {
56
63
  .error-description {
57
64
  font-size: 16px;
58
65
  color: var(--text-secondary);
66
+ margin: 8px 0 24px;
67
+ }
68
+
69
+ .error-actions {
70
+ display: flex;
71
+ gap: 12px;
72
+ justify-content: center;
73
+ }
74
+ }
59
75
  </style>