@yuku123/z-meta-component 0.1.1 → 0.1.2

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/dist/pages.js CHANGED
@@ -1,26 +1,27 @@
1
- import { j as e, r as m, M as ye } from "./MetaApp-DCN9NQdA.js";
2
- import { c as Ke } from "./MetaApp-DCN9NQdA.js";
3
- import { UserOutlined as H, LockOutlined as Z, AppstoreOutlined as ee, BookOutlined as te, ApiOutlined as ae, PlusOutlined as $, EditOutlined as B, DeleteOutlined as R, HomeOutlined as ge, DashboardOutlined as fe } from "@ant-design/icons";
1
+ import { j as e, r as m, C as ye, M as ge } from "./ComponentDoc-IVc3HvAO.js";
2
+ import { c as Ge } from "./ComponentDoc-IVc3HvAO.js";
3
+ import { UserOutlined as H, LockOutlined as Z, AppstoreOutlined as ee, BookOutlined as te, ApiOutlined as ae, PlusOutlined as q, EditOutlined as R, DeleteOutlined as K, HomeOutlined as fe, DashboardOutlined as Ie, ReadOutlined as be } from "@ant-design/icons";
4
4
  import { useState as d, useEffect as _ } from "react";
5
5
  import { useNavigate as ne } from "react-router-dom";
