com-angel-authorization 1.0.20 → 1.0.23
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/react/index.cjs +21 -4
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +21 -4
- package/dist/react/index.js.map +1 -1
- package/dist/vue/index.cjs +21 -4
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +21 -4
- package/dist/vue/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -1415,9 +1415,17 @@ function MenuManager({
|
|
|
1415
1415
|
void loadList("current", "");
|
|
1416
1416
|
void loadPermissionPoints();
|
|
1417
1417
|
}, [api, pageSize]);
|
|
1418
|
-
const openCreate = () => {
|
|
1418
|
+
const openCreate = (parent) => {
|
|
1419
1419
|
setEditing(null);
|
|
1420
|
-
|
|
1420
|
+
if (parent) {
|
|
1421
|
+
setForm({
|
|
1422
|
+
...emptyForm2(),
|
|
1423
|
+
parentId: parent.resourceId,
|
|
1424
|
+
depth: resolveMenuDepth(parent.resourceId, allKnownMenus)
|
|
1425
|
+
});
|
|
1426
|
+
} else {
|
|
1427
|
+
setForm(emptyForm2());
|
|
1428
|
+
}
|
|
1421
1429
|
setDialogOpen(true);
|
|
1422
1430
|
void loadPermissionPoints();
|
|
1423
1431
|
};
|
|
@@ -1500,7 +1508,7 @@ function MenuManager({
|
|
|
1500
1508
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { style: styles2.title, children: title }),
|
|
1501
1509
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles2.toolbarRight, children: [
|
|
1502
1510
|
toolbarExtra,
|
|
1503
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", style: styles2.primaryBtn, onClick: openCreate, children: "\u65B0\u589E" })
|
|
1511
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", style: styles2.primaryBtn, onClick: () => openCreate(), children: "\u65B0\u589E" })
|
|
1504
1512
|
] })
|
|
1505
1513
|
] }),
|
|
1506
1514
|
error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles2.error, children: error }) : null,
|
|
@@ -1511,7 +1519,7 @@ function MenuManager({
|
|
|
1511
1519
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: { ...styles2.th, width: 90 }, children: "\u7C7B\u578B" }),
|
|
1512
1520
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: { ...styles2.th, width: 80 }, children: "\u53EF\u89C1" }),
|
|
1513
1521
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: styles2.th, children: "\u6743\u9650\u6807\u8BC6" }),
|
|
1514
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: { ...styles2.th, width:
|
|
1522
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: { ...styles2.th, width: 180 }, children: "\u64CD\u4F5C" })
|
|
1515
1523
|
] }) }),
|
|
1516
1524
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { colSpan: 6, style: styles2.empty, children: "\u52A0\u8F7D\u4E2D\u2026" }) }) : flatRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { colSpan: 6, style: styles2.empty, children: "\u6682\u65E0\u6570\u636E" }) }) : flatRows.map((row) => {
|
|
1517
1525
|
const leaf = isMenuLeaf(row);
|
|
@@ -1548,6 +1556,15 @@ function MenuManager({
|
|
|
1548
1556
|
) }),
|
|
1549
1557
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { style: styles2.td, children: renderPermissionLabels(row) }),
|
|
1550
1558
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("td", { style: styles2.td, children: [
|
|
1559
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1560
|
+
"button",
|
|
1561
|
+
{
|
|
1562
|
+
type: "button",
|
|
1563
|
+
style: styles2.linkBtn,
|
|
1564
|
+
onClick: () => openCreate(row),
|
|
1565
|
+
children: "\u65B0\u589E"
|
|
1566
|
+
}
|
|
1567
|
+
),
|
|
1551
1568
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", style: styles2.linkBtn, onClick: () => openEdit(row), children: "\u7F16\u8F91" }),
|
|
1552
1569
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1553
1570
|
"button",
|