com-angel-authorization 1.0.24 → 1.0.25
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/README.md +1 -0
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +29 -5
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +4 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.js +29 -5
- package/dist/react/index.js.map +1 -1
- package/dist/vue/index.cjs +28 -5
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.cts +4 -0
- package/dist/vue/index.d.ts +4 -0
- package/dist/vue/index.js +28 -5
- package/dist/vue/index.js.map +1 -1
- package/package.json +1 -1
package/dist/vue/index.cjs
CHANGED
|
@@ -623,6 +623,9 @@ function mapMenuResource(item) {
|
|
|
623
623
|
const depth = Number.isFinite(parsedDepth) && parsedDepth > 0 ? Math.floor(parsedDepth) : parentId ? ROOT_MENU_DEPTH + 1 : ROOT_MENU_DEPTH;
|
|
624
624
|
const rawLeaf = row.leaf;
|
|
625
625
|
const leaf = rawLeaf === true || rawLeaf === 1 || rawLeaf === "1" || String(rawLeaf).toLowerCase() === "true" ? MENU_LEAF_YES : Number(rawLeaf) === MENU_LEAF_YES ? MENU_LEAF_YES : 0;
|
|
626
|
+
const rawSort = row.sort ?? row.order ?? row.sortOrder ?? row.sort_order;
|
|
627
|
+
const parsedSort = Number(rawSort);
|
|
628
|
+
const sort = Number.isFinite(parsedSort) ? Math.floor(parsedSort) : 0;
|
|
626
629
|
return {
|
|
627
630
|
resourceId: String(resourceId),
|
|
628
631
|
parentId,
|
|
@@ -633,7 +636,8 @@ function mapMenuResource(item) {
|
|
|
633
636
|
identification: String(row.identification ?? row.identity ?? row.path ?? ""),
|
|
634
637
|
permissionPointIds,
|
|
635
638
|
permissionPointNames,
|
|
636
|
-
status: toResourceStatus(row.status)
|
|
639
|
+
status: toResourceStatus(row.status),
|
|
640
|
+
sort
|
|
637
641
|
};
|
|
638
642
|
}
|
|
639
643
|
function isMenuLeaf(row) {
|
|
@@ -687,7 +691,8 @@ function buildCreateMenuBody(values, resourceId = getAppClientId()) {
|
|
|
687
691
|
name: values.name.trim(),
|
|
688
692
|
identification: values.identification.trim(),
|
|
689
693
|
permissionPointIds: [...values.permissionPointIds],
|
|
690
|
-
status: values.status
|
|
694
|
+
status: values.status,
|
|
695
|
+
sort: Number.isFinite(Number(values.sort)) ? Math.floor(Number(values.sort)) : 0
|
|
691
696
|
};
|
|
692
697
|
}
|
|
693
698
|
function buildUpdateMenuBody(values) {
|
|
@@ -699,7 +704,8 @@ function buildUpdateMenuBody(values) {
|
|
|
699
704
|
name: values.name.trim(),
|
|
700
705
|
identification: values.identification.trim(),
|
|
701
706
|
permissionPointIds: [...values.permissionPointIds],
|
|
702
|
-
status: values.status
|
|
707
|
+
status: values.status,
|
|
708
|
+
sort: Number.isFinite(Number(values.sort)) ? Math.floor(Number(values.sort)) : 0
|
|
703
709
|
};
|
|
704
710
|
}
|
|
705
711
|
function createAuthorizationResourceApi(request) {
|
|
@@ -1509,7 +1515,8 @@ function emptyForm2() {
|
|
|
1509
1515
|
name: "",
|
|
1510
1516
|
identification: "",
|
|
1511
1517
|
permissionPointIds: [],
|
|
1512
|
-
status: RESOURCE_STATUS_ENABLED
|
|
1518
|
+
status: RESOURCE_STATUS_ENABLED,
|
|
1519
|
+
sort: 0
|
|
1513
1520
|
};
|
|
1514
1521
|
}
|
|
1515
1522
|
var s2 = {
|
|
@@ -1933,7 +1940,8 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
1933
1940
|
name: row.name,
|
|
1934
1941
|
identification: row.identification,
|
|
1935
1942
|
permissionPointIds: [...row.permissionPointIds],
|
|
1936
|
-
status: row.status
|
|
1943
|
+
status: row.status,
|
|
1944
|
+
sort: Number.isFinite(row.sort) ? row.sort : 0
|
|
1937
1945
|
});
|
|
1938
1946
|
dialogOpen.value = true;
|
|
1939
1947
|
void loadPermissionPoints();
|
|
@@ -2263,6 +2271,21 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
2263
2271
|
}
|
|
2264
2272
|
})
|
|
2265
2273
|
]),
|
|
2274
|
+
(0, import_vue4.h)("label", { style: s2.field }, [
|
|
2275
|
+
(0, import_vue4.h)("span", { style: s2.label }, "\u663E\u793A\u6392\u5E8F"),
|
|
2276
|
+
(0, import_vue4.h)("input", {
|
|
2277
|
+
style: s2.input,
|
|
2278
|
+
type: "number",
|
|
2279
|
+
value: form.sort,
|
|
2280
|
+
placeholder: "\u6570\u503C\u8D8A\u5C0F\u8D8A\u9760\u524D",
|
|
2281
|
+
onInput: (e) => {
|
|
2282
|
+
const value = Number(
|
|
2283
|
+
e.target.value
|
|
2284
|
+
);
|
|
2285
|
+
form.sort = Number.isFinite(value) ? Math.floor(value) : 0;
|
|
2286
|
+
}
|
|
2287
|
+
})
|
|
2288
|
+
]),
|
|
2266
2289
|
(0, import_vue4.h)("label", { style: s2.field }, [
|
|
2267
2290
|
(0, import_vue4.h)("span", { style: s2.label }, "\u8BF7\u6C42\u5730\u5740"),
|
|
2268
2291
|
(0, import_vue4.h)("input", {
|