6
- import { Card as D, Form as a, Input as l, Button as p, message as s, Row as se, Col as q, Statistic as J, Tag as ie, Select as I, Table as U, Modal as K, Space as E, Popconfirm as W, Tabs as re, Typography as Ie } from "antd";
7
- function Me() {
8
- const j = ne(), [c, x] = d(!1), u = async (n) => {
9
- x(!0);
6
+ import { Card as D, Form as a, Input as l, Button as x, message as i, Row as se, Col as $, Statistic as J, Tag as ie, Select as I, Modal as U, Space as z, Popconfirm as B, Tabs as re, Typography as ke } from "antd";
7
+ import { ListTable as W } from "@yuku123/z-frontend-common/ui";
8
+ function Re() {
9
+ const j = ne(), [c, p] = d(!1), h = async (n) => {
10
+ p(!0);
10
11
  try {
11
- const w = "mock-token-" + Date.now();
12
- localStorage.setItem("token", w), localStorage.setItem("username", n.username), s.success("登录成功"), j("/z-meta/dashboard");
13
- } catch (w) {
14
- s.error(w.message || "登录失败");
12
+ const T = "mock-token-" + Date.now();
13
+ localStorage.setItem("token", T), localStorage.setItem("username", n.username), i.success("登录成功"), j("/z-meta/dashboard");
14
+ } catch (T) {
15
+ i.error(T.message || "登录失败");
15
16
  } finally {
16
- x(!1);
17
+ p(!1);
17
18
  }
18
19
  };
19
20
  return /* @__PURE__ */ e.jsx("div", { className: "login-container", children: /* @__PURE__ */ e.jsx(D, { className: "login-card", title: "z-meta 元数据平台", bordered: !1, children: /* @__PURE__ */ e.jsxs(
20
21
  a,
21
22
  {
22
23
  name: "login",
23
- onFinish: u,
24
+ onFinish: h,
24
25
  autoComplete: "off",
25
26
  children: [
26
27
  /* @__PURE__ */ e.jsx(
@@ -53,16 +54,16 @@ function Me() {
53
54
  )
54
55
  }
55
56
  ),
56
- /* @__PURE__ */ e.jsx(a.Item, { children: /* @__PURE__ */ e.jsx(p, { type: "primary", htmlType: "submit", loading: c, block: !0, size: "large", children: "登录" }) })
57
+ /* @__PURE__ */ e.jsx(a.Item, { children: /* @__PURE__ */ e.jsx(x, { type: "primary", htmlType: "submit", loading: c, block: !0, size: "large", children: "登录" }) })
57
58
  ]
58
59
  }
59
60
  ) }) });
60
61
  }
61
- function be() {
62
+ function we() {
62
63
  return /* @__PURE__ */ e.jsxs("div", { children: [
63
64
  /* @__PURE__ */ e.jsx("h1", { children: "欢迎使用 z-meta 元数据平台" }),
64
65
  /* @__PURE__ */ e.jsxs(se, { gutter: 16, children: [
65
- /* @__PURE__ */ e.jsx(q, { span: 6, children: /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(
66
+ /* @__PURE__ */ e.jsx($, { span: 6, children: /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(
66
67
  J,
67
68
  {
68
69
  title: "租户数量",
@@ -70,7 +71,7 @@ function be() {
70
71
  prefix: /* @__PURE__ */ e.jsx(H, {})
71
72
  }
72
73
  ) }) }),
73
- /* @__PURE__ */ e.jsx(q, { span: 6, children: /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(
74
+ /* @__PURE__ */ e.jsx($, { span: 6, children: /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(
74
75
  J,
75
76
  {
76
77
  title: "应用数量",
@@ -78,7 +79,7 @@ function be() {
78
79
  prefix: /* @__PURE__ */ e.jsx(ee, {})
79
80
  }
80
81
  ) }) }),
81
- /* @__PURE__ */ e.jsx(q, { span: 6, children: /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(
82
+ /* @__PURE__ */ e.jsx($, { span: 6, children: /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(
82
83
  J,
83
84
  {
84
85
  title: "字典类型",
@@ -86,7 +87,7 @@ function be() {
86
87
  prefix: /* @__PURE__ */ e.jsx(te, {})
87
88
  }
88
89
  ) }) }),
89
- /* @__PURE__ */ e.jsx(q, { span: 6, children: /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(
90
+ /* @__PURE__ */ e.jsx($, { span: 6, children: /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(
90
91
  J,
91
92
  {
92
93
  title: "接口数量",
@@ -97,7 +98,7 @@ function be() {
97
98
  ] })
98
99
  ] });
99
100
  }
100
- const ke = {
101
+ const Te = {
101
102
  active: "green",
102
103
  1: "green",
103
104
  true: "green",
@@ -114,52 +115,52 @@ const ke = {
114
115
  false: "停用",
115
116
  deleted: "已删除"
116
117
  };
117
- function we({ status: j, tenantCode: c }) {
118
- const x = String(j), u = ke[x] || "default", n = ve[x] || j;
119
- return /* @__PURE__ */ e.jsx(ie, { color: u, children: c ? `${c} · ${n}` : n });
118
+ function Ce({ status: j, tenantCode: c }) {
119
+ const p = String(j), h = Te[p] || "default", n = ve[p] || j;
120
+ return /* @__PURE__ */ e.jsx(ie, { color: h, children: c ? `${c} · ${n}` : n });
120
121
  }
121
122
  const { Option: M } = I;
122
- function Te() {
123
- const [j, c] = d([]), [x, u] = d(!1), [n, w] = d({ current: 1, pageSize: 10, total: 0 }), [S, h] = d(!1), [f, T] = d(null), [o] = a.useForm(), y = async (t = 1, r = 10) => {
124
- u(!0);
123
+ function De() {
124
+ const [j, c] = d([]), [p, h] = d(!1), [n, T] = d({ current: 1, pageSize: 10, total: 0 }), [S, u] = d(!1), [f, v] = d(null), [o] = a.useForm(), y = async (t = 1, r = 10) => {
125
+ h(!0);
125
126
  try {
126
127
  const b = await m.get("/tenant/list", {
127
128
  params: { pageNum: t, pageSize: r }
128
129
  });
129
- c(b.data.records || []), w({
130
+ c(b.data.records || []), T({
130
131
  current: t,
131
132
  pageSize: r,
132
133
  total: b.data.total || 0
133
134
  });
134
135
  } catch {
135
- s.error("获取数据失败");
136
+ i.error("获取数据失败");
136
137
  } finally {
137
- u(!1);
138
+ h(!1);
138
139
  }
139
140
  };
140
141
  _(() => {
141
142
  y();
142
143
  }, []);
143
- const z = (t) => {
144
+ const O = (t) => {
144
145
  y(t.current, t.pageSize);
145
146
  }, V = () => {
146
- T(null), o.resetFields(), h(!0);
147
+ v(null), o.resetFields(), u(!0);
147
148
  }, C = (t) => {
148
- T(t), o.setFieldsValue(t), h(!0);
149
+ v(t), o.setFieldsValue(t), u(!0);
149
150
  }, k = async (t) => {
150
151
  try {
151
- await m.delete(`/tenant/${t}`), s.success("删除成功"), y(n.current, n.pageSize);
152
+ await m.delete(`/tenant/${t}`), i.success("删除成功"), y(n.current, n.pageSize);
152
153
  } catch {
153
- s.error("删除失败");
154
+ i.error("删除失败");
154
155
  }
155
- }, O = async () => {
156
+ }, P = async () => {
156
157
  try {
157
158
  const t = await o.validateFields();
158
- f ? (await m.put(`/tenant/${f.id}`, t), s.success("更新成功")) : (await m.post("/tenant", t), s.success("创建成功")), h(!1), y(n.current, n.pageSize);
159
+ f ? (await m.put(`/tenant/${f.id}`, t), i.success("更新成功")) : (await m.post("/tenant", t), i.success("创建成功")), u(!1), y(n.current, n.pageSize);
159
160
  } catch {
160
- s.error("操作失败");
161
+ i.error("操作失败");
161
162
  }
162
- }, F = [
163
+ }, E = [
163
164
  {
164
165
  title: "ID",
165
166
  dataIndex: "id",
@@ -186,7 +187,7 @@ function Te() {
186
187
  title: "状态",
187
188
  dataIndex: "status",
188
189
  key: "status",
189
- render: (t) => /* @__PURE__ */ e.jsx(we, { status: t })
190
+ render: (t) => /* @__PURE__ */ e.jsx(Ce, { status: t })
190
191
  },
191
192
  {
192
193
  title: "描述",
@@ -201,32 +202,41 @@ function Te() {
201
202
  {
202
203
  title: "操作",
203
204
  key: "action",
204
- render: (t, r) => /* @__PURE__ */ e.jsxs(E, { children: [
205
- /* @__PURE__ */ e.jsx(p, { type: "link", icon: /* @__PURE__ */ e.jsx(B, {}), onClick: () => C(r), children: "编辑" }),
206
- /* @__PURE__ */ e.jsx(W, { title: "确定删除?", onConfirm: () => k(r.id), children: /* @__PURE__ */ e.jsx(p, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(R, {}), children: "删除" }) })
205
+ render: (t, r) => /* @__PURE__ */ e.jsxs(z, { children: [
206
+ /* @__PURE__ */ e.jsx(x, { type: "link", icon: /* @__PURE__ */ e.jsx(R, {}), onClick: () => C(r), children: "编辑" }),
207
+ /* @__PURE__ */ e.jsx(B, { title: "确定删除?", onConfirm: () => k(r.id), children: /* @__PURE__ */ e.jsx(x, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(K, {}), children: "删除" }) })
207
208
  ] })
208
209
  }
209
210
  ];
210
211
  return /* @__PURE__ */ e.jsxs("div", { children: [
211
- /* @__PURE__ */ e.jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e.jsx(p, { type: "primary", icon: /* @__PURE__ */ e.jsx($, {}), onClick: V, children: "新增租户" }) }),
212
212
  /* @__PURE__ */ e.jsx(
213
- U,
213
+ W,
214
214
  {
215
- columns: F,
216
- dataSource: j,
217
- loading: x,
215
+ rows: j,
216
+ columns: E,
217
+ loading: p,
218
218
  rowKey: "id",
219
- pagination: n,
220
- onChange: z
219
+ searchKeys: "tenantCode,tenantName",
220
+ searchPlaceholder: "按租户编码 / 租户名称过滤",
221
+ cardExtra: /* @__PURE__ */ e.jsx(x, { type: "primary", icon: /* @__PURE__ */ e.jsx(q, {}), onClick: V, children: "新增租户" }),
222
+ pagination: {
223
+ ...n,
224
+ showSizeChanger: !0,
225
+ pageSizeOptions: ["10", "20", "50", "100"],
226
+ showTotal: (t) => `共 ${t} 条`
227
+ },
228
+ onChange: O,
229
+ emptyTitle: "暂无租户",
230
+ emptyDescription: "当前没有租户,先点右上角「新增租户」建一个。"
221
231
  }
222
232
  ),
223
233
  /* @__PURE__ */ e.jsx(
224
- K,
234
+ U,
225
235
  {
226
236
  title: f ? "编辑租户" : "新增租户",
227
237
  open: S,
228
- onOk: O,
229
- onCancel: () => h(!1),
238
+ onOk: P,
239
+ onCancel: () => u(!1),
230
240
  width: 600,
231
241
  children: /* @__PURE__ */ e.jsxs(a, { form: o, layout: "vertical", children: [
232
242
  /* @__PURE__ */ e.jsx(
@@ -263,47 +273,47 @@ function Te() {
263
273
  ] });
264
274
  }
265
275
  const { Option: N } = I;
266
- function Ce() {
267
- const [j, c] = d([]), [x, u] = d(!1), [n, w] = d({ current: 1, pageSize: 10, total: 0 }), [S, h] = d(!1), [f, T] = d(null), [o] = a.useForm(), y = async (t = 1, r = 10) => {
268
- u(!0);
276
+ function ze() {
277
+ const [j, c] = d([]), [p, h] = d(!1), [n, T] = d({ current: 1, pageSize: 10, total: 0 }), [S, u] = d(!1), [f, v] = d(null), [o] = a.useForm(), y = async (t = 1, r = 10) => {
278
+ h(!0);
269
279
  try {
270
280
  const b = await m.get("/app/list", {
271
281
  params: { pageNum: t, pageSize: r }
272
282
  });
273
- c(b.data.records || []), w({
283
+ c(b.data.records || []), T({
274
284
  current: t,
275
285
  pageSize: r,
276
286
  total: b.data.total || 0
277
287
  });
278
288
  } catch {
279
- s.error("获取数据失败");
289
+ i.error("获取数据失败");
280
290
  } finally {
281
- u(!1);
291
+ h(!1);
282
292
  }
283
293
  };
284
294
  _(() => {
285
295
  y();
286
296
  }, []);
287
- const z = (t) => {
297
+ const O = (t) => {
288
298
  y(t.current, t.pageSize);
289
299
  }, V = () => {
290
- T(null), o.resetFields(), o.setFieldsValue({ status: 1, appType: "web" }), h(!0);
300
+ v(null), o.resetFields(), o.setFieldsValue({ status: 1, appType: "web" }), u(!0);
291
301
  }, C = (t) => {
292
- T(t), o.setFieldsValue(t), h(!0);
302
+ v(t), o.setFieldsValue(t), u(!0);
293
303
  }, k = async (t) => {
294
304
  try {
295
- await m.delete(`/app/${t}`), s.success("删除成功"), y(n.current, n.pageSize);
305
+ await m.delete(`/app/${t}`), i.success("删除成功"), y(n.current, n.pageSize);
296
306
  } catch {
297
- s.error("删除失败");
307
+ i.error("删除失败");
298
308
  }
299
- }, O = async () => {
309
+ }, P = async () => {
300
310
  try {
301
311
  const t = await o.validateFields();
302
- f ? (await m.put(`/app/${f.id}`, t), s.success("更新成功")) : (await m.post("/app", t), s.success("创建成功")), h(!1), y(n.current, n.pageSize);
312
+ f ? (await m.put(`/app/${f.id}`, t), i.success("更新成功")) : (await m.post("/app", t), i.success("创建成功")), u(!1), y(n.current, n.pageSize);
303
313
  } catch {
304
- s.error("操作失败");
314
+ i.error("操作失败");
305
315
  }
306
- }, F = [
316
+ }, E = [
307
317
  {
308
318
  title: "ID",
309
319
  dataIndex: "id",
@@ -356,32 +366,41 @@ function Ce() {
356
366
  {
357
367
  title: "操作",
358
368
  key: "action",
359
- render: (t, r) => /* @__PURE__ */ e.jsxs(E, { children: [
360
- /* @__PURE__ */ e.jsx(p, { type: "link", icon: /* @__PURE__ */ e.jsx(B, {}), onClick: () => C(r), children: "编辑" }),
361
- /* @__PURE__ */ e.jsx(W, { title: "确定删除?", onConfirm: () => k(r.id), children: /* @__PURE__ */ e.jsx(p, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(R, {}), children: "删除" }) })
369
+ render: (t, r) => /* @__PURE__ */ e.jsxs(z, { children: [
370
+ /* @__PURE__ */ e.jsx(x, { type: "link", icon: /* @__PURE__ */ e.jsx(R, {}), onClick: () => C(r), children: "编辑" }),
371
+ /* @__PURE__ */ e.jsx(B, { title: "确定删除?", onConfirm: () => k(r.id), children: /* @__PURE__ */ e.jsx(x, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(K, {}), children: "删除" }) })
362
372
  ] })
363
373
  }
364
374
  ];
365
375
  return /* @__PURE__ */ e.jsxs("div", { children: [
366
- /* @__PURE__ */ e.jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e.jsx(p, { type: "primary", icon: /* @__PURE__ */ e.jsx($, {}), onClick: V, children: "新增应用" }) }),
367
376
  /* @__PURE__ */ e.jsx(
368
- U,
377
+ W,
369
378
  {
370
- columns: F,
371
- dataSource: j,
372
- loading: x,
379
+ rows: j,
380
+ columns: E,
381
+ loading: p,
373
382
  rowKey: "id",
374
- pagination: n,
375
- onChange: z
383
+ searchKeys: "appCode,appName,appType",
384
+ searchPlaceholder: "按应用编码 / 名称 / 类型过滤",
385
+ cardExtra: /* @__PURE__ */ e.jsx(x, { type: "primary", icon: /* @__PURE__ */ e.jsx(q, {}), onClick: V, children: "新增应用" }),
386
+ pagination: {
387
+ ...n,
388
+ showSizeChanger: !0,
389
+ pageSizeOptions: ["10", "20", "50", "100"],
390
+ showTotal: (t) => `共 ${t} 条`
391
+ },
392
+ onChange: O,
393
+ emptyTitle: "暂无应用",
394
+ emptyDescription: "当前没有应用,先点右上角「新增应用」建一个。"
376
395
  }
377
396
  ),
378
397
  /* @__PURE__ */ e.jsx(
379
- K,
398
+ U,
380
399
  {
381
400
  title: f ? "编辑应用" : "新增应用",
382
401
  open: S,
383
- onOk: O,
384
- onCancel: () => h(!1),
402
+ onOk: P,
403
+ onCancel: () => u(!1),
385
404
  width: 600,
386
405
  children: /* @__PURE__ */ e.jsxs(a, { form: o, layout: "vertical", children: [
387
406
  /* @__PURE__ */ e.jsx(
@@ -429,32 +448,32 @@ function Ce() {
429
448
  )
430
449
  ] });
431
450
  }
432
- const { Option: P } = I, { TabPane: Y } = re;
433
- function De() {
434
- const [j, c] = d([]), [x, u] = d(!1), [n, w] = d({ current: 1, pageSize: 10, total: 0 }), [S, h] = d(!1), [f, T] = d(null), [o] = a.useForm(), [y, z] = d([]), [V, C] = d(!1), [k, O] = d(null), [F, t] = d(!1), [r, b] = d(null), [L] = a.useForm(), G = async (i = 1, g = 10) => {
435
- u(!0);
451
+ const { Option: F } = I, { TabPane: Y } = re;
452
+ function Se() {
453
+ const [j, c] = d([]), [p, h] = d(!1), [n, T] = d({ current: 1, pageSize: 10, total: 0 }), [S, u] = d(!1), [f, v] = d(null), [o] = a.useForm(), [y, O] = d([]), [V, C] = d(!1), [k, P] = d(null), [E, t] = d(!1), [r, b] = d(null), [L] = a.useForm(), G = async (s = 1, g = 10) => {
454
+ h(!0);
436
455
  try {
437
456
  const X = await m.get("/dict/type/list", {
438
- params: { pageNum: i, pageSize: g }
457
+ params: { pageNum: s, pageSize: g }
439
458
  });
440
- c(X.data.records || []), w({
441
- current: i,
459
+ c(X.data.records || []), T({
460
+ current: s,
442
461
  pageSize: g,
443
462
  total: X.data.total || 0
444
463
  });
445
464
  } catch {
446
- s.error("获取字典类型失败");
465
+ i.error("获取字典类型失败");
447
466
  } finally {
448
- u(!1);
467
+ h(!1);
449
468
  }
450
- }, Q = async (i) => {
451
- if (i) {
452
- C(!0), O(i);
469
+ }, Q = async (s) => {
470
+ if (s) {
471
+ C(!0), P(s);
453
472
  try {
454
- const g = await m.get(`/dict/item/${i}`);
455
- z(g.data || []);
473
+ const g = await m.get(`/dict/item/${s}`);
474
+ O(g.data || []);
456
475
  } catch {
457
- s.error("获取字典项失败");
476
+ i.error("获取字典项失败");
458
477
  } finally {
459
478
  C(!1);
460
479
  }
@@ -464,57 +483,57 @@ function De() {
464
483
  G();
465
484
  }, []);
466
485
  const le = () => {
467
- T(null), o.resetFields(), o.setFieldsValue({ status: 1, dictType: "custom" }), h(!0);
468
- }, de = (i) => {
469
- T(i), o.setFieldsValue(i), h(!0);
470
- }, ce = async (i) => {
486
+ v(null), o.resetFields(), o.setFieldsValue({ status: 1, dictType: "custom" }), u(!0);
487
+ }, de = (s) => {
488
+ v(s), o.setFieldsValue(s), u(!0);
489
+ }, ce = async (s) => {
471
490
  try {
472
- await m.delete(`/dict/type/${i}`), s.success("删除成功"), G(n.current, n.pageSize);
491
+ await m.delete(`/dict/type/${s}`), i.success("删除成功"), G(n.current, n.pageSize);
473
492
  } catch {
474
- s.error("删除失败");
493
+ i.error("删除失败");
475
494
  }
476
495
  }, oe = async () => {
477
496
  try {
478
- const i = await o.validateFields();
479
- f ? (await m.put(`/dict/type/${f.id}`, i), s.success("更新成功")) : (await m.post("/dict/type", i), s.success("创建成功")), h(!1), G(n.current, n.pageSize);
497
+ const s = await o.validateFields();
498
+ f ? (await m.put(`/dict/type/${f.id}`, s), i.success("更新成功")) : (await m.post("/dict/type", s), i.success("创建成功")), u(!1), G(n.current, n.pageSize);
480
499
  } catch {
481
- s.error("操作失败");
500
+ i.error("操作失败");
482
501
  }
483
- }, ue = () => {
502
+ }, he = () => {
484
503
  if (!k) {
485
- s.warning("请先选择字典类型");
504
+ i.warning("请先选择字典类型");
486
505
  return;
487
506
  }
488
507
  b(null), L.resetFields(), L.setFieldsValue({ status: 1, dictId: k, sortOrder: 0 }), t(!0);
489
- }, me = (i) => {
490
- b(i), L.setFieldsValue(i), t(!0);
491
- }, he = async (i) => {
508
+ }, me = (s) => {
509
+ b(s), L.setFieldsValue(s), t(!0);
510
+ }, ue = async (s) => {
492
511
  try {
493
- await m.delete(`/dict/item/${i}`), s.success("删除成功"), Q(k);
512
+ await m.delete(`/dict/item/${s}`), i.success("删除成功"), Q(k);
494
513
  } catch {
495
- s.error("删除失败");
514
+ i.error("删除失败");
496
515
  }
497
- }, xe = async () => {
516
+ }, pe = async () => {
498
517
  try {
499
- const i = await L.validateFields();
500
- r ? (await m.put(`/dict/item/${r.id}`, i), s.success("更新成功")) : (await m.post("/dict/item", i), s.success("创建成功")), t(!1), Q(k);
518
+ const s = await L.validateFields();
519
+ r ? (await m.put(`/dict/item/${r.id}`, s), i.success("更新成功")) : (await m.post("/dict/item", s), i.success("创建成功")), t(!1), Q(k);
501
520
  } catch {
502
- s.error("操作失败");
521
+ i.error("操作失败");
503
522
  }
504
- }, pe = [
523
+ }, xe = [
505
524
  { title: "ID", dataIndex: "id", key: "id", width: 60 },
506
525
  { title: "字典编码", dataIndex: "dictCode", key: "dictCode" },
507
526
  { title: "字典名称", dataIndex: "dictName", key: "dictName" },
508
- { title: "字典类型", dataIndex: "dictType", key: "dictType", render: (i) => i === "system" ? "系统" : "自定义" },
509
- { title: "状态", dataIndex: "status", key: "status", render: (i) => i === 1 ? "启用" : "禁用" },
527
+ { title: "字典类型", dataIndex: "dictType", key: "dictType", render: (s) => s === "system" ? "系统" : "自定义" },
528
+ { title: "状态", dataIndex: "status", key: "status", render: (s) => s === 1 ? "启用" : "禁用" },
510
529
  { title: "描述", dataIndex: "description", key: "description" },
511
530
  {
512
531
  title: "操作",
513
532
  key: "action",
514
- render: (i, g) => /* @__PURE__ */ e.jsxs(E, { children: [
515
- /* @__PURE__ */ e.jsx(p, { type: "link", onClick: () => Q(g.id), children: "查看项" }),
516
- /* @__PURE__ */ e.jsx(p, { type: "link", icon: /* @__PURE__ */ e.jsx(B, {}), onClick: () => de(g), children: "编辑" }),
517
- /* @__PURE__ */ e.jsx(W, { title: "确定删除?", onConfirm: () => ce(g.id), children: /* @__PURE__ */ e.jsx(p, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(R, {}), children: "删除" }) })
533
+ render: (s, g) => /* @__PURE__ */ e.jsxs(z, { children: [
534
+ /* @__PURE__ */ e.jsx(x, { type: "link", onClick: () => Q(g.id), children: "查看项" }),
535
+ /* @__PURE__ */ e.jsx(x, { type: "link", icon: /* @__PURE__ */ e.jsx(R, {}), onClick: () => de(g), children: "编辑" }),
536
+ /* @__PURE__ */ e.jsx(B, { title: "确定删除?", onConfirm: () => ce(g.id), children: /* @__PURE__ */ e.jsx(x, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(K, {}), children: "删除" }) })
518
537
  ] })
519
538
  }
520
539
  ], je = [
@@ -523,83 +542,90 @@ function De() {
523
542
  { title: "字典项名称", dataIndex: "itemName", key: "itemName" },
524
543
  { title: "字典项值", dataIndex: "itemValue", key: "itemValue" },
525
544
  { title: "排序", dataIndex: "sortOrder", key: "sortOrder" },
526
- { title: "状态", dataIndex: "status", key: "status", render: (i) => i === 1 ? "启用" : "禁用" },
545
+ { title: "状态", dataIndex: "status", key: "status", render: (s) => s === 1 ? "启用" : "禁用" },
527
546
  {
528
547
  title: "操作",
529
548
  key: "action",
530
- render: (i, g) => /* @__PURE__ */ e.jsxs(E, { children: [
531
- /* @__PURE__ */ e.jsx(p, { type: "link", icon: /* @__PURE__ */ e.jsx(B, {}), onClick: () => me(g), children: "编辑" }),
532
- /* @__PURE__ */ e.jsx(W, { title: "确定删除?", onConfirm: () => he(g.id), children: /* @__PURE__ */ e.jsx(p, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(R, {}), children: "删除" }) })
549
+ render: (s, g) => /* @__PURE__ */ e.jsxs(z, { children: [
550
+ /* @__PURE__ */ e.jsx(x, { type: "link", icon: /* @__PURE__ */ e.jsx(R, {}), onClick: () => me(g), children: "编辑" }),
551
+ /* @__PURE__ */ e.jsx(B, { title: "确定删除?", onConfirm: () => ue(g.id), children: /* @__PURE__ */ e.jsx(x, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(K, {}), children: "删除" }) })
533
552
  ] })
534
553
  }
535
554
  ];
536
555
  return /* @__PURE__ */ e.jsxs("div", { children: [
537
556
  /* @__PURE__ */ e.jsxs(re, { defaultActiveKey: "1", children: [
538
- /* @__PURE__ */ e.jsxs(Y, { tab: "字典类型", children: [
539
- /* @__PURE__ */ e.jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e.jsx(p, { type: "primary", icon: /* @__PURE__ */ e.jsx($, {}), onClick: le, children: "新增字典类型" }) }),
540
- /* @__PURE__ */ e.jsx(
541
- U,
542
- {
543
- columns: pe,
544
- dataSource: j,
545
- loading: x,
546
- rowKey: "id",
547
- pagination: {
548
- ...n,
549
- onChange: (i, g) => G(i, g)
550
- }
551
- }
552
- )
553
- ] }, "1"),
554
- /* @__PURE__ */ e.jsxs(Y, { tab: "字典项", children: [
555
- /* @__PURE__ */ e.jsxs("div", { style: { marginBottom: 16 }, children: [
556
- /* @__PURE__ */ e.jsx(p, { type: "primary", icon: /* @__PURE__ */ e.jsx($, {}), onClick: ue, children: "新增字典项" }),
557
- k && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: 16 }, children: [
558
- "当前字典ID: ",
559
- k
560
- ] })
561
- ] }),
562
- /* @__PURE__ */ e.jsx(
563
- U,
564
- {
565
- columns: je,
566
- dataSource: y,
567
- loading: V,
568
- rowKey: "id"
569
- }
570
- )
571
- ] }, "2")
557
+ /* @__PURE__ */ e.jsx(Y, { tab: "字典类型", children: /* @__PURE__ */ e.jsx(
558
+ W,
559
+ {
560
+ rows: j,
561
+ columns: xe,
562
+ loading: p,
563
+ rowKey: "id",
564
+ searchKeys: "dictCode,dictName",
565
+ searchPlaceholder: "按字典编码 / 名称过滤",
566
+ cardExtra: /* @__PURE__ */ e.jsx(x, { type: "primary", icon: /* @__PURE__ */ e.jsx(q, {}), onClick: le, children: "新增字典类型" }),
567
+ pagination: {
568
+ ...n,
569
+ showSizeChanger: !0,
570
+ pageSizeOptions: ["10", "20", "50", "100"],
571
+ showTotal: (s) => `共 ${s} 条`,
572
+ onChange: (s, g) => G(s, g)
573
+ },
574
+ emptyTitle: "暂无字典类型",
575
+ emptyDescription: "当前没有字典类型,先点右上角「新增字典类型」建一个。"
576
+ }
577
+ ) }, "1"),
578
+ /* @__PURE__ */ e.jsx(Y, { tab: "字典项", children: /* @__PURE__ */ e.jsx(
579
+ W,
580
+ {
581
+ rows: y,
582
+ columns: je,
583
+ loading: V,
584
+ rowKey: "id",
585
+ searchKeys: "itemCode,itemName,itemValue",
586
+ searchPlaceholder: "按字典项编码 / 名称 / 值过滤",
587
+ cardExtra: /* @__PURE__ */ e.jsxs(z, { children: [
588
+ /* @__PURE__ */ e.jsx(x, { type: "primary", icon: /* @__PURE__ */ e.jsx(q, {}), onClick: he, children: "新增字典项" }),
589
+ k && /* @__PURE__ */ e.jsxs("span", { children: [
590
+ "当前字典ID: ",
591
+ k
592
+ ] })
593
+ ] }),
594
+ emptyTitle: "暂无字典项",
595
+ emptyDescription: "先在「字典类型」里选一个类型,再新增字典项。"
596
+ }
597
+ ) }, "2")
572
598
  ] }),
573
599
  /* @__PURE__ */ e.jsx(
574
- K,
600
+ U,
575
601
  {
576
602
  title: f ? "编辑字典类型" : "新增字典类型",
577
603
  open: S,
578
604
  onOk: oe,
579
- onCancel: () => h(!1),
605
+ onCancel: () => u(!1),
580
606
  width: 600,
581
607
  children: /* @__PURE__ */ e.jsxs(a, { form: o, layout: "vertical", children: [
582
608
  /* @__PURE__ */ e.jsx(a.Item, { name: "tenantId", label: "租户ID", initialValue: 1, children: /* @__PURE__ */ e.jsx(l, { type: "number", placeholder: "请输入租户ID" }) }),
583
609
  /* @__PURE__ */ e.jsx(a.Item, { name: "dictCode", label: "字典编码", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(l, { placeholder: "请输入字典编码" }) }),
584
610
  /* @__PURE__ */ e.jsx(a.Item, { name: "dictName", label: "字典名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(l, { placeholder: "请输入字典名称" }) }),
585
611
  /* @__PURE__ */ e.jsx(a.Item, { name: "dictType", label: "字典类型", initialValue: "custom", children: /* @__PURE__ */ e.jsxs(I, { children: [
586
- /* @__PURE__ */ e.jsx(P, { value: "system", children: "系统" }),
587
- /* @__PURE__ */ e.jsx(P, { value: "custom", children: "自定义" })
612
+ /* @__PURE__ */ e.jsx(F, { value: "system", children: "系统" }),
613
+ /* @__PURE__ */ e.jsx(F, { value: "custom", children: "自定义" })
588
614
  ] }) }),
589
615
  /* @__PURE__ */ e.jsx(a.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(l.TextArea, { rows: 2, placeholder: "请输入描述" }) }),
590
616
  /* @__PURE__ */ e.jsx(a.Item, { name: "status", label: "状态", initialValue: 1, children: /* @__PURE__ */ e.jsxs(I, { children: [
591
- /* @__PURE__ */ e.jsx(P, { value: 1, children: "启用" }),
592
- /* @__PURE__ */ e.jsx(P, { value: 0, children: "禁用" })
617
+ /* @__PURE__ */ e.jsx(F, { value: 1, children: "启用" }),
618
+ /* @__PURE__ */ e.jsx(F, { value: 0, children: "禁用" })
593
619
  ] }) })
594
620
  ] })
595
621
  }
596
622
  ),
597
623
  /* @__PURE__ */ e.jsx(
598
- K,
624
+ U,
599
625
  {
600
626
  title: r ? "编辑字典项" : "新增字典项",
601
- open: F,
602
- onOk: xe,
627
+ open: E,
628
+ onOk: pe,
603
629
  onCancel: () => t(!1),
604
630
  width: 600,
605
631
  children: /* @__PURE__ */ e.jsxs(a, { form: L, layout: "vertical", children: [
@@ -609,56 +635,56 @@ function De() {
609
635
  /* @__PURE__ */ e.jsx(a.Item, { name: "itemValue", label: "字典项值", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(l, { placeholder: "请输入字典项值" }) }),
610
636
  /* @__PURE__ */ e.jsx(a.Item, { name: "sortOrder", label: "排序", children: /* @__PURE__ */ e.jsx(l, { type: "number", placeholder: "请输入排序" }) }),
611
637
  /* @__PURE__ */ e.jsx(a.Item, { name: "status", label: "状态", initialValue: 1, children: /* @__PURE__ */ e.jsxs(I, { children: [
612
- /* @__PURE__ */ e.jsx(P, { value: 1, children: "启用" }),
613
- /* @__PURE__ */ e.jsx(P, { value: 0, children: "禁用" })
638
+ /* @__PURE__ */ e.jsx(F, { value: 1, children: "启用" }),
639
+ /* @__PURE__ */ e.jsx(F, { value: 0, children: "禁用" })
614
640
  ] }) })
615
641
  ] })
616
642
  }
617
643
  )
618
644
  ] });
619
645
  }
620
- const { Option: v } = I;
621
- function Se() {
622
- const [j, c] = d([]), [x, u] = d(!1), [n, w] = d({ current: 1, pageSize: 10, total: 0 }), [S, h] = d(!1), [f, T] = d(null), [o] = a.useForm(), y = async (t = 1, r = 10) => {
623
- u(!0);
646
+ const { Option: w } = I;
647
+ function Oe() {
648
+ const [j, c] = d([]), [p, h] = d(!1), [n, T] = d({ current: 1, pageSize: 10, total: 0 }), [S, u] = d(!1), [f, v] = d(null), [o] = a.useForm(), y = async (t = 1, r = 10) => {
649
+ h(!0);
624
650
  try {
625
651
  const b = await m.get("/interface/list", {
626
652
  params: { pageNum: t, pageSize: r }
627
653
  });
628
- c(b.data.records || []), w({
654
+ c(b.data.records || []), T({
629
655
  current: t,
630
656
  pageSize: r,
631
657
  total: b.data.total || 0
632
658
  });
633
659
  } catch {
634
- s.error("获取数据失败");
660
+ i.error("获取数据失败");
635
661
  } finally {
636
- u(!1);
662
+ h(!1);
637
663
  }
638
664
  };
639
665
  _(() => {
640
666
  y();
641
667
  }, []);
642
- const z = (t) => {
668
+ const O = (t) => {
643
669
  y(t.current, t.pageSize);
644
670
  }, V = () => {
645
- T(null), o.resetFields(), o.setFieldsValue({ status: 1, deprecated: 0, apiMethod: "GET", apiVersion: "v1", authType: "bearer" }), h(!0);
671
+ v(null), o.resetFields(), o.setFieldsValue({ status: 1, deprecated: 0, apiMethod: "GET", apiVersion: "v1", authType: "bearer" }), u(!0);
646
672
  }, C = (t) => {
647
- T(t), o.setFieldsValue(t), h(!0);
673
+ v(t), o.setFieldsValue(t), u(!0);
648
674
  }, k = async (t) => {
649
675
  try {
650
- await m.delete(`/interface/${t}`), s.success("删除成功"), y(n.current, n.pageSize);
676
+ await m.delete(`/interface/${t}`), i.success("删除成功"), y(n.current, n.pageSize);
651
677
  } catch {
652
- s.error("删除失败");
678
+ i.error("删除失败");
653
679
  }
654
- }, O = async () => {
680
+ }, P = async () => {
655
681
  try {
656
682
  const t = await o.validateFields();
657
- f ? (await m.put(`/interface/${f.id}`, t), s.success("更新成功")) : (await m.post("/interface", t), s.success("创建成功")), h(!1), y(n.current, n.pageSize);
683
+ f ? (await m.put(`/interface/${f.id}`, t), i.success("更新成功")) : (await m.post("/interface", t), i.success("创建成功")), u(!1), y(n.current, n.pageSize);
658
684
  } catch {
659
- s.error("操作失败");
685
+ i.error("操作失败");
660
686
  }
661
- }, F = [
687
+ }, E = [
662
688
  {
663
689
  title: "ID",
664
690
  dataIndex: "id",
@@ -726,32 +752,41 @@ function Se() {
726
752
  {
727
753
  title: "操作",
728
754
  key: "action",
729
- render: (t, r) => /* @__PURE__ */ e.jsxs(E, { children: [
730
- /* @__PURE__ */ e.jsx(p, { type: "link", icon: /* @__PURE__ */ e.jsx(B, {}), onClick: () => C(r), children: "编辑" }),
731
- /* @__PURE__ */ e.jsx(W, { title: "确定删除?", onConfirm: () => k(r.id), children: /* @__PURE__ */ e.jsx(p, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(R, {}), children: "删除" }) })
755
+ render: (t, r) => /* @__PURE__ */ e.jsxs(z, { children: [
756
+ /* @__PURE__ */ e.jsx(x, { type: "link", icon: /* @__PURE__ */ e.jsx(R, {}), onClick: () => C(r), children: "编辑" }),
757
+ /* @__PURE__ */ e.jsx(B, { title: "确定删除?", onConfirm: () => k(r.id), children: /* @__PURE__ */ e.jsx(x, { type: "link", danger: !0, icon: /* @__PURE__ */ e.jsx(K, {}), children: "删除" }) })
732
758
  ] })
733
759
  }
734
760
  ];
735
761
  return /* @__PURE__ */ e.jsxs("div", { children: [
736
- /* @__PURE__ */ e.jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e.jsx(p, { type: "primary", icon: /* @__PURE__ */ e.jsx($, {}), onClick: V, children: "新增接口" }) }),
737
762
  /* @__PURE__ */ e.jsx(
738
- U,
763
+ W,
739
764
  {
740
- columns: F,
741
- dataSource: j,
742
- loading: x,
765
+ rows: j,
766
+ columns: E,
767
+ loading: p,
743
768
  rowKey: "id",
744
- pagination: n,
745
- onChange: z
769
+ searchKeys: "apiName,apiPath,apiMethod",
770
+ searchPlaceholder: "按接口名称 / 路径 / 方法过滤",
771
+ cardExtra: /* @__PURE__ */ e.jsx(x, { type: "primary", icon: /* @__PURE__ */ e.jsx(q, {}), onClick: V, children: "新增接口" }),
772
+ pagination: {
773
+ ...n,
774
+ showSizeChanger: !0,
775
+ pageSizeOptions: ["10", "20", "50", "100"],
776
+ showTotal: (t) => `共 ${t} 条`
777
+ },
778
+ onChange: O,
779
+ emptyTitle: "暂无接口",
780
+ emptyDescription: "当前没有接口定义,先点右上角「新增接口」建一个。"
746
781
  }
747
782
  ),
748
783
  /* @__PURE__ */ e.jsx(
749
- K,
784
+ U,
750
785
  {
751
786
  title: f ? "编辑接口" : "新增接口",
752
787
  open: S,
753
- onOk: O,
754
- onCancel: () => h(!1),
788
+ onOk: P,
789
+ onCancel: () => u(!1),
755
790
  width: 700,
756
791
  children: /* @__PURE__ */ e.jsxs(a, { form: o, layout: "vertical", children: [
757
792
  /* @__PURE__ */ e.jsx(
@@ -782,57 +817,57 @@ function Se() {
782
817
  }
783
818
  ),
784
819
  /* @__PURE__ */ e.jsx(a.Item, { name: "apiMethod", label: "请求方法", initialValue: "GET", children: /* @__PURE__ */ e.jsxs(I, { children: [
785
- /* @__PURE__ */ e.jsx(v, { value: "GET", children: "GET" }),
786
- /* @__PURE__ */ e.jsx(v, { value: "POST", children: "POST" }),
787
- /* @__PURE__ */ e.jsx(v, { value: "PUT", children: "PUT" }),
788
- /* @__PURE__ */ e.jsx(v, { value: "DELETE", children: "DELETE" })
820
+ /* @__PURE__ */ e.jsx(w, { value: "GET", children: "GET" }),
821
+ /* @__PURE__ */ e.jsx(w, { value: "POST", children: "POST" }),
822
+ /* @__PURE__ */ e.jsx(w, { value: "PUT", children: "PUT" }),
823
+ /* @__PURE__ */ e.jsx(w, { value: "DELETE", children: "DELETE" })
789
824
  ] }) }),
790
825
  /* @__PURE__ */ e.jsx(a.Item, { name: "apiVersion", label: "接口版本", initialValue: "v1", children: /* @__PURE__ */ e.jsx(l, { placeholder: "如: v1" }) }),
791
826
  /* @__PURE__ */ e.jsx(a.Item, { name: "authType", label: "认证类型", initialValue: "bearer", children: /* @__PURE__ */ e.jsxs(I, { children: [
792
- /* @__PURE__ */ e.jsx(v, { value: "none", children: "无" }),
793
- /* @__PURE__ */ e.jsx(v, { value: "basic", children: "Basic" }),
794
- /* @__PURE__ */ e.jsx(v, { value: "bearer", children: "Bearer" }),
795
- /* @__PURE__ */ e.jsx(v, { value: "oauth2", children: "OAuth2" })
827
+ /* @__PURE__ */ e.jsx(w, { value: "none", children: "无" }),
828
+ /* @__PURE__ */ e.jsx(w, { value: "basic", children: "Basic" }),
829
+ /* @__PURE__ */ e.jsx(w, { value: "bearer", children: "Bearer" }),
830
+ /* @__PURE__ */ e.jsx(w, { value: "oauth2", children: "OAuth2" })
796
831
  ] }) }),
797
832
  /* @__PURE__ */ e.jsx(a.Item, { name: "requestParams", label: "请求参数(JSON)", children: /* @__PURE__ */ e.jsx(l.TextArea, { rows: 3, placeholder: '如: {"name": "string", "age": "number"}' }) }),
798
833
  /* @__PURE__ */ e.jsx(a.Item, { name: "responseParams", label: "响应参数(JSON)", children: /* @__PURE__ */ e.jsx(l.TextArea, { rows: 3, placeholder: '如: {"code": "number", "data": "object"}' }) }),
799
834
  /* @__PURE__ */ e.jsx(a.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(l.TextArea, { rows: 2, placeholder: "请输入描述" }) }),
800
835
  /* @__PURE__ */ e.jsx(a.Item, { name: "status", label: "状态", initialValue: 1, children: /* @__PURE__ */ e.jsxs(I, { children: [
801
- /* @__PURE__ */ e.jsx(v, { value: 1, children: "启用" }),
802
- /* @__PURE__ */ e.jsx(v, { value: 0, children: "禁用" })
836
+ /* @__PURE__ */ e.jsx(w, { value: 1, children: "启用" }),
837
+ /* @__PURE__ */ e.jsx(w, { value: 0, children: "禁用" })
803
838
  ] }) }),
804
839
  /* @__PURE__ */ e.jsx(a.Item, { name: "deprecated", label: "是否废弃", initialValue: 0, children: /* @__PURE__ */ e.jsxs(I, { children: [
805
- /* @__PURE__ */ e.jsx(v, { value: 0, children: "否" }),
806
- /* @__PURE__ */ e.jsx(v, { value: 1, children: "是" })
840
+ /* @__PURE__ */ e.jsx(w, { value: 0, children: "否" }),
841
+ /* @__PURE__ */ e.jsx(w, { value: 1, children: "是" })
807
842
  ] }) })
808
843
  ] })
809
844
  }
810
845
  )
811
846
  ] });
812
847
  }
813
- const { Title: ze, Paragraph: Ve } = Ie;
814
- function Oe() {
815
- const j = ne(), [c, x] = d(null);
848
+ const { Title: Ve, Paragraph: Pe } = ke;
849
+ function Ee() {
850
+ const j = ne(), [c, p] = d(null);
816
851
  _(() => {
817
852
  const n = localStorage.getItem("userInfo");
818
853
  if (n)
819
854
  try {
820
- x(JSON.parse(n));
855
+ p(JSON.parse(n));
821
856
  } catch {
822
- x({ name: n });
857
+ p({ name: n });
823
858
  }
824
859
  }, []);
825
- const u = Fe.filter((n) => n.key !== "/z-meta/home");
860
+ const h = Ne.filter((n) => n.key !== "/z-meta/home");
826
861
  return /* @__PURE__ */ e.jsxs("div", { children: [
827
- /* @__PURE__ */ e.jsx(D, { style: { marginBottom: 16, background: "linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%)", border: "none" }, children: /* @__PURE__ */ e.jsxs(E, { direction: "vertical", size: 4, style: { color: "#fff" }, children: [
828
- /* @__PURE__ */ e.jsxs(ze, { level: 3, style: { color: "#fff", margin: 0 }, children: [
862
+ /* @__PURE__ */ e.jsx(D, { style: { marginBottom: 16, background: "linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%)", border: "none" }, children: /* @__PURE__ */ e.jsxs(z, { direction: "vertical", size: 4, style: { color: "#fff" }, children: [
863
+ /* @__PURE__ */ e.jsxs(Ve, { level: 3, style: { color: "#fff", margin: 0 }, children: [
829
864
  "欢迎",
830
865
  c != null && c.name ? `,${c.name}` : ""
831
866
  ] }),
832
- /* @__PURE__ */ e.jsx(Ve, { style: { color: "rgba(255,255,255,0.85)", margin: 0 }, children: "z-meta 元数据平台 管理台" }),
867
+ /* @__PURE__ */ e.jsx(Pe, { style: { color: "rgba(255,255,255,0.85)", margin: 0 }, children: "z-meta 元数据平台 管理台" }),
833
868
  (c == null ? void 0 : c.role) && /* @__PURE__ */ e.jsx(ie, { style: { marginTop: 8, background: "rgba(255,255,255,0.2)", color: "#fff", border: "none" }, children: c.role })
834
869
  ] }) }),
835
- /* @__PURE__ */ e.jsx(se, { gutter: [16, 16], children: u.map((n) => /* @__PURE__ */ e.jsx(q, { xs: 24, sm: 12, md: 12, lg: 8, children: /* @__PURE__ */ e.jsx(D, { hoverable: !0, onClick: () => j(n.key), style: { borderTop: "3px solid #7c3aed" }, children: /* @__PURE__ */ e.jsxs(E, { align: "start", size: 12, children: [
870
+ /* @__PURE__ */ e.jsx(se, { gutter: [16, 16], children: h.map((n) => /* @__PURE__ */ e.jsx($, { xs: 24, sm: 12, md: 12, lg: 8, children: /* @__PURE__ */ e.jsx(D, { hoverable: !0, onClick: () => j(n.key), style: { borderTop: "3px solid #7c3aed" }, children: /* @__PURE__ */ e.jsxs(z, { align: "start", size: 12, children: [
836
871
  /* @__PURE__ */ e.jsx("div", { style: {
837
872
  width: 44,
838
873
  height: 44,
@@ -853,11 +888,11 @@ function Oe() {
853
888
  ] });
854
889
  }
855
890
  const A = { username: "admin", password: "123456", user: { name: "admin", role: "管理员" } };
856
- function qe() {
857
- const [j, c] = d(!1), x = async (u) => {
891
+ function Ke() {
892
+ const [j, c] = d(!1), p = async (h) => {
858
893
  c(!0);
859
894
  try {
860
- u.username === A.username && u.password === A.password ? (localStorage.setItem("token", "mock-" + A.username), localStorage.setItem("userInfo", JSON.stringify(A.user)), s.success("登录成功(mock 模式,待 CTC/SSO 接入)"), window.location.href = "/z-meta/home") : s.error("用户名或密码错误(默认 admin/123456)");
895
+ h.username === A.username && h.password === A.password ? (localStorage.setItem("token", "mock-" + A.username), localStorage.setItem("userInfo", JSON.stringify(A.user)), i.success("登录成功(mock 模式,待 CTC/SSO 接入)"), window.location.href = "/z-meta/home") : i.error("用户名或密码错误(默认 admin/123456)");
861
896
  } finally {
862
897
  c(!1);
863
898
  }
@@ -885,11 +920,11 @@ function qe() {
885
920
  }, children: "z" }),
886
921
  /* @__PURE__ */ e.jsx("div", { style: { fontSize: 18, fontWeight: 600, color: "#0f172a" }, children: "z-meta 管理台" })
887
922
  ] }),
888
- /* @__PURE__ */ e.jsxs(a, { onFinish: x, size: "large", children: [
923
+ /* @__PURE__ */ e.jsxs(a, { onFinish: p, size: "large", children: [
889
924
  /* @__PURE__ */ e.jsx(a.Item, { name: "username", rules: [{ required: !0, message: "请输入用户名" }], children: /* @__PURE__ */ e.jsx(l, { prefix: /* @__PURE__ */ e.jsx(H, {}), placeholder: "用户名" }) }),
890
925
  /* @__PURE__ */ e.jsx(a.Item, { name: "password", rules: [{ required: !0, message: "请输入密码" }], children: /* @__PURE__ */ e.jsx(l.Password, { prefix: /* @__PURE__ */ e.jsx(Z, {}), placeholder: "密码" }) }),
891
926
  /* @__PURE__ */ e.jsx(a.Item, { style: { marginBottom: 8 }, children: /* @__PURE__ */ e.jsx(
892
- p,
927
+ x,
893
928
  {
894
929
  type: "primary",
895
930
  htmlType: "submit",
@@ -908,29 +943,32 @@ function qe() {
908
943
  ] })
909
944
  ] }) });
910
945
  }
911
- const $e = { title: "z-meta 元数据平台", short: "z-meta" }, Fe = [
912
- { key: "/z-meta/home", label: "首页", icon: /* @__PURE__ */ e.jsx(ge, {}) },
913
- { key: "/z-meta/dashboard", label: "首页", icon: /* @__PURE__ */ e.jsx(fe, {}) },
946
+ const Ue = { title: "z-meta 元数据平台", short: "z-meta" }, Ne = [
947
+ { key: "/z-meta/home", label: "首页", icon: /* @__PURE__ */ e.jsx(fe, {}) },
948
+ { key: "/z-meta/dashboard", label: "首页", icon: /* @__PURE__ */ e.jsx(Ie, {}) },
914
949
  { key: "/z-meta/tenant", label: "租户管理", icon: /* @__PURE__ */ e.jsx(H, {}) },
915
950
  { key: "/z-meta/app", label: "应用管理", icon: /* @__PURE__ */ e.jsx(ee, {}) },
916
951
  { key: "/z-meta/dict", label: "字典管理", icon: /* @__PURE__ */ e.jsx(te, {}) },
917
- { key: "/z-meta/api", label: "接口管理", icon: /* @__PURE__ */ e.jsx(ae, {}) }
952
+ { key: "/z-meta/api", label: "接口管理", icon: /* @__PURE__ */ e.jsx(ae, {}) },
953
+ { key: "/z-meta/docs", label: "组件文档", icon: /* @__PURE__ */ e.jsx(be, {}) }
918
954
  ], Be = [
919
- { path: "/z-meta/home", Component: Oe },
920
- { path: "/z-meta/dashboard", Component: be },
921
- { path: "/z-meta/tenant", Component: Te },
922
- { path: "/z-meta/app", Component: Ce },
923
- { path: "/z-meta/dict", Component: De },
924
- { path: "/z-meta/api", Component: Se },
925
- { path: "/z-meta/:rest*", Component: ye }
955
+ { path: "/z-meta/home", Component: Ee },
956
+ { path: "/z-meta/dashboard", Component: we },
957
+ { path: "/z-meta/tenant", Component: De },
958
+ { path: "/z-meta/app", Component: ze },
959
+ { path: "/z-meta/dict", Component: Se },
960
+ { path: "/z-meta/api", Component: Oe },
961
+ { path: "/z-meta/docs", Component: ye },
962
+ { path: "/z-meta/:rest*", Component: ge }
926
963
  ];
927
964
  export {
928
- be as Dashboard,
929
- Oe as HomePage,
930
- Me as Login,
931
- qe as LoginPage,
932
- $e as appMeta,
933
- Ke as configureMeta,
934
- Fe as menuItems,
965
+ ye as ComponentDocPage,
966
+ we as Dashboard,
967
+ Ee as HomePage,
968
+ Re as Login,
969
+ Ke as LoginPage,
970
+ Ue as appMeta,
971
+ Ge as configureMeta,
972
+ Ne as menuItems,
935
973
  Be as routes
936
974
  };