com-angel-authorization 1.0.27 → 1.0.28
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 +29 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +30 -2
- package/dist/react/index.js.map +1 -1
- package/dist/vue/index.cjs +30 -2
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +30 -2
- package/dist/vue/index.js.map +1 -1
- package/package.json +1 -1
package/dist/vue/index.cjs
CHANGED
|
@@ -1835,6 +1835,7 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
1835
1835
|
const saving = (0, import_vue4.ref)(false);
|
|
1836
1836
|
const deletingRow = (0, import_vue4.ref)(null);
|
|
1837
1837
|
const deleting = (0, import_vue4.ref)(false);
|
|
1838
|
+
const permissionKeyword = (0, import_vue4.ref)("");
|
|
1838
1839
|
const permissionNameMap = (0, import_vue4.computed)(() => {
|
|
1839
1840
|
const map = /* @__PURE__ */ new Map();
|
|
1840
1841
|
permissionPoints.value.forEach(
|
|
@@ -1842,6 +1843,13 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
1842
1843
|
);
|
|
1843
1844
|
return map;
|
|
1844
1845
|
});
|
|
1846
|
+
const filteredPermissionPoints = (0, import_vue4.computed)(() => {
|
|
1847
|
+
const kw = permissionKeyword.value.trim().toLowerCase();
|
|
1848
|
+
if (!kw) return permissionPoints.value;
|
|
1849
|
+
return permissionPoints.value.filter(
|
|
1850
|
+
(p) => p.name.toLowerCase().includes(kw) || p.identification.toLowerCase().includes(kw)
|
|
1851
|
+
);
|
|
1852
|
+
});
|
|
1845
1853
|
const allKnownMenus = (0, import_vue4.computed)(() => {
|
|
1846
1854
|
const map = /* @__PURE__ */ new Map();
|
|
1847
1855
|
records.value.forEach((row) => map.set(row.resourceId, row));
|
|
@@ -1947,6 +1955,7 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
1947
1955
|
}
|
|
1948
1956
|
function openCreate(parent) {
|
|
1949
1957
|
editing.value = null;
|
|
1958
|
+
permissionKeyword.value = "";
|
|
1950
1959
|
if (parent) {
|
|
1951
1960
|
Object.assign(form, {
|
|
1952
1961
|
...emptyForm2(),
|
|
@@ -1962,6 +1971,7 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
1962
1971
|
function openEdit(row) {
|
|
1963
1972
|
const parentId = resolveRowParentId(row);
|
|
1964
1973
|
editing.value = row;
|
|
1974
|
+
permissionKeyword.value = "";
|
|
1965
1975
|
Object.assign(form, {
|
|
1966
1976
|
parentId,
|
|
1967
1977
|
depth: row.depth > 0 ? row.depth : resolveMenuDepth(parentId, allKnownMenus.value),
|
|
@@ -1976,7 +1986,10 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
1976
1986
|
void loadPermissionPoints();
|
|
1977
1987
|
}
|
|
1978
1988
|
function closeDialog() {
|
|
1979
|
-
if (!saving.value)
|
|
1989
|
+
if (!saving.value) {
|
|
1990
|
+
dialogOpen.value = false;
|
|
1991
|
+
permissionKeyword.value = "";
|
|
1992
|
+
}
|
|
1980
1993
|
}
|
|
1981
1994
|
async function handleSubmit(event) {
|
|
1982
1995
|
event.preventDefault();
|
|
@@ -2324,6 +2337,21 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
2324
2337
|
]),
|
|
2325
2338
|
(0, import_vue4.h)("fieldset", { style: s2.fieldset }, [
|
|
2326
2339
|
(0, import_vue4.h)("legend", { style: s2.label }, "\u6743\u9650\u6807\u8BC6"),
|
|
2340
|
+
permissionPoints.value.length > 0 ? [
|
|
2341
|
+
(0, import_vue4.h)("input", {
|
|
2342
|
+
style: { ...s2.input, marginBottom: "8px" },
|
|
2343
|
+
value: permissionKeyword.value,
|
|
2344
|
+
placeholder: "\u641C\u7D22\u6743\u9650\u540D\u79F0 / \u6807\u8BC6",
|
|
2345
|
+
onInput: (e) => {
|
|
2346
|
+
permissionKeyword.value = e.target.value;
|
|
2347
|
+
}
|
|
2348
|
+
}),
|
|
2349
|
+
(0, import_vue4.h)(
|
|
2350
|
+
"div",
|
|
2351
|
+
{ style: s2.hint },
|
|
2352
|
+
permissionKeyword.value.trim() ? `\u5DF2\u9009 ${form.permissionPointIds.length} \u9879 \xB7 \u5339\u914D ${filteredPermissionPoints.value.length} / ${permissionPoints.value.length}` : `\u5DF2\u9009 ${form.permissionPointIds.length} \u9879 \xB7 \u5171 ${permissionPoints.value.length} \u9879`
|
|
2353
|
+
)
|
|
2354
|
+
] : null,
|
|
2327
2355
|
(0, import_vue4.h)(
|
|
2328
2356
|
"div",
|
|
2329
2357
|
{ style: s2.multiSelect },
|
|
@@ -2333,7 +2361,7 @@ var MenuManager = (0, import_vue4.defineComponent)({
|
|
|
2333
2361
|
{ style: s2.hint },
|
|
2334
2362
|
"\u6682\u65E0\u6743\u9650\u70B9\uFF0C\u8BF7\u5148\u5728\u6743\u9650\u70B9\u7BA1\u7406\u4E2D\u65B0\u589E"
|
|
2335
2363
|
)
|
|
2336
|
-
] :
|
|
2364
|
+
] : filteredPermissionPoints.value.length === 0 ? [(0, import_vue4.h)("div", { style: s2.hint }, "\u65E0\u5339\u914D\u6743\u9650\u70B9")] : filteredPermissionPoints.value.map(
|
|
2337
2365
|
(p) => (0, import_vue4.h)(
|
|
2338
2366
|
"label",
|
|
2339
2367
|
{ key: p.resourceId, style: s2.checkItem },
|