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.js
CHANGED
|
@@ -1761,6 +1761,7 @@ var MenuManager = defineComponent3({
|
|
|
1761
1761
|
const saving = ref2(false);
|
|
1762
1762
|
const deletingRow = ref2(null);
|
|
1763
1763
|
const deleting = ref2(false);
|
|
1764
|
+
const permissionKeyword = ref2("");
|
|
1764
1765
|
const permissionNameMap = computed3(() => {
|
|
1765
1766
|
const map = /* @__PURE__ */ new Map();
|
|
1766
1767
|
permissionPoints.value.forEach(
|
|
@@ -1768,6 +1769,13 @@ var MenuManager = defineComponent3({
|
|
|
1768
1769
|
);
|
|
1769
1770
|
return map;
|
|
1770
1771
|
});
|
|
1772
|
+
const filteredPermissionPoints = computed3(() => {
|
|
1773
|
+
const kw = permissionKeyword.value.trim().toLowerCase();
|
|
1774
|
+
if (!kw) return permissionPoints.value;
|
|
1775
|
+
return permissionPoints.value.filter(
|
|
1776
|
+
(p) => p.name.toLowerCase().includes(kw) || p.identification.toLowerCase().includes(kw)
|
|
1777
|
+
);
|
|
1778
|
+
});
|
|
1771
1779
|
const allKnownMenus = computed3(() => {
|
|
1772
1780
|
const map = /* @__PURE__ */ new Map();
|
|
1773
1781
|
records.value.forEach((row) => map.set(row.resourceId, row));
|
|
@@ -1873,6 +1881,7 @@ var MenuManager = defineComponent3({
|
|
|
1873
1881
|
}
|
|
1874
1882
|
function openCreate(parent) {
|
|
1875
1883
|
editing.value = null;
|
|
1884
|
+
permissionKeyword.value = "";
|
|
1876
1885
|
if (parent) {
|
|
1877
1886
|
Object.assign(form, {
|
|
1878
1887
|
...emptyForm2(),
|
|
@@ -1888,6 +1897,7 @@ var MenuManager = defineComponent3({
|
|
|
1888
1897
|
function openEdit(row) {
|
|
1889
1898
|
const parentId = resolveRowParentId(row);
|
|
1890
1899
|
editing.value = row;
|
|
1900
|
+
permissionKeyword.value = "";
|
|
1891
1901
|
Object.assign(form, {
|
|
1892
1902
|
parentId,
|
|
1893
1903
|
depth: row.depth > 0 ? row.depth : resolveMenuDepth(parentId, allKnownMenus.value),
|
|
@@ -1902,7 +1912,10 @@ var MenuManager = defineComponent3({
|
|
|
1902
1912
|
void loadPermissionPoints();
|
|
1903
1913
|
}
|
|
1904
1914
|
function closeDialog() {
|
|
1905
|
-
if (!saving.value)
|
|
1915
|
+
if (!saving.value) {
|
|
1916
|
+
dialogOpen.value = false;
|
|
1917
|
+
permissionKeyword.value = "";
|
|
1918
|
+
}
|
|
1906
1919
|
}
|
|
1907
1920
|
async function handleSubmit(event) {
|
|
1908
1921
|
event.preventDefault();
|
|
@@ -2250,6 +2263,21 @@ var MenuManager = defineComponent3({
|
|
|
2250
2263
|
]),
|
|
2251
2264
|
h2("fieldset", { style: s2.fieldset }, [
|
|
2252
2265
|
h2("legend", { style: s2.label }, "\u6743\u9650\u6807\u8BC6"),
|
|
2266
|
+
permissionPoints.value.length > 0 ? [
|
|
2267
|
+
h2("input", {
|
|
2268
|
+
style: { ...s2.input, marginBottom: "8px" },
|
|
2269
|
+
value: permissionKeyword.value,
|
|
2270
|
+
placeholder: "\u641C\u7D22\u6743\u9650\u540D\u79F0 / \u6807\u8BC6",
|
|
2271
|
+
onInput: (e) => {
|
|
2272
|
+
permissionKeyword.value = e.target.value;
|
|
2273
|
+
}
|
|
2274
|
+
}),
|
|
2275
|
+
h2(
|
|
2276
|
+
"div",
|
|
2277
|
+
{ style: s2.hint },
|
|
2278
|
+
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`
|
|
2279
|
+
)
|
|
2280
|
+
] : null,
|
|
2253
2281
|
h2(
|
|
2254
2282
|
"div",
|
|
2255
2283
|
{ style: s2.multiSelect },
|
|
@@ -2259,7 +2287,7 @@ var MenuManager = defineComponent3({
|
|
|
2259
2287
|
{ style: s2.hint },
|
|
2260
2288
|
"\u6682\u65E0\u6743\u9650\u70B9\uFF0C\u8BF7\u5148\u5728\u6743\u9650\u70B9\u7BA1\u7406\u4E2D\u65B0\u589E"
|
|
2261
2289
|
)
|
|
2262
|
-
] :
|
|
2290
|
+
] : filteredPermissionPoints.value.length === 0 ? [h2("div", { style: s2.hint }, "\u65E0\u5339\u914D\u6743\u9650\u70B9")] : filteredPermissionPoints.value.map(
|
|
2263
2291
|
(p) => h2(
|
|
2264
2292
|
"label",
|
|
2265
2293
|
{ key: p.resourceId, style: s2.checkItem },
|