@pubinfo/module-rbac 2.1.8 → 2.1.10-beta.1
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/{IconSelect-C5KTdyzv.js → IconSelect-C_Gj5G4I.js} +1 -1
- package/dist/{IconSelect-1pVgA_5l.js → IconSelect-CiLpc63Z.js} +139 -128
- package/dist/IconSelect.css +1 -1
- package/dist/{ResourceEdit-BX6xdiXV.js → ResourceEdit-BTaNdwC_.js} +2 -2
- package/dist/{ResourceEdit-Dwr5KLyS.js → ResourceEdit-w8qh1MFO.js} +1 -1
- package/dist/{blackWhiteList-FZezar30.js → blackWhiteList-CNQltBqC.js} +57 -56
- package/dist/blackWhiteList.css +1 -1
- package/dist/index.js +7 -7
- package/dist/{resource-B-gkg5Ti.js → resource-C7dXB0EE.js} +2 -2
- package/package.json +3 -3
- package/src/components/ResourceIcones/Select.vue +27 -8
- package/src/views/blackWhiteList/index.vue +2 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { h as _plugin_vue_export_helper_default } from "./index.js";
|
|
2
2
|
import { r as RESOURCE_TYPE } from "./enum-3E_sUqRF.js";
|
|
3
3
|
import { PubinfoIcon, getAllIconModules } from "pubinfo";
|
|
4
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, reactive, ref, renderList, renderSlot, resolveComponent, toDisplayString, unref, useModel, watch, withCtx } from "vue";
|
|
5
|
-
import * as AntdIcons from "@ant-design/icons-vue";
|
|
4
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, reactive, ref, renderList, renderSlot, resolveComponent, shallowRef, toDisplayString, unref, useModel, watch, withCtx } from "vue";
|
|
6
5
|
import { Empty } from "ant-design-vue";
|
|
7
6
|
import { Button, Empty as Empty$1, FormItem, FormItemRest, Input as Input$1, InputNumber, Modal as Modal$1, Pagination as Pagination$1, RadioButton, RadioGroup, Tooltip as Tooltip$1 } from "ant-design-vue/es";
|
|
8
7
|
import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-full select-none" }, _hoisted_2$2 = { class: "flex items-center gap-3" }, _hoisted_3$2 = { class: "relative inline-flex items-center" }, _hoisted_4$1 = ["disabled"], _hoisted_5$1 = ["value", "disabled"], _hoisted_6$1 = { class: "flex items-center gap-3" }, _hoisted_7$1 = { class: "relative inline-flex items-center" }, _hoisted_8$1 = ["disabled"], _hoisted_9$1 = ["value", "disabled"], _hoisted_10$1 = { class: "flex items-center gap-3" }, _hoisted_11$1 = { class: "flex items-center gap-3" }, _hoisted_12$1 = { class: "flex items-center gap-3" }, BoxColorPicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -73,15 +72,15 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
73
72
|
function l(e) {
|
|
74
73
|
return Math.min(100, Math.max(0, e));
|
|
75
74
|
}
|
|
76
|
-
let f = a(n.background), m = ref(f.from), h = ref(f.to), g = ref(i(n.angle)), _ = ref(o(n.radius)), v = ref(s(n.iconSize)), y = ref(null),
|
|
77
|
-
function
|
|
75
|
+
let f = a(n.background), m = ref(f.from), h = ref(f.to), g = ref(i(n.angle)), _ = ref(o(n.radius)), v = ref(s(n.iconSize)), y = ref(null), b = ref(null);
|
|
76
|
+
function x() {
|
|
78
77
|
if (n.disabled) return;
|
|
79
78
|
let e = y.value;
|
|
80
79
|
e && (e.style.width = "16px", e.style.height = "16px", e.click());
|
|
81
80
|
}
|
|
82
|
-
function
|
|
81
|
+
function S() {
|
|
83
82
|
if (n.disabled) return;
|
|
84
|
-
let e =
|
|
83
|
+
let e = b.value;
|
|
85
84
|
e && (e.style.width = "16px", e.style.height = "16px", e.click());
|
|
86
85
|
}
|
|
87
86
|
return watch([
|
|
@@ -122,7 +121,7 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
122
121
|
disabled: n.disabled,
|
|
123
122
|
class: normalizeClass(["w-4 h-4 rounded border border-gray-300 dark:border-gray-700", n.disabled ? "opacity-50 cursor-not-allowed" : ""]),
|
|
124
123
|
style: normalizeStyle({ background: m.value }),
|
|
125
|
-
onClick:
|
|
124
|
+
onClick: x
|
|
126
125
|
}, null, 14, _hoisted_4$1), createElementVNode("input", {
|
|
127
126
|
ref_key: "fromColorPickerRef",
|
|
128
127
|
ref: y,
|
|
@@ -151,10 +150,10 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
151
150
|
disabled: n.disabled,
|
|
152
151
|
class: normalizeClass(["w-4 h-4 rounded border border-gray-300 dark:border-gray-700", n.disabled ? "opacity-50 cursor-not-allowed" : ""]),
|
|
153
152
|
style: normalizeStyle({ background: h.value }),
|
|
154
|
-
onClick:
|
|
153
|
+
onClick: S
|
|
155
154
|
}, null, 14, _hoisted_8$1), createElementVNode("input", {
|
|
156
155
|
ref_key: "toColorPickerRef",
|
|
157
|
-
ref:
|
|
156
|
+
ref: b,
|
|
158
157
|
type: "color",
|
|
159
158
|
value: h.value,
|
|
160
159
|
disabled: n.disabled,
|
|
@@ -256,38 +255,50 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
256
255
|
"update:iconSize"
|
|
257
256
|
],
|
|
258
257
|
setup(e) {
|
|
259
|
-
let t =
|
|
258
|
+
let t = shallowRef([]), l = ref(!1);
|
|
259
|
+
async function f() {
|
|
260
|
+
if (!(t.value.length > 0 || l.value)) {
|
|
261
|
+
l.value = !0;
|
|
262
|
+
try {
|
|
263
|
+
let e = await import("@ant-design/icons-vue");
|
|
264
|
+
t.value = Object.keys(e).filter((e) => /(?:Outlined|Filled|TwoTone)$/.test(e)).map((e) => `antd:${e}`).sort();
|
|
265
|
+
} finally {
|
|
266
|
+
l.value = !1;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
let g = useModel(e, "modelValue"), C = useModel(e, "boxType"), w = useModel(e, "angle"), T = useModel(e, "background"), E = useModel(e, "radius"), D = useModel(e, "iconColor"), O = useModel(e, "iconSize"), k = ref(g.value), A = ref(C.value || "null"), j = ref(w.value ?? 65), M = ref(T.value ?? {
|
|
260
271
|
from: "#65E54A",
|
|
261
272
|
to: "#35C724"
|
|
262
|
-
}),
|
|
263
|
-
function
|
|
264
|
-
|
|
265
|
-
let e =
|
|
266
|
-
|
|
273
|
+
}), N = ref(E.value ?? "50%"), P = ref(O.value ?? "50%"), F = ref(D.value ?? ""), I = ref(null), L = ref(!1);
|
|
274
|
+
function R() {
|
|
275
|
+
f(), k.value = g.value, A.value = C.value || "null", j.value = w.value ?? 65;
|
|
276
|
+
let e = T.value;
|
|
277
|
+
M.value = typeof e == "string" ? e : e ? { ...e } : {
|
|
267
278
|
from: "#65E54A",
|
|
268
279
|
to: "#35C724"
|
|
269
|
-
},
|
|
280
|
+
}, N.value = E.value ?? "50%", P.value = O.value ?? "50%", F.value = D.value ?? "", L.value = !0;
|
|
270
281
|
}
|
|
271
|
-
function
|
|
272
|
-
|
|
282
|
+
function z() {
|
|
283
|
+
L.value = !1;
|
|
273
284
|
}
|
|
274
|
-
function
|
|
275
|
-
|
|
276
|
-
let e =
|
|
277
|
-
|
|
285
|
+
function B() {
|
|
286
|
+
g.value = k.value, C.value = A.value, w.value = j.value;
|
|
287
|
+
let e = M.value;
|
|
288
|
+
T.value = typeof e == "string" ? e : e && { ...e }, E.value = N.value, O.value = P.value, D.value = F.value, L.value = !1;
|
|
278
289
|
}
|
|
279
|
-
function
|
|
290
|
+
function V(e) {
|
|
280
291
|
return (e.split(/[\\/]/).pop() || e).replace(/\.(svg|png|jpe?g)$/i, "");
|
|
281
292
|
}
|
|
282
|
-
let
|
|
293
|
+
let H = computed(() => {
|
|
283
294
|
let e = /* @__PURE__ */ new Map(), t = getAllIconModules();
|
|
284
295
|
for (let [n, r] of t.entries()) {
|
|
285
|
-
let t = Object.keys(r).map(
|
|
296
|
+
let t = Object.keys(r).map(V).sort();
|
|
286
297
|
e.set(n, t);
|
|
287
298
|
}
|
|
288
299
|
return e;
|
|
289
|
-
}),
|
|
290
|
-
let e = Array.from(
|
|
300
|
+
}), U = computed(() => t.value), W = computed(() => {
|
|
301
|
+
let e = Array.from(H.value.keys()), t = e.includes("local"), n = e.filter((e) => e !== "local").sort();
|
|
291
302
|
return [
|
|
292
303
|
{
|
|
293
304
|
label: "全部",
|
|
@@ -306,9 +317,9 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
306
317
|
value: "antd"
|
|
307
318
|
}
|
|
308
319
|
];
|
|
309
|
-
}),
|
|
320
|
+
}), G = ref("all"), K = ref(""), q = computed(() => {
|
|
310
321
|
let e = [];
|
|
311
|
-
for (let [t, n] of
|
|
322
|
+
for (let [t, n] of H.value.entries()) n.forEach((n) => {
|
|
312
323
|
t === "local" ? e.push({
|
|
313
324
|
name: n,
|
|
314
325
|
module: t
|
|
@@ -317,76 +328,76 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
317
328
|
module: t
|
|
318
329
|
});
|
|
319
330
|
});
|
|
320
|
-
return
|
|
331
|
+
return U.value.forEach((t) => e.push({
|
|
321
332
|
name: t,
|
|
322
333
|
module: "antd"
|
|
323
334
|
})), e;
|
|
324
|
-
}),
|
|
325
|
-
let e =
|
|
326
|
-
return e ?
|
|
335
|
+
}), J = computed(() => G.value === "all" ? q.value : G.value === "antd" ? q.value.filter((e) => e.module === "antd") : q.value.filter((e) => e.module === G.value)), Y = computed(() => {
|
|
336
|
+
let e = K.value.trim().toLowerCase();
|
|
337
|
+
return e ? J.value.filter((t) => t.name.toLowerCase().includes(e)) : J.value;
|
|
327
338
|
});
|
|
328
|
-
function
|
|
329
|
-
return e === "all" ?
|
|
339
|
+
function Qe(e) {
|
|
340
|
+
return e === "all" ? q.value.length : e === "antd" ? q.value.filter((e) => e.module === "antd").length : q.value.filter((t) => t.module === e).length;
|
|
330
341
|
}
|
|
331
|
-
let
|
|
332
|
-
let e = (
|
|
333
|
-
return
|
|
342
|
+
let X = ref(1), Z = computed(() => Math.max(1, Math.ceil(Y.value.length / pageSize))), $e = computed(() => {
|
|
343
|
+
let e = (X.value - 1) * pageSize;
|
|
344
|
+
return Y.value.slice(e, e + pageSize);
|
|
334
345
|
});
|
|
335
|
-
watch([
|
|
336
|
-
|
|
337
|
-
}), watch(
|
|
338
|
-
|
|
346
|
+
watch([K, G], () => {
|
|
347
|
+
X.value = 1;
|
|
348
|
+
}), watch(Y, () => {
|
|
349
|
+
X.value > Z.value && (X.value = Z.value);
|
|
339
350
|
});
|
|
340
|
-
function
|
|
341
|
-
|
|
351
|
+
function et(e) {
|
|
352
|
+
X.value = e;
|
|
342
353
|
}
|
|
343
|
-
function
|
|
344
|
-
|
|
354
|
+
function tt(e) {
|
|
355
|
+
k.value = e.name;
|
|
345
356
|
}
|
|
346
|
-
let
|
|
347
|
-
function
|
|
348
|
-
if (!(
|
|
349
|
-
let e =
|
|
357
|
+
let nt = Empty.PRESENTED_IMAGE_SIMPLE;
|
|
358
|
+
function Q() {
|
|
359
|
+
if (!(k.value || "").startsWith("antd:")) return;
|
|
360
|
+
let e = I.value;
|
|
350
361
|
e && (e.style.width = "16px", e.style.height = "16px", e.click());
|
|
351
362
|
}
|
|
352
|
-
let $ = computed(() => (
|
|
353
|
-
return watch(
|
|
354
|
-
t === "null" && e !== "null" && !
|
|
355
|
-
}), (e,
|
|
356
|
-
let
|
|
357
|
-
return openBlock(), createElementBlock(Fragment, null, [renderSlot(e.$slots, "default", { open:
|
|
358
|
-
value:
|
|
363
|
+
let $ = computed(() => (k.value || "").startsWith("antd:"));
|
|
364
|
+
return watch(A, (e, t) => {
|
|
365
|
+
t === "null" && e !== "null" && !F.value && (F.value = "#ffffff");
|
|
366
|
+
}), (e, t) => {
|
|
367
|
+
let r = Tooltip$1, a = Input$1, l = Pagination$1, f = Empty$1, p = RadioButton, _ = RadioGroup, b = Button, Ze = Modal$1, x = FormItemRest;
|
|
368
|
+
return openBlock(), createElementBlock(Fragment, null, [renderSlot(e.$slots, "default", { open: R }, () => [createVNode(a, {
|
|
369
|
+
value: g.value,
|
|
359
370
|
readonly: "",
|
|
360
|
-
onClick:
|
|
371
|
+
onClick: R
|
|
361
372
|
}, {
|
|
362
|
-
addonAfter: withCtx(() => [createVNode(
|
|
373
|
+
addonAfter: withCtx(() => [createVNode(r, null, {
|
|
363
374
|
title: withCtx(() => [createVNode(unref(PubinfoIcon), {
|
|
364
|
-
name:
|
|
375
|
+
name: g.value || "",
|
|
365
376
|
size: "40px",
|
|
366
377
|
class: "cursor-default"
|
|
367
378
|
}, null, 8, ["name"])]),
|
|
368
379
|
default: withCtx(() => [createVNode(unref(PubinfoIcon), {
|
|
369
|
-
name:
|
|
380
|
+
name: g.value || "",
|
|
370
381
|
size: "20px",
|
|
371
382
|
class: "cursor-default"
|
|
372
383
|
}, null, 8, ["name"])]),
|
|
373
384
|
_: 1
|
|
374
385
|
})]),
|
|
375
386
|
_: 1
|
|
376
|
-
}, 8, ["value"])], !0), createVNode(
|
|
377
|
-
default: withCtx(() => [createVNode(
|
|
378
|
-
open:
|
|
379
|
-
"onUpdate:open":
|
|
387
|
+
}, 8, ["value"])], !0), createVNode(x, null, {
|
|
388
|
+
default: withCtx(() => [createVNode(Ze, {
|
|
389
|
+
open: L.value,
|
|
390
|
+
"onUpdate:open": t[8] ||= (e) => L.value = e,
|
|
380
391
|
title: "选择图标",
|
|
381
392
|
width: "1200px",
|
|
382
393
|
footer: null,
|
|
383
394
|
"destroy-on-close": "",
|
|
384
|
-
onCancel:
|
|
395
|
+
onCancel: z
|
|
385
396
|
}, {
|
|
386
397
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [
|
|
387
|
-
createElementVNode("div", _hoisted_2$1, [createElementVNode("div", _hoisted_3$1, [createVNode(
|
|
388
|
-
value:
|
|
389
|
-
"onUpdate:value":
|
|
398
|
+
createElementVNode("div", _hoisted_2$1, [createElementVNode("div", _hoisted_3$1, [createVNode(a, {
|
|
399
|
+
value: K.value,
|
|
400
|
+
"onUpdate:value": t[0] ||= (e) => K.value = e,
|
|
390
401
|
"allow-clear": "",
|
|
391
402
|
bordered: !0,
|
|
392
403
|
placeholder: "搜索图标",
|
|
@@ -398,52 +409,52 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
398
409
|
class: "text-[#7a869a]"
|
|
399
410
|
})]),
|
|
400
411
|
_: 1
|
|
401
|
-
}, 8, ["value"])]), createElementVNode("div", _hoisted_4, [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
412
|
+
}, 8, ["value"])]), createElementVNode("div", _hoisted_4, [(openBlock(!0), createElementBlock(Fragment, null, renderList(W.value, (e) => (openBlock(), createElementBlock("div", {
|
|
402
413
|
key: e.value,
|
|
403
|
-
class: normalizeClass(["flex items-center justify-between px-3 py-2 rounded-md cursor-pointer text-13px border border-transparent hover:bg-[#f3f6fa] dark:hover:bg-[#262c33] transition",
|
|
404
|
-
onClick: (t) =>
|
|
405
|
-
}, [createElementVNode("span", _hoisted_6, toDisplayString(e.label), 1), createElementVNode("span", _hoisted_7, toDisplayString(
|
|
406
|
-
createElementVNode("div", _hoisted_8, [
|
|
414
|
+
class: normalizeClass(["flex items-center justify-between px-3 py-2 rounded-md cursor-pointer text-13px border border-transparent hover:bg-[#f3f6fa] dark:hover:bg-[#262c33] transition", G.value === e.value ? "bg-[#eef5ff] dark:bg-[#1e2a33] border-[#1677ff] text-[#1677ff] font-medium" : "text-[#4b5563]"]),
|
|
415
|
+
onClick: (t) => G.value = e.value
|
|
416
|
+
}, [createElementVNode("span", _hoisted_6, toDisplayString(e.label), 1), createElementVNode("span", _hoisted_7, toDisplayString(Qe(e.value)), 1)], 10, _hoisted_5))), 128))])]),
|
|
417
|
+
createElementVNode("div", _hoisted_8, [Y.value.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("div", _hoisted_9, [(openBlock(!0), createElementBlock(Fragment, null, renderList($e.value, (e) => (openBlock(), createBlock(r, {
|
|
407
418
|
key: `${e.module || ""}:${e.name}`,
|
|
408
419
|
"mouse-enter-delay": .35
|
|
409
420
|
}, {
|
|
410
421
|
title: withCtx(() => [createElementVNode("div", _hoisted_10, [createElementVNode("div", _hoisted_11, toDisplayString(e.name), 1), e.module ? (openBlock(), createElementBlock("div", _hoisted_12, " 模块: " + toDisplayString(e.module), 1)) : createCommentVNode("", !0)])]),
|
|
411
422
|
default: withCtx(() => [createElementVNode("div", {
|
|
412
|
-
class: normalizeClass(["group relative flex flex-col items-center justify-center cursor-pointer rounded-md border",
|
|
413
|
-
onClick: (t) =>
|
|
423
|
+
class: normalizeClass(["group relative flex flex-col items-center justify-center cursor-pointer rounded-md border", k.value === e.name ? "border-solid border-[#1677ff]" : "border-dashed border-[#e5e7eb] dark:border-[#30363d]"]),
|
|
424
|
+
onClick: (t) => tt(e)
|
|
414
425
|
}, [createVNode(unref(PubinfoIcon), {
|
|
415
426
|
name: e.name,
|
|
416
427
|
size: "30px"
|
|
417
428
|
}, null, 8, ["name"])], 10, _hoisted_13)]),
|
|
418
429
|
_: 2
|
|
419
|
-
}, 1024))), 128))]), createElementVNode("div", _hoisted_14, [createVNode(
|
|
420
|
-
current:
|
|
430
|
+
}, 1024))), 128))]), createElementVNode("div", _hoisted_14, [createVNode(l, {
|
|
431
|
+
current: X.value,
|
|
421
432
|
"page-size": pageSize,
|
|
422
|
-
total:
|
|
433
|
+
total: Y.value.length,
|
|
423
434
|
"show-size-changer": !1,
|
|
424
435
|
"show-quick-jumper": "",
|
|
425
|
-
onChange:
|
|
426
|
-
}, null, 8, ["current", "total"])])], 64)) : (openBlock(), createElementBlock("div", _hoisted_15, [createVNode(
|
|
427
|
-
image: unref(
|
|
436
|
+
onChange: et
|
|
437
|
+
}, null, 8, ["current", "total"])])], 64)) : (openBlock(), createElementBlock("div", _hoisted_15, [createVNode(f, {
|
|
438
|
+
image: unref(nt),
|
|
428
439
|
description: "没有匹配的图标"
|
|
429
440
|
}, null, 8, ["image"])]))]),
|
|
430
|
-
|
|
431
|
-
createElementVNode("div", _hoisted_18, [createVNode(
|
|
432
|
-
value:
|
|
433
|
-
"onUpdate:value":
|
|
441
|
+
k.value ? (openBlock(), createElementBlock("div", _hoisted_16, [createElementVNode("div", _hoisted_17, [
|
|
442
|
+
createElementVNode("div", _hoisted_18, [createVNode(_, {
|
|
443
|
+
value: A.value,
|
|
444
|
+
"onUpdate:value": t[1] ||= (e) => A.value = e,
|
|
434
445
|
class: "flex justify-center items-center"
|
|
435
446
|
}, {
|
|
436
447
|
default: withCtx(() => [
|
|
437
|
-
createVNode(
|
|
448
|
+
createVNode(p, { value: "null" }, {
|
|
438
449
|
default: withCtx(() => [createElementVNode("div", _hoisted_19, [createVNode(unref(PubinfoIcon), {
|
|
439
|
-
name:
|
|
450
|
+
name: k.value,
|
|
440
451
|
size: previewBoxOuter - previewBoxPadding * 2
|
|
441
452
|
}, null, 8, ["name", "size"])])]),
|
|
442
453
|
_: 1
|
|
443
454
|
}),
|
|
444
|
-
createVNode(
|
|
455
|
+
createVNode(p, { value: "square" }, {
|
|
445
456
|
default: withCtx(() => [createElementVNode("div", _hoisted_20, [createVNode(unref(PubinfoIcon), {
|
|
446
|
-
name:
|
|
457
|
+
name: k.value,
|
|
447
458
|
box: "square",
|
|
448
459
|
size: previewBoxOuter,
|
|
449
460
|
radius: "25%",
|
|
@@ -451,9 +462,9 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
451
462
|
}, null, 8, ["name"])])]),
|
|
452
463
|
_: 1
|
|
453
464
|
}),
|
|
454
|
-
createVNode(
|
|
465
|
+
createVNode(p, { value: "prism" }, {
|
|
455
466
|
default: withCtx(() => [createElementVNode("div", _hoisted_21, [createVNode(unref(PubinfoIcon), {
|
|
456
|
-
name:
|
|
467
|
+
name: k.value,
|
|
457
468
|
box: "prism",
|
|
458
469
|
size: previewBoxOuter,
|
|
459
470
|
color: "#ffffff",
|
|
@@ -465,16 +476,16 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
465
476
|
_: 1
|
|
466
477
|
}, 8, ["value"])]),
|
|
467
478
|
createElementVNode("div", _hoisted_22, [
|
|
468
|
-
createElementVNode("div", _hoisted_23, [
|
|
469
|
-
angle:
|
|
470
|
-
"onUpdate:angle":
|
|
471
|
-
background:
|
|
472
|
-
"onUpdate:background":
|
|
473
|
-
radius:
|
|
474
|
-
"onUpdate:radius":
|
|
475
|
-
"icon-size":
|
|
476
|
-
"onUpdate:iconSize":
|
|
477
|
-
disabled:
|
|
479
|
+
createElementVNode("div", _hoisted_23, [t[9] ||= createElementVNode("div", { class: "text-12px mb-2 opacity-70" }, " 背景设置 ", -1), createVNode(BoxColorPicker_default, {
|
|
480
|
+
angle: j.value,
|
|
481
|
+
"onUpdate:angle": t[2] ||= (e) => j.value = e,
|
|
482
|
+
background: M.value,
|
|
483
|
+
"onUpdate:background": t[3] ||= (e) => M.value = e,
|
|
484
|
+
radius: N.value,
|
|
485
|
+
"onUpdate:radius": t[4] ||= (e) => N.value = e,
|
|
486
|
+
"icon-size": P.value,
|
|
487
|
+
"onUpdate:iconSize": t[5] ||= (e) => P.value = e,
|
|
488
|
+
disabled: A.value === "null"
|
|
478
489
|
}, null, 8, [
|
|
479
490
|
"angle",
|
|
480
491
|
"background",
|
|
@@ -482,19 +493,19 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
482
493
|
"icon-size",
|
|
483
494
|
"disabled"
|
|
484
495
|
])]),
|
|
485
|
-
createElementVNode("div", _hoisted_24, [createElementVNode("div", _hoisted_25, [createElementVNode("label", _hoisted_26, [
|
|
486
|
-
title: withCtx(() => [...
|
|
496
|
+
createElementVNode("div", _hoisted_24, [createElementVNode("div", _hoisted_25, [createElementVNode("label", _hoisted_26, [t[11] ||= createTextVNode(" 图标色 ", -1), createVNode(r, null, {
|
|
497
|
+
title: withCtx(() => [...t[10] ||= [createTextVNode(" 仅 Ant Design 图标有效 ", -1)]]),
|
|
487
498
|
default: withCtx(() => [createVNode(unref(PubinfoIcon), {
|
|
488
499
|
name: "i-carbon-information",
|
|
489
500
|
size: "12px",
|
|
490
501
|
class: "ml-1 cursor-help"
|
|
491
502
|
})]),
|
|
492
503
|
_: 1
|
|
493
|
-
})]), createElementVNode("div", _hoisted_27, [createVNode(
|
|
494
|
-
value:
|
|
495
|
-
"onUpdate:value":
|
|
504
|
+
})]), createElementVNode("div", _hoisted_27, [createVNode(a, {
|
|
505
|
+
value: F.value,
|
|
506
|
+
"onUpdate:value": t[7] ||= (e) => F.value = e,
|
|
496
507
|
"allow-clear": "",
|
|
497
|
-
placeholder:
|
|
508
|
+
placeholder: A.value === "null" ? "默认" : "#ffffff",
|
|
498
509
|
size: "small",
|
|
499
510
|
class: "flex-1 min-w-0",
|
|
500
511
|
disabled: !$.value
|
|
@@ -503,20 +514,20 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
503
514
|
type: "button",
|
|
504
515
|
disabled: !$.value,
|
|
505
516
|
class: normalizeClass(["w-4 h-4 rounded border border-gray-300 dark:border-gray-700", $.value ? "" : "opacity-50 cursor-not-allowed"]),
|
|
506
|
-
style: normalizeStyle({ background:
|
|
507
|
-
onClick:
|
|
517
|
+
style: normalizeStyle({ background: F.value || "#ffffff" }),
|
|
518
|
+
onClick: Q
|
|
508
519
|
}, null, 14, _hoisted_29), createElementVNode("input", {
|
|
509
520
|
ref_key: "iconColorPickerRef",
|
|
510
|
-
ref:
|
|
521
|
+
ref: I,
|
|
511
522
|
type: "color",
|
|
512
|
-
value:
|
|
523
|
+
value: F.value || "#ffffff",
|
|
513
524
|
disabled: !$.value,
|
|
514
525
|
class: "absolute left-0 top-0 opacity-0 pointer-events-none",
|
|
515
526
|
style: {
|
|
516
527
|
width: "16px",
|
|
517
528
|
height: "16px"
|
|
518
529
|
},
|
|
519
|
-
onInput:
|
|
530
|
+
onInput: t[6] ||= (e) => F.value = e.target.value
|
|
520
531
|
}, null, 40, _hoisted_30)])]),
|
|
521
532
|
_: 1
|
|
522
533
|
}, 8, [
|
|
@@ -524,21 +535,21 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
524
535
|
"placeholder",
|
|
525
536
|
"disabled"
|
|
526
537
|
])])])]),
|
|
527
|
-
createElementVNode("div", _hoisted_31, [createElementVNode("div", _hoisted_32, [
|
|
538
|
+
createElementVNode("div", _hoisted_31, [createElementVNode("div", _hoisted_32, [k.value ? (openBlock(), createElementBlock("div", _hoisted_33, [A.value === "null" ? (openBlock(), createBlock(unref(PubinfoIcon), {
|
|
528
539
|
key: 0,
|
|
529
|
-
name:
|
|
540
|
+
name: k.value,
|
|
530
541
|
size: 80,
|
|
531
|
-
color: $.value &&
|
|
542
|
+
color: $.value && F.value ? F.value : void 0
|
|
532
543
|
}, null, 8, ["name", "color"])) : (openBlock(), createBlock(unref(PubinfoIcon), {
|
|
533
544
|
key: 1,
|
|
534
|
-
name:
|
|
535
|
-
box:
|
|
545
|
+
name: k.value,
|
|
546
|
+
box: A.value,
|
|
536
547
|
size: 80,
|
|
537
|
-
angle:
|
|
538
|
-
background:
|
|
539
|
-
radius:
|
|
540
|
-
"icon-size":
|
|
541
|
-
color: $.value ?
|
|
548
|
+
angle: j.value,
|
|
549
|
+
background: M.value,
|
|
550
|
+
radius: N.value,
|
|
551
|
+
"icon-size": P.value,
|
|
552
|
+
color: $.value ? F.value || "#ffffff" : void 0
|
|
542
553
|
}, null, 8, [
|
|
543
554
|
"name",
|
|
544
555
|
"box",
|
|
@@ -549,14 +560,14 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
549
560
|
"color"
|
|
550
561
|
]))])) : createCommentVNode("", !0)])])
|
|
551
562
|
]),
|
|
552
|
-
createElementVNode("div", _hoisted_34, [createVNode(b, { onClick:
|
|
553
|
-
default: withCtx(() => [...
|
|
563
|
+
createElementVNode("div", _hoisted_34, [createVNode(b, { onClick: z }, {
|
|
564
|
+
default: withCtx(() => [...t[12] ||= [createTextVNode(" 取消 ", -1)]]),
|
|
554
565
|
_: 1
|
|
555
566
|
}), createVNode(b, {
|
|
556
567
|
type: "primary",
|
|
557
|
-
onClick:
|
|
568
|
+
onClick: B
|
|
558
569
|
}, {
|
|
559
|
-
default: withCtx(() => [...
|
|
570
|
+
default: withCtx(() => [...t[13] ||= [createTextVNode(" 确定 ", -1)]]),
|
|
560
571
|
_: 1
|
|
561
572
|
})])
|
|
562
573
|
])])) : createCommentVNode("", !0)
|
|
@@ -567,7 +578,7 @@ import './IconSelect.css';var _hoisted_1$2 = { class: "flex flex-col gap-3 w-ful
|
|
|
567
578
|
})], 64);
|
|
568
579
|
};
|
|
569
580
|
}
|
|
570
|
-
}), [["__scopeId", "data-v-
|
|
581
|
+
}), [["__scopeId", "data-v-21a5fc0d"]]), _hoisted_1 = ["onClick"], _hoisted_2 = ["onClick"], _hoisted_3 = { class: "flex flex-col items-center justify-center" }, IconSelect_default = /* @__PURE__ */ defineComponent({
|
|
571
582
|
name: "ResourceIconSelect",
|
|
572
583
|
__name: "IconSelect",
|
|
573
584
|
props: {
|
package/dist/IconSelect.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-21a5fc0d] .ant-radio-group{align-items:center;display:inline-flex}[data-v-21a5fc0d] .ant-radio-button-wrapper{flex:none;justify-content:center;align-items:center;padding:4px 10px;display:inline-flex;height:auto!important;line-height:1!important}[data-v-21a5fc0d] .ant-radio-button-wrapper>span{justify-content:center;align-items:center;display:inline-flex}
|
|
@@ -4,7 +4,7 @@ import "./enum-3mYayxff.js";
|
|
|
4
4
|
import "./enum-3E_sUqRF.js";
|
|
5
5
|
import "./DynamicRoutesForm-DP_sq_Uu.js";
|
|
6
6
|
import "./HoverCard-BDFcxxvk.js";
|
|
7
|
-
import "./IconSelect-
|
|
7
|
+
import "./IconSelect-CiLpc63Z.js";
|
|
8
8
|
import "./LayoutForm-Cp4bBrYl.js";
|
|
9
|
-
import { t as ResourceEdit_default } from "./ResourceEdit-
|
|
9
|
+
import { t as ResourceEdit_default } from "./ResourceEdit-w8qh1MFO.js";
|
|
10
10
|
export { ResourceEdit_default as default };
|
|
@@ -4,7 +4,7 @@ import { B as postRbacResourceResourceUpdate, F as getRbacResourceInfo, Lt as us
|
|
|
4
4
|
import { n as DATA_PERMISSION_TYPE, r as dataPermissionOptions } from "./enum-3mYayxff.js";
|
|
5
5
|
import { i as resourceOptions, n as RESOURCE_COLOR, r as RESOURCE_TYPE, t as ACTION } from "./enum-3E_sUqRF.js";
|
|
6
6
|
import { t as DynamicRoutesForm_default } from "./DynamicRoutesForm-DP_sq_Uu.js";
|
|
7
|
-
import { t as IconSelect_default } from "./IconSelect-
|
|
7
|
+
import { t as IconSelect_default } from "./IconSelect-CiLpc63Z.js";
|
|
8
8
|
import { t as LayoutForm_default } from "./LayoutForm-Cp4bBrYl.js";
|
|
9
9
|
import { PartyLoginModal } from "pubinfo";
|
|
10
10
|
import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, isRef, openBlock, reactive, ref, resolveComponent, toDisplayString, unref, withCtx } from "vue";
|
|
@@ -11,21 +11,13 @@ import './blackWhiteList.css';let ACTION = /* @__PURE__ */ function(e) {
|
|
|
11
11
|
return e.ADD = "新增", e.EDIT = "编辑", e.REMOVE = "删除", e.ENABLE = "启用", e.DISABLE = "停用", e;
|
|
12
12
|
}({});
|
|
13
13
|
var _hoisted_1 = {
|
|
14
|
-
"w-full": "",
|
|
15
|
-
"h-full": "",
|
|
16
|
-
"py-10px": "",
|
|
17
|
-
"px-10px": "",
|
|
18
|
-
flex: "",
|
|
19
|
-
"flex-col": "",
|
|
20
|
-
class: "page-black-white-list"
|
|
21
|
-
}, _hoisted_2 = {
|
|
22
14
|
key: 0,
|
|
23
15
|
class: "flex items-center"
|
|
24
|
-
},
|
|
16
|
+
}, _hoisted_2 = { class: "ml-4px" }, _hoisted_3 = ["onClick"], _hoisted_4 = { class: "ml-4px" }, _hoisted_5 = ["onClick"], _hoisted_6 = { class: "ml-4px" }, _hoisted_7 = ["onClick"], _hoisted_8 = { class: "ml-4px" }, _hoisted_9 = ["onClick"], _hoisted_10 = { class: "ml-4px" }, blackWhiteList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
25
17
|
name: "BlackWhiteList",
|
|
26
18
|
__name: "index",
|
|
27
|
-
setup(
|
|
28
|
-
let F =
|
|
19
|
+
setup(D) {
|
|
20
|
+
let P = useRoute(), F = computed(() => P.path.includes("blacklist")), I = computed(() => F.value ? 0 : 1), L = computed(() => F.value ? "blacklist" : "whitelist"), R = computed(() => `${L.value}_add`), z = computed(() => `${L.value}_edit`), B = computed(() => `${L.value}_delete`), V = computed(() => `${L.value}_enable`), H = computed(() => `${L.value}_disable`), { auth: U } = useAuth(), W = ref(), G = ref(), K = [
|
|
29
21
|
{
|
|
30
22
|
valueType: "a-input",
|
|
31
23
|
minWidth: 60,
|
|
@@ -80,31 +72,31 @@ var _hoisted_1 = {
|
|
|
80
72
|
}
|
|
81
73
|
];
|
|
82
74
|
async function q(e) {
|
|
83
|
-
let { current:
|
|
84
|
-
ip:
|
|
85
|
-
pageSize:
|
|
86
|
-
currentPage:
|
|
75
|
+
let { current: E, pageSize: D, ip: O, enable: A } = e, j = {
|
|
76
|
+
ip: O,
|
|
77
|
+
pageSize: D,
|
|
78
|
+
currentPage: E,
|
|
87
79
|
doSearchTotal: !0,
|
|
88
80
|
type: I.value
|
|
89
81
|
};
|
|
90
|
-
|
|
91
|
-
let
|
|
82
|
+
A !== void 0 && (j.enable = A);
|
|
83
|
+
let M = await postBlackWhiteListGetBlackWhiteListPageList(j);
|
|
92
84
|
return {
|
|
93
|
-
success:
|
|
94
|
-
data:
|
|
95
|
-
total:
|
|
85
|
+
success: M.success,
|
|
86
|
+
data: M.data?.records ?? [],
|
|
87
|
+
total: M.data?.total ?? 0
|
|
96
88
|
};
|
|
97
89
|
}
|
|
98
90
|
function J() {
|
|
99
91
|
W.value.reload();
|
|
100
92
|
}
|
|
101
93
|
let [Y, X] = useToggle(!1);
|
|
102
|
-
function Z(e,
|
|
94
|
+
function Z(e, D) {
|
|
103
95
|
Modal.confirm({
|
|
104
96
|
title: "删除",
|
|
105
97
|
content: `确定要删除该条${e}数据吗?`,
|
|
106
98
|
async onOk() {
|
|
107
|
-
X(!0), getBlackWhiteListDeleteById({ id:
|
|
99
|
+
X(!0), getBlackWhiteListDeleteById({ id: D?.id }).then((e) => {
|
|
108
100
|
e.success && (message.success("删除成功"), J());
|
|
109
101
|
}).finally(() => X(!1));
|
|
110
102
|
}
|
|
@@ -114,35 +106,44 @@ var _hoisted_1 = {
|
|
|
114
106
|
X(!0), postBlackWhiteListUpdateBlackWhiteList({
|
|
115
107
|
id: e?.id,
|
|
116
108
|
enable: !e?.enable
|
|
117
|
-
}).then((
|
|
118
|
-
if (
|
|
119
|
-
let
|
|
120
|
-
|
|
109
|
+
}).then((E) => {
|
|
110
|
+
if (E.success) {
|
|
111
|
+
let E = "";
|
|
112
|
+
E = e?.enable ? "停用成功!" : "启用成功!", message.success(E), J();
|
|
121
113
|
}
|
|
122
114
|
}).finally(() => X(!1));
|
|
123
115
|
}
|
|
124
|
-
function $(e,
|
|
116
|
+
function $(e, E) {
|
|
125
117
|
if (Y.value) return;
|
|
126
|
-
let
|
|
127
|
-
switch (
|
|
118
|
+
let D = "";
|
|
119
|
+
switch (D = F.value ? "黑名单" : "白名单", e) {
|
|
128
120
|
case ACTION.ADD:
|
|
129
|
-
G.value.open(e +
|
|
121
|
+
G.value.open(e + D, !1);
|
|
130
122
|
break;
|
|
131
123
|
case ACTION.EDIT:
|
|
132
|
-
G.value.open(e +
|
|
124
|
+
G.value.open(e + D, !0, E);
|
|
133
125
|
break;
|
|
134
126
|
case ACTION.REMOVE:
|
|
135
|
-
Z(
|
|
127
|
+
Z(D, E);
|
|
136
128
|
break;
|
|
137
129
|
case ACTION.ENABLE:
|
|
138
130
|
case ACTION.DISABLE:
|
|
139
|
-
Q(
|
|
131
|
+
Q(E);
|
|
140
132
|
break;
|
|
141
133
|
}
|
|
142
134
|
}
|
|
143
|
-
return (e,
|
|
144
|
-
let
|
|
145
|
-
return openBlock(), createElementBlock("div",
|
|
135
|
+
return (e, E) => {
|
|
136
|
+
let D = PlusCircleOutlined, O = Button, k = PubinfoIcon, M = Space$1, N = resolveDirective("auth");
|
|
137
|
+
return openBlock(), createElementBlock("div", {
|
|
138
|
+
key: unref(I),
|
|
139
|
+
"w-full": "",
|
|
140
|
+
"h-full": "",
|
|
141
|
+
"py-10px": "",
|
|
142
|
+
"px-10px": "",
|
|
143
|
+
flex: "",
|
|
144
|
+
"flex-col": "",
|
|
145
|
+
class: "page-black-white-list"
|
|
146
|
+
}, [createVNode(unref(ProTable), {
|
|
146
147
|
ref_key: "tableRef",
|
|
147
148
|
ref: W,
|
|
148
149
|
"row-key": "id",
|
|
@@ -151,22 +152,22 @@ var _hoisted_1 = {
|
|
|
151
152
|
"auto-height": "",
|
|
152
153
|
scroll: { x: 1e3 }
|
|
153
154
|
}, {
|
|
154
|
-
toolbar: withCtx(() => [withDirectives((openBlock(), createBlock(
|
|
155
|
+
toolbar: withCtx(() => [withDirectives((openBlock(), createBlock(O, {
|
|
155
156
|
type: "primary",
|
|
156
|
-
onClick:
|
|
157
|
+
onClick: E[0] ||= (e) => $(unref(ACTION).ADD)
|
|
157
158
|
}, {
|
|
158
|
-
default: withCtx(() => [createVNode(
|
|
159
|
+
default: withCtx(() => [createVNode(D), createTextVNode(" " + toDisplayString(unref(ACTION).ADD), 1)]),
|
|
159
160
|
_: 1
|
|
160
|
-
})), [[
|
|
161
|
-
bodyCell: withCtx(({ column: e, record:
|
|
161
|
+
})), [[N, unref(R)]])]),
|
|
162
|
+
bodyCell: withCtx(({ column: e, record: E }) => [e.dataIndex === "enable" ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("i", { class: normalizeClass(["status-mark", [{ active: E.enable }]]) }, null, 2), createElementVNode("span", _hoisted_2, toDisplayString(E.enable ? "启用" : "停用"), 1)])) : createCommentVNode("", !0), e.dataIndex === "action" ? (openBlock(), createBlock(M, { key: 1 }, {
|
|
162
163
|
default: withCtx(() => [
|
|
163
164
|
withDirectives((openBlock(), createElementBlock("a", {
|
|
164
165
|
class: "flex items-center hover:opacity-80",
|
|
165
|
-
onClick: (e) => $(unref(ACTION).EDIT,
|
|
166
|
-
}, [createVNode(
|
|
166
|
+
onClick: (e) => $(unref(ACTION).EDIT, E)
|
|
167
|
+
}, [createVNode(k, {
|
|
167
168
|
name: "edit",
|
|
168
169
|
class: "text-base"
|
|
169
|
-
}), createElementVNode("span",
|
|
170
|
+
}), createElementVNode("span", _hoisted_4, toDisplayString(unref(ACTION).EDIT), 1)], 8, _hoisted_3)), [[N, unref(z)]]),
|
|
170
171
|
withDirectives((openBlock(), createElementBlock("span", {
|
|
171
172
|
flex: "",
|
|
172
173
|
"items-center": "",
|
|
@@ -174,26 +175,26 @@ var _hoisted_1 = {
|
|
|
174
175
|
"hover:cursor-pointer": "",
|
|
175
176
|
"hover:text-red-500": "",
|
|
176
177
|
"hover:opacity-80": "",
|
|
177
|
-
onClick: (e) => $(unref(ACTION).REMOVE,
|
|
178
|
-
}, [createVNode(
|
|
178
|
+
onClick: (e) => $(unref(ACTION).REMOVE, E)
|
|
179
|
+
}, [createVNode(k, {
|
|
179
180
|
name: "remove",
|
|
180
181
|
class: "text-base"
|
|
181
|
-
}), createElementVNode("span",
|
|
182
|
-
|
|
182
|
+
}), createElementVNode("span", _hoisted_6, toDisplayString(unref(ACTION).REMOVE), 1)], 8, _hoisted_5)), [[N, unref(B)]]),
|
|
183
|
+
E.enable ? withDirectives((openBlock(), createElementBlock("a", {
|
|
183
184
|
key: 0,
|
|
184
185
|
class: "flex items-center",
|
|
185
|
-
onClick: (e) => $(unref(ACTION).DISABLE,
|
|
186
|
-
}, [createVNode(
|
|
186
|
+
onClick: (e) => $(unref(ACTION).DISABLE, E)
|
|
187
|
+
}, [createVNode(k, {
|
|
187
188
|
name: "blacklist-disable",
|
|
188
189
|
class: "text-20px"
|
|
189
|
-
}), createElementVNode("span",
|
|
190
|
+
}), createElementVNode("span", _hoisted_8, toDisplayString(unref(ACTION).DISABLE), 1)], 8, _hoisted_7)), [[N, unref(H)]]) : withDirectives((openBlock(), createElementBlock("a", {
|
|
190
191
|
key: 1,
|
|
191
192
|
class: "flex items-center",
|
|
192
|
-
onClick: (e) => $(unref(ACTION).ENABLE,
|
|
193
|
-
}, [createVNode(
|
|
193
|
+
onClick: (e) => $(unref(ACTION).ENABLE, E)
|
|
194
|
+
}, [createVNode(k, {
|
|
194
195
|
name: "blacklist-enable",
|
|
195
196
|
class: "text-20px"
|
|
196
|
-
}), createElementVNode("span",
|
|
197
|
+
}), createElementVNode("span", _hoisted_10, toDisplayString(unref(ACTION).ENABLE), 1)], 8, _hoisted_9)), [[N, unref(V)]])
|
|
197
198
|
]),
|
|
198
199
|
_: 2
|
|
199
200
|
}, 1024)) : createCommentVNode("", !0)]),
|
|
@@ -202,9 +203,9 @@ var _hoisted_1 = {
|
|
|
202
203
|
ref_key: "drawerRef",
|
|
203
204
|
ref: G,
|
|
204
205
|
type: unref(I),
|
|
205
|
-
onSubmit:
|
|
206
|
+
onSubmit: E[1] ||= (e) => J()
|
|
206
207
|
}, null, 8, ["type"])]);
|
|
207
208
|
};
|
|
208
209
|
}
|
|
209
|
-
}), [["__scopeId", "data-v-
|
|
210
|
+
}), [["__scopeId", "data-v-f7d838c2"]]);
|
|
210
211
|
export { blackWhiteList_default as default };
|
package/dist/blackWhiteList.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.page-black-white-list[data-v-
|
|
1
|
+
.page-black-white-list[data-v-f7d838c2] .ant-card.pro-table{border-top-left-radius:0;border-top-right-radius:0}.page-black-white-list .status-mark[data-v-f7d838c2]{--un-bg-opacity:1;background-color:rgb(174 174 174/var(--un-bg-opacity));border-radius:50%;width:.5rem;height:.5rem;margin-right:.25rem;display:inline-block}.page-black-white-list .status-mark.active[data-v-f7d838c2]{background:#01d689}
|
package/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ import './index.css';var _virtual_pubinfo_resolver_default = {
|
|
|
57
57
|
},
|
|
58
58
|
layouts: {},
|
|
59
59
|
pages: {
|
|
60
|
-
"src/views/blackWhiteList/index.vue": () => import("./blackWhiteList-
|
|
60
|
+
"src/views/blackWhiteList/index.vue": () => import("./blackWhiteList-CNQltBqC.js"),
|
|
61
61
|
"src/views/breadcrumb_setting/index.vue": () => import("./breadcrumb_setting-Ds-XJRR1.js"),
|
|
62
62
|
"src/views/components/HCheckList.vue": () => import("./HCheckList-B5Qk_HBI.js"),
|
|
63
63
|
"src/views/components/animation_item.vue": () => import("./animation_item-GzGItm3s.js"),
|
|
@@ -76,7 +76,7 @@ import './index.css';var _virtual_pubinfo_resolver_default = {
|
|
|
76
76
|
"src/views/page_w_setting/index.vue": () => import("./page_w_setting-CD_HtSUv.js"),
|
|
77
77
|
"src/views/position/index.vue": () => import("./position-CLpbgKGj.js"),
|
|
78
78
|
"src/views/region/index.vue": () => import("./region-Dd9pt_Si.js"),
|
|
79
|
-
"src/views/resource/index.vue": () => import("./resource-
|
|
79
|
+
"src/views/resource/index.vue": () => import("./resource-C7dXB0EE.js"),
|
|
80
80
|
"src/views/role/index.vue": () => import("./role-JGtvRObt.js"),
|
|
81
81
|
"src/views/role_group/index.vue": () => import("./role_group-CKOb_m63.js"),
|
|
82
82
|
"src/views/safe_setting/index.vue": () => import("./safe_setting-G_ZP-jWQ.js"),
|
|
@@ -101,11 +101,11 @@ import './index.css';var _virtual_pubinfo_resolver_default = {
|
|
|
101
101
|
"src/views/resource/components/ComponentSelect.vue": () => import("./ComponentSelect-WO-3S5rH.js"),
|
|
102
102
|
"src/views/resource/components/DynamicRoutesForm.vue": () => import("./DynamicRoutesForm-DjZ3eVLW.js"),
|
|
103
103
|
"src/views/resource/components/HoverCard.vue": () => import("./HoverCard-69ZIOivd.js"),
|
|
104
|
-
"src/views/resource/components/IconSelect.vue": () => import("./IconSelect-
|
|
104
|
+
"src/views/resource/components/IconSelect.vue": () => import("./IconSelect-C_Gj5G4I.js"),
|
|
105
105
|
"src/views/resource/components/ImportExport.vue": () => import("./ImportExport-CPy2rvv7.js"),
|
|
106
106
|
"src/views/resource/components/LayoutForm.vue": () => import("./LayoutForm-QFjwakyQ.js"),
|
|
107
107
|
"src/views/resource/components/MetaForm.vue": () => import("./MetaForm-Bb-um1Zo.js"),
|
|
108
|
-
"src/views/resource/components/ResourceEdit.vue": () => import("./ResourceEdit-
|
|
108
|
+
"src/views/resource/components/ResourceEdit.vue": () => import("./ResourceEdit-BTaNdwC_.js"),
|
|
109
109
|
"src/views/resource/components/RoleRelation.vue": () => import("./RoleRelation-CyTcqRfZ.js"),
|
|
110
110
|
"src/views/role/components/ResourceRelation.vue": () => import("./ResourceRelation-BIOzTOKA.js"),
|
|
111
111
|
"src/views/role/components/drawerRole.vue": () => import("./drawerRole-BNrbcSmr.js"),
|
|
@@ -1408,7 +1408,7 @@ var _baseUniq_default = baseUniq, unionBy_default = _baseRest_default(function(t
|
|
|
1408
1408
|
children: [
|
|
1409
1409
|
{
|
|
1410
1410
|
path: "resource",
|
|
1411
|
-
component: () => import("./resource-
|
|
1411
|
+
component: () => import("./resource-C7dXB0EE.js"),
|
|
1412
1412
|
name: "Resource",
|
|
1413
1413
|
meta: {
|
|
1414
1414
|
title: "资源管理",
|
|
@@ -1681,7 +1681,7 @@ var _baseUniq_default = baseUniq, unionBy_default = _baseRest_default(function(t
|
|
|
1681
1681
|
children: [
|
|
1682
1682
|
{
|
|
1683
1683
|
path: "blacklist",
|
|
1684
|
-
component: () => import("./blackWhiteList-
|
|
1684
|
+
component: () => import("./blackWhiteList-CNQltBqC.js"),
|
|
1685
1685
|
name: "Blacklist",
|
|
1686
1686
|
meta: {
|
|
1687
1687
|
title: "黑名单管理",
|
|
@@ -1692,7 +1692,7 @@ var _baseUniq_default = baseUniq, unionBy_default = _baseRest_default(function(t
|
|
|
1692
1692
|
},
|
|
1693
1693
|
{
|
|
1694
1694
|
path: "whitelist",
|
|
1695
|
-
component: () => import("./blackWhiteList-
|
|
1695
|
+
component: () => import("./blackWhiteList-CNQltBqC.js"),
|
|
1696
1696
|
name: "Whitelist",
|
|
1697
1697
|
meta: {
|
|
1698
1698
|
title: "白名单管理",
|
|
@@ -6,11 +6,11 @@ import "./enum-3mYayxff.js";
|
|
|
6
6
|
import { i as resourceOptions, n as RESOURCE_COLOR, r as RESOURCE_TYPE, t as ACTION } from "./enum-3E_sUqRF.js";
|
|
7
7
|
import "./DynamicRoutesForm-DP_sq_Uu.js";
|
|
8
8
|
import "./HoverCard-BDFcxxvk.js";
|
|
9
|
-
import "./IconSelect-
|
|
9
|
+
import "./IconSelect-CiLpc63Z.js";
|
|
10
10
|
import "./dayjs.min-sGDSMYRj.js";
|
|
11
11
|
import { t as ImportExport_default } from "./ImportExport-CL5uPlby.js";
|
|
12
12
|
import "./LayoutForm-Cp4bBrYl.js";
|
|
13
|
-
import { t as ResourceEdit_default } from "./ResourceEdit-
|
|
13
|
+
import { t as ResourceEdit_default } from "./ResourceEdit-w8qh1MFO.js";
|
|
14
14
|
import { t as RoleRelation_default } from "./RoleRelation-DzyVn5dk.js";
|
|
15
15
|
import { PubinfoIcon, useAuth } from "pubinfo";
|
|
16
16
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, resolveDirective, toDisplayString, unref, withCtx, withDirectives } from "vue";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/module-rbac",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.10-beta.1",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"alova": "^3.3.4",
|
|
26
26
|
"ant-design-vue": "^4.2.6",
|
|
27
27
|
"pinia": "^3.0.4",
|
|
28
|
-
"pubinfo": "2.1.
|
|
28
|
+
"pubinfo": "2.1.10-beta.1"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@destyler/color-picker": "^0.1.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"ant-design-vue": "^4.2.6",
|
|
52
52
|
"pinia": "^3.0.4",
|
|
53
53
|
"type-fest": "^4.41.0",
|
|
54
|
-
"pubinfo": "2.1.
|
|
54
|
+
"pubinfo": "2.1.10-beta.1"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"dev": "pubinfo build -w --sourcemap",
|
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import * as AntdIcons from '@ant-design/icons-vue';
|
|
3
2
|
import { Empty } from 'ant-design-vue';
|
|
4
3
|
import { getAllIconModules, PubinfoIcon } from 'pubinfo';
|
|
5
|
-
import { computed, ref, watch } from 'vue';
|
|
4
|
+
import { computed, ref, shallowRef, watch } from 'vue';
|
|
6
5
|
import ResourceIconesBoxColorPicker from './BoxColorPicker.vue';
|
|
7
6
|
|
|
8
7
|
defineOptions({ name: 'ResourceIconesSelect' });
|
|
9
8
|
|
|
9
|
+
// 懒加载 Ant Design 图标名称列表,避免全量打包
|
|
10
|
+
const antdIconNames = shallowRef<string[]>([]);
|
|
11
|
+
const antdIconsLoading = ref(false);
|
|
12
|
+
|
|
13
|
+
async function loadAntdIconNames() {
|
|
14
|
+
if (antdIconNames.value.length > 0 || antdIconsLoading.value) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
antdIconsLoading.value = true;
|
|
18
|
+
try {
|
|
19
|
+
// 动态导入,仅在需要时加载
|
|
20
|
+
const AntdIcons = await import('@ant-design/icons-vue');
|
|
21
|
+
antdIconNames.value = Object.keys(AntdIcons)
|
|
22
|
+
.filter(n => /(?:Outlined|Filled|TwoTone)$/.test(n))
|
|
23
|
+
.map(n => `antd:${n}`)
|
|
24
|
+
.sort();
|
|
25
|
+
}
|
|
26
|
+
finally {
|
|
27
|
+
antdIconsLoading.value = false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
10
31
|
// v-model(对外的值)
|
|
11
32
|
const modelValueRef = defineModel<string>();
|
|
12
33
|
// 额外样式参数的多路 v-model:边框(boxType)、角度(angle)、背景(background)、圆角(radius)、图标色(iconColor)
|
|
@@ -33,6 +54,8 @@ const iconColorPickerRef = ref<HTMLInputElement | null>(null);
|
|
|
33
54
|
// 弹窗
|
|
34
55
|
const visibleRef = ref(false);
|
|
35
56
|
function handleOpenModal() {
|
|
57
|
+
// 打开时加载 AntD 图标名称
|
|
58
|
+
loadAntdIconNames();
|
|
36
59
|
// 打开时同步一次外部值到临时值,避免未确认的变更影响外部
|
|
37
60
|
tempValueRef.value = modelValueRef.value;
|
|
38
61
|
// 同步样式参数到对话框内部状态
|
|
@@ -88,12 +111,8 @@ const moduleIconMap = computed(() => {
|
|
|
88
111
|
return m;
|
|
89
112
|
});
|
|
90
113
|
|
|
91
|
-
// AntD 图标(带前缀 antd
|
|
92
|
-
const antdIcons = computed<string[]>(() =>
|
|
93
|
-
.filter(n => /(?:Outlined|Filled|TwoTone)$/.test(n))
|
|
94
|
-
.map(n => `antd:${n}`)
|
|
95
|
-
.sort(),
|
|
96
|
-
);
|
|
114
|
+
// AntD 图标(带前缀 antd:)- 使用懒加载的数据
|
|
115
|
+
const antdIcons = computed<string[]>(() => antdIconNames.value);
|
|
97
116
|
|
|
98
117
|
// 模块列表(全部 + 本地(local) 优先 + 其余模块 + Ant Design)
|
|
99
118
|
const moduleOptions = computed(() => {
|
|
@@ -12,7 +12,7 @@ defineOptions({
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
const route = useRoute();
|
|
15
|
-
const isBlacklistMode =
|
|
15
|
+
const isBlacklistMode = computed(() => route.path.includes('blacklist'));
|
|
16
16
|
|
|
17
17
|
// 黑名单0,白名单1
|
|
18
18
|
const currentType = computed(() => {
|
|
@@ -196,6 +196,7 @@ function onAction(key: string, record?: API.PubBlackWhiteList): void {
|
|
|
196
196
|
|
|
197
197
|
<template>
|
|
198
198
|
<div
|
|
199
|
+
:key="currentType"
|
|
199
200
|
w-full
|
|
200
201
|
h-full
|
|
201
202
|
py-10px
|