@pubinfo/module-rbac 2.1.10 → 2.1.12
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/{ComponentSelect-A7uGTuHW.js → ComponentSelect-CYmAgdm3.js} +998 -963
- package/dist/DynamicRoutesForm-CMF3oh8h.js +171 -0
- package/dist/HCheckList-CAhQwX7m.js +39 -0
- package/dist/HoverCard-B-uU48hF.js +46 -0
- package/dist/IconSelect-CvxGRN_O.js +719 -0
- package/dist/ImportExport-CzZssb7_.js +345 -0
- package/dist/ImportExport-b1SnWRLj.js +6 -0
- package/dist/LayoutForm-Bpdyi_2o.js +129 -0
- package/dist/MetaForm-ZLzLz68d.js +39037 -0
- package/dist/OrgAndPosition-B0RE1Vc_.js +187 -0
- package/dist/OrgSelector-C2rPIonI.js +4877 -0
- package/dist/OrgSelector.css +1 -0
- package/dist/ResourceEdit-9fvxbd0K.js +383 -0
- package/dist/ResourceEdit-BMqfJ3aQ.js +13 -0
- package/dist/ResourceRelation-BrluMHdX.js +81 -0
- package/dist/ResourceRelation-IJvXnlpo.js +95 -0
- package/dist/RoleRelation-DuRuQG08.js +82 -0
- package/dist/RoleSelector-BTNYbcC6.js +282 -0
- package/dist/TenantEdit-Df3gZKLA.js +249 -0
- package/dist/UserAuthorization-DX7jNDDe.js +237 -0
- package/dist/UserEdit-BLb0n7WM.js +322 -0
- package/dist/_baseClone-C7vkGgsW.js +138 -0
- package/dist/_initCloneObject-r-eWKqzl.js +531 -0
- package/dist/add-child-DPb_m2by.js +4 -0
- package/dist/{animation_item-DBOz2rcX.js → animation_item-Coe-B0jQ.js} +24 -19
- package/dist/assist-BRMYD-oT.js +89 -0
- package/dist/authority-B9wtmsQd.js +4 -0
- package/dist/authorize-DxrutyIG.js +4 -0
- package/dist/blackWhiteList-d6TVsK48.js +214 -0
- package/dist/blacklist-disable-BKSw91qq.js +4 -0
- package/dist/blacklist-enable-CIB1fOHT.js +4 -0
- package/dist/breadcrumb_setting-DMbvWP5t.js +111 -0
- package/dist/browser-chrome-CM60RcrG.js +4 -0
- package/dist/browser-edge-4LBRzooM.js +4 -0
- package/dist/browser-ie-BF-wqbf6.js +4 -0
- package/dist/browser-other-iXJH-9iL.js +4 -0
- package/dist/browser-safari-CIpt0yPc.js +4 -0
- package/dist/browserType-Bik20-72.js +28 -0
- package/dist/chunk-WQLz0Won.js +20 -0
- package/dist/cloneDeep-REaxTPsZ.js +8 -0
- package/dist/createAndEditDataPermission-OunqmBu_.js +438 -0
- package/dist/data-permission-2pzeFLxP.js +159 -0
- package/dist/{dayjs.min-Cb7gQFd4.js → dayjs.min-CJunOGCc.js} +5 -3
- package/dist/dictionary-DGqlAhRk.js +182 -0
- package/dist/dist-DxAYQq3U.js +21 -0
- package/dist/drawerBlackWhiteList-VxyjaBkA.js +123 -0
- package/dist/drawerDictionary-DhAB-LV9.js +129 -0
- package/dist/drawerDictionaryItem-DYsJzZ2f.js +141 -0
- package/dist/drawerGroup-CTO8Lmbb.js +189 -0
- package/dist/drawerOrganization-DWhTc1fB.js +253 -0
- package/dist/drawerPosition-BmM9mLlP.js +169 -0
- package/dist/drawerRegion-BD-xc1x2.js +189 -0
- package/dist/drawerRole-B348x40k.js +214 -0
- package/dist/drawerRole-CgAPM-0g.js +172 -0
- package/dist/drawerRole-Cjp9iDsa.js +157 -0
- package/dist/edit-Drp8yjRe.js +4 -0
- package/dist/enum-CG0P82pn.js +6 -0
- package/dist/{enum-3E_sUqRF.js → enum-CR5ztb5v2.js} +15 -14
- package/dist/enum-CYCebJeC.js +62 -0
- package/dist/enum-DS4SGhiF.js +6 -0
- package/dist/enum-zdKA3Jy-.js +23 -0
- package/dist/group-C6Rj3K5I.js +178 -0
- package/dist/icard-BULUUV5m.js +4 -0
- package/dist/icon_animation-DuEY1FMm.js +4 -0
- package/dist/icon_breadcrumb-Y788iP_T.js +4 -0
- package/dist/icon_copyright-C1BER6kq.js +4 -0
- package/dist/icon_jt-ICOdrIF6.js +4 -0
- package/dist/icon_layout-D_wV9rX3.js +4 -0
- package/dist/icon_mainpage-Cz6_cxpJ.js +4 -0
- package/dist/icon_menu-y7SblUoR.js +4 -0
- package/dist/icon_page_size-BjwT656E.js +4 -0
- package/dist/icon_position_type-CPxcDgmM.js +4 -0
- package/dist/icon_safe_manage-CoqVRBLl.js +4 -0
- package/dist/icon_screen_scale-DURlkq3C.js +4 -0
- package/dist/icon_system_manage-BLXs2CQg.js +4 -0
- package/dist/icon_tabbar-_0QWhSBV.js +4 -0
- package/dist/icon_toolbar-BXpfu0iq.js +4 -0
- package/dist/icon_topbar-DrwvB8Jw.js +4 -0
- package/dist/icon_watermark-DwNqjAiA.js +4 -0
- package/dist/index.css +1 -1
- package/dist/index.js +587 -6775
- package/dist/isEmpty-2rx9iUQv.js +14 -0
- package/dist/isEqual-CNeQLaCM.js +474 -0
- package/dist/itemlist-BGe-z1IR.js +159 -0
- package/dist/layout_setting-Cds3TCHc.js +71 -0
- package/dist/log-DOMU9MyH.js +18 -0
- package/dist/log-center-BrGlNhMd.js +4 -0
- package/dist/loginHistoryDetail-Coba_ajy.js +80 -0
- package/dist/{login_history-BiwaLpxA.js → login_history-CrXkEsHb.js} +38 -35
- package/dist/menu_setting-Br5dOEUk.js +158 -0
- package/dist/not-data-C-MacYF3.js +5 -0
- package/dist/operateHistoryDetail-DfDQL5BF.js +92 -0
- package/dist/{operate_history-sPd9IHMV.js → operate_history-BtHgPhmF.js} +38 -35
- package/dist/org-main-BRMBumDm.js +4 -0
- package/dist/org-unmain-0BHnrNdD.js +4 -0
- package/dist/organization-BbFERZ1l.js +15411 -0
- package/dist/other_setting-D92SlFvl.js +216 -0
- package/dist/page_animation_setting-Cy2R0vZy.js +111 -0
- package/dist/page_w_setting-DryWrqcx.js +66 -0
- package/dist/position-B1bqGly6.js +169 -0
- package/dist/rbac-B59CVHDt.js +460 -0
- package/dist/region-B_n1KXMG.js +182 -0
- package/dist/remove-BTME2Fhs.js +4 -0
- package/dist/request-7X2hpUru.js +5 -0
- package/dist/resource-CPNNd1l0.js +275 -0
- package/dist/resource-app-D8to3Lkn.js +4 -0
- package/dist/resource-btn-Cz-A_EQF.js +4 -0
- package/dist/resource-dynamic-BUqWxUiU.js +4 -0
- package/dist/resource-index-D2roT002.js +4 -0
- package/dist/resource-menu-BRER68rK.js +4 -0
- package/dist/resource-micro-Hyucl9de.js +4 -0
- package/dist/resource-nonmenu-7FcPEpHv.js +4 -0
- package/dist/role-CMd7WDRC.js +195 -0
- package/dist/role_group-DHh2s911.js +174 -0
- package/dist/safe_setting-CuTBmUve.js +225 -0
- package/dist/setItem-BwXZ5Uqx.js +4 -0
- package/dist/setItem-DlhIkIgh.js +78 -0
- package/dist/setting-manage-UHelpLrr.js +4 -0
- package/dist/stores-C-zbXsms.js +2 -0
- package/dist/tabbar_setting-CjW9LGPp.js +142 -0
- package/dist/tenant-B_vgufMG.js +180 -0
- package/dist/theme-check-mark-DRzx4sTs.js +4 -0
- package/dist/theme-title-BRvQ_qPg.js +4 -0
- package/dist/theme_setting-DMP0_nZ1.js +114 -0
- package/dist/toolbar_setting-ClxxvA7R.js +143 -0
- package/dist/useAppAndResource-D6WnpUPR.js +55 -0
- package/dist/user-BhytPqnx.js +348 -0
- package/dist/{vanilla-picker-Byb6q187.js → vanilla-picker-2HFham9c.js} +61 -59
- package/dist/view-Cridj7u2.js +4 -0
- package/dist/view-lBxqXfPW.js +114 -0
- package/dist/watermark_setting-b3vBYWwY.js +194 -0
- package/dist/zddata-CnvPWtIW.js +4 -0
- package/dist/zy_checked-C25HQlnr.js +4 -0
- package/dist/zy_default-B7RKtyqy.js +4 -0
- package/package.json +3 -3
- package/dist/DynamicRoutesForm-DSzy_bh5.js +0 -169
- package/dist/HCheckList-ODQHidN8.js +0 -37
- package/dist/HoverCard-CmJCoa2b.js +0 -44
- package/dist/IconSelect-DouEg3xY.js +0 -717
- package/dist/ImportExport-DisdLoY8.js +0 -342
- package/dist/LayoutForm-Bdfs5WeK.js +0 -125
- package/dist/MetaForm-CcDwS8vh.js +0 -38902
- package/dist/OrgAndPosition-jDX7m0HD.js +0 -184
- package/dist/ResourceEdit-0BYZRye_.js +0 -381
- package/dist/ResourceRelation-CU-QpUhP.js +0 -76
- package/dist/ResourceRelation-roz0a8Td.js +0 -91
- package/dist/RoleRelation-BQQFaum0.js +0 -79
- package/dist/RoleSelector-gkar_UGG.js +0 -275
- package/dist/TenantEdit-BsahDUlf.js +0 -246
- package/dist/UserAuthorization-2Fl4IGw7.js +0 -233
- package/dist/UserEdit-CX3Qau8T.js +0 -320
- package/dist/add-child-CFHHkjfg.js +0 -2
- package/dist/authority-L7SfiMdP.js +0 -2
- package/dist/authorize-qMpV_BXT.js +0 -2
- package/dist/blackWhiteList-DbG7JH8n.js +0 -211
- package/dist/blacklist-disable-BT6Xx-JG.js +0 -2
- package/dist/blacklist-enable-CJ6DK_V2.js +0 -2
- package/dist/breadcrumb_setting-DTR6CPZQ.js +0 -108
- package/dist/browser-chrome-DuAegVCe.js +0 -2
- package/dist/browser-edge-DzkWdXRd.js +0 -2
- package/dist/browser-ie-DZ9g_MXr.js +0 -2
- package/dist/browser-other-BmkifoYq.js +0 -2
- package/dist/browser-safari-CXrCuF2a.js +0 -2
- package/dist/browserType-B8A1Osvk.js +0 -26
- package/dist/chunk-DiMWNkAf.js +0 -18
- package/dist/cloneDeep-CSOSavu3.js +0 -6
- package/dist/createAndEditDataPermission-8_KNLzJT.js +0 -431
- package/dist/data-permission-LpuDLDm0.js +0 -152
- package/dist/dictionary-CEaxjqZe.js +0 -179
- package/dist/drawerBlackWhiteList-DXLdWurZ.js +0 -120
- package/dist/drawerDictionary-DYJTAZr6.js +0 -126
- package/dist/drawerDictionaryItem-BChXD2-q.js +0 -138
- package/dist/drawerGroup-CdnZkZxi.js +0 -185
- package/dist/drawerOrganization-CwtSFUj0.js +0 -247
- package/dist/drawerPosition-CfyfeQCN.js +0 -166
- package/dist/drawerRegion-DAwY_29K.js +0 -183
- package/dist/drawerRole-B7uCfHk-.js +0 -154
- package/dist/drawerRole-DK6DrinO.js +0 -209
- package/dist/drawerRole-DrzMHL0O.js +0 -167
- package/dist/edit-fZ7h_z_Z.js +0 -2
- package/dist/enum-3mYayxff.js +0 -61
- package/dist/enum-Cr7uWnB2.js +0 -23
- package/dist/enum-D2UEJsrC.js +0 -4
- package/dist/group-CaOhkh72.js +0 -172
- package/dist/icard-H-d9Pip-.js +0 -2
- package/dist/icon_animation-BCdRKkE5.js +0 -2
- package/dist/icon_breadcrumb-BR6LK8hP.js +0 -2
- package/dist/icon_copyright-BfWn1s6t.js +0 -2
- package/dist/icon_jt-DOMTq9De.js +0 -2
- package/dist/icon_layout-DKqAThpM.js +0 -2
- package/dist/icon_mainpage-CXB9JMGv.js +0 -2
- package/dist/icon_menu-BYQtWV-Q.js +0 -2
- package/dist/icon_page_size-r-z4oHWp.js +0 -2
- package/dist/icon_position_type-JDFdklRh.js +0 -2
- package/dist/icon_safe_manage-BDTIOduB.js +0 -2
- package/dist/icon_screen_scale-vEaAdr9S.js +0 -2
- package/dist/icon_system_manage-CkhQtieE.js +0 -2
- package/dist/icon_tabbar-DZNj-h-p.js +0 -2
- package/dist/icon_toolbar-BBYhGmEf.js +0 -2
- package/dist/icon_topbar-Bc379eaS.js +0 -2
- package/dist/icon_watermark-CTP8r-e2.js +0 -2
- package/dist/isEmpty-BjEzPyCa.js +0 -12
- package/dist/itemlist-CFwRUV2Y.js +0 -156
- package/dist/layout_setting-79srmFgJ.js +0 -68
- package/dist/log-BYris9iT.js +0 -14
- package/dist/log-center-CGT-BGAN.js +0 -2
- package/dist/loginHistoryDetail-CZnfmbbM.js +0 -78
- package/dist/menu_setting-C2GciMXz.js +0 -155
- package/dist/not-data-Bml86wdH.js +0 -3
- package/dist/operateHistoryDetail-HId-EZzy.js +0 -90
- package/dist/org-main-DnftBa38.js +0 -2
- package/dist/org-unmain-ByMarqFw.js +0 -2
- package/dist/organization-Dv3FbKke.js +0 -15316
- package/dist/other_setting-oVuhA70c.js +0 -213
- package/dist/page_animation_setting-D0CtzyOZ.js +0 -108
- package/dist/page_w_setting-Q--ct16C.js +0 -63
- package/dist/position-CCZ2MSMP.js +0 -166
- package/dist/region-D3mjqB8H.js +0 -179
- package/dist/remove-DfZZBE2T.js +0 -2
- package/dist/resource-DaQ7CvM_.js +0 -271
- package/dist/resource-app-QSLZ7Hts.js +0 -2
- package/dist/resource-btn-BcB4xMgR.js +0 -2
- package/dist/resource-dynamic-D69oEbaO.js +0 -2
- package/dist/resource-index-BIHr3PZY.js +0 -2
- package/dist/resource-menu-0JSNn7S7.js +0 -2
- package/dist/resource-micro-CcX_pmaJ.js +0 -2
- package/dist/resource-nonmenu-DFItasMT.js +0 -2
- package/dist/role-4UgEw3nH.js +0 -192
- package/dist/role_group-hkRlCnyl.js +0 -171
- package/dist/safe_setting-4fv3qNRZ.js +0 -221
- package/dist/setItem-Vkcwkj-O.js +0 -77
- package/dist/setting-manage-C9whamLP.js +0 -2
- package/dist/stores-DPQF8JRt.js +0 -2
- package/dist/tabbar_setting-DhrW4Jj5.js +0 -139
- package/dist/tenant-lWfGw2u1.js +0 -177
- package/dist/theme-check-mark-DG4oWCQN.js +0 -2
- package/dist/theme-title-BCYnl2jK.js +0 -2
- package/dist/theme_setting-CEb7UYQO.js +0 -111
- package/dist/toolbar_setting-znESrYgi.js +0 -140
- package/dist/useAppAndResource-B7FmNfKG.js +0 -52
- package/dist/user-BkUpcQC8.js +0 -339
- package/dist/view-Bnu34EJT.js +0 -2
- package/dist/watermark_setting-DYirSIAn.js +0 -191
- package/dist/zddata-Ceyga3_2.js +0 -2
- package/dist/zy_checked-DvD7k9F8.js +0 -2
- package/dist/zy_default-DJ2tB3Fo.js +0 -2
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
import { r as e } from "./chunk-WQLz0Won.js";
|
|
2
|
+
import { h as t } from "./index.js";
|
|
3
|
+
import { r as n } from "./enum-CR5ztb5v2.js";
|
|
4
|
+
import { PubinfoIcon as r, getAllIconModules as i } from "pubinfo";
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, normalizeStyle as h, openBlock as g, reactive as _, ref as v, renderList as y, renderSlot as b, shallowRef as x, toDisplayString as S, unref as C, useModel as w, watch as T, withCtx as E } from "vue";
|
|
6
|
+
import { Empty as D } from "ant-design-vue";
|
|
7
|
+
import { Button as ee, Empty as te, FormItem as O, FormItemRest as ne, Input as re, InputNumber as k, Modal as ie, Pagination as ae, RadioButton as oe, RadioGroup as se, Tooltip as ce } from "ant-design-vue/es";
|
|
8
|
+
import './IconSelect.css';//#region src/components/ResourceIcones/BoxColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var A = { class: "flex flex-col gap-3 w-full select-none" }, j = { class: "flex items-center gap-3" }, M = { class: "relative inline-flex items-center" }, N = ["disabled"], P = ["value", "disabled"], F = { class: "flex items-center gap-3" }, I = { class: "relative inline-flex items-center" }, L = ["disabled"], R = ["value", "disabled"], z = { class: "flex items-center gap-3" }, B = { class: "flex items-center gap-3" }, V = { class: "flex items-center gap-3" }, le = /* @__PURE__ */ p({
|
|
10
|
+
name: "ResourceIconesBoxColorPicker",
|
|
11
|
+
__name: "BoxColorPicker",
|
|
12
|
+
props: {
|
|
13
|
+
angle: {},
|
|
14
|
+
background: {},
|
|
15
|
+
radius: {},
|
|
16
|
+
iconSize: {},
|
|
17
|
+
disabled: { type: Boolean }
|
|
18
|
+
},
|
|
19
|
+
emits: [
|
|
20
|
+
"update:angle",
|
|
21
|
+
"update:background",
|
|
22
|
+
"update:radius",
|
|
23
|
+
"update:iconSize"
|
|
24
|
+
],
|
|
25
|
+
setup(e, { emit: t }) {
|
|
26
|
+
let n = e, r = t;
|
|
27
|
+
function i(e) {
|
|
28
|
+
if (typeof e == "number" && Number.isFinite(e)) return (e % 360 + 360) % 360;
|
|
29
|
+
if (typeof e == "string") {
|
|
30
|
+
let t = Number.parseFloat(e);
|
|
31
|
+
if (Number.isFinite(t)) return (t % 360 + 360) % 360;
|
|
32
|
+
}
|
|
33
|
+
return 65;
|
|
34
|
+
}
|
|
35
|
+
function a(e) {
|
|
36
|
+
return e ? typeof e == "string" ? {
|
|
37
|
+
from: e,
|
|
38
|
+
to: e
|
|
39
|
+
} : {
|
|
40
|
+
from: e.from,
|
|
41
|
+
to: e.to
|
|
42
|
+
} : {
|
|
43
|
+
from: "#65E54A",
|
|
44
|
+
to: "#35C724"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function o(e) {
|
|
48
|
+
if (typeof e == "string" && e.trim().endsWith("%")) {
|
|
49
|
+
let t = Number.parseFloat(e);
|
|
50
|
+
if (Number.isFinite(t)) return c(t);
|
|
51
|
+
}
|
|
52
|
+
if (typeof e == "number" && Number.isFinite(e)) return c(e);
|
|
53
|
+
if (typeof e == "string") {
|
|
54
|
+
let t = Number.parseFloat(e);
|
|
55
|
+
if (Number.isFinite(t)) return c(t);
|
|
56
|
+
}
|
|
57
|
+
return 50;
|
|
58
|
+
}
|
|
59
|
+
function s(e) {
|
|
60
|
+
if (typeof e == "string" && e.trim().endsWith("%")) {
|
|
61
|
+
let t = Number.parseFloat(e);
|
|
62
|
+
if (Number.isFinite(t)) return d(t);
|
|
63
|
+
}
|
|
64
|
+
if (typeof e == "number" && Number.isFinite(e)) return d(e);
|
|
65
|
+
if (typeof e == "string") {
|
|
66
|
+
let t = Number.parseFloat(e);
|
|
67
|
+
if (Number.isFinite(t)) return d(t);
|
|
68
|
+
}
|
|
69
|
+
return 50;
|
|
70
|
+
}
|
|
71
|
+
function c(e) {
|
|
72
|
+
return Math.min(50, Math.max(0, e));
|
|
73
|
+
}
|
|
74
|
+
function d(e) {
|
|
75
|
+
return Math.min(100, Math.max(0, e));
|
|
76
|
+
}
|
|
77
|
+
let p = a(n.background), _ = v(p.from), y = v(p.to), b = v(i(n.angle)), x = v(o(n.radius)), S = v(s(n.iconSize)), C = v(null), w = v(null);
|
|
78
|
+
function D() {
|
|
79
|
+
if (n.disabled) return;
|
|
80
|
+
let e = C.value;
|
|
81
|
+
e && (e.style.width = "16px", e.style.height = "16px", e.click());
|
|
82
|
+
}
|
|
83
|
+
function ee() {
|
|
84
|
+
if (n.disabled) return;
|
|
85
|
+
let e = w.value;
|
|
86
|
+
e && (e.style.width = "16px", e.style.height = "16px", e.click());
|
|
87
|
+
}
|
|
88
|
+
return T([
|
|
89
|
+
_,
|
|
90
|
+
y,
|
|
91
|
+
b,
|
|
92
|
+
x
|
|
93
|
+
], () => {
|
|
94
|
+
r("update:background", {
|
|
95
|
+
from: _.value,
|
|
96
|
+
to: y.value
|
|
97
|
+
}), r("update:angle", b.value), r("update:radius", `${x.value}%`);
|
|
98
|
+
}, { immediate: !0 }), T(S, () => {
|
|
99
|
+
r("update:iconSize", `${S.value}%`);
|
|
100
|
+
}, { immediate: !0 }), T(() => n.background, (e) => {
|
|
101
|
+
if (e == null) return;
|
|
102
|
+
let t = a(e);
|
|
103
|
+
_.value = t.from, y.value = t.to;
|
|
104
|
+
}), T(() => n.angle, (e) => {
|
|
105
|
+
e != null && (b.value = i(e));
|
|
106
|
+
}), T(() => n.radius, (e) => {
|
|
107
|
+
e != null && (x.value = o(e));
|
|
108
|
+
}), T(() => n.iconSize, (e) => {
|
|
109
|
+
e != null && (S.value = s(e));
|
|
110
|
+
}), (e, t) => {
|
|
111
|
+
let r = re, i = k;
|
|
112
|
+
return g(), l("div", A, [
|
|
113
|
+
u("div", j, [t[7] ||= u("label", { class: "text-12px opacity-70 w-14 shrink-0" }, "起始色", -1), f(r, {
|
|
114
|
+
value: _.value,
|
|
115
|
+
"onUpdate:value": t[1] ||= (e) => _.value = e,
|
|
116
|
+
disabled: n.disabled,
|
|
117
|
+
placeholder: "#65E54A",
|
|
118
|
+
size: "small",
|
|
119
|
+
class: "flex-1 min-w-0"
|
|
120
|
+
}, {
|
|
121
|
+
prefix: E(() => [u("div", M, [u("button", {
|
|
122
|
+
type: "button",
|
|
123
|
+
disabled: n.disabled,
|
|
124
|
+
class: m(["w-4 h-4 rounded border border-gray-300 dark:border-gray-700", n.disabled ? "opacity-50 cursor-not-allowed" : ""]),
|
|
125
|
+
style: h({ background: _.value }),
|
|
126
|
+
onClick: D
|
|
127
|
+
}, null, 14, N), u("input", {
|
|
128
|
+
ref_key: "fromColorPickerRef",
|
|
129
|
+
ref: C,
|
|
130
|
+
type: "color",
|
|
131
|
+
value: _.value,
|
|
132
|
+
disabled: n.disabled,
|
|
133
|
+
class: "absolute left-0 top-0 opacity-0 pointer-events-none",
|
|
134
|
+
style: {
|
|
135
|
+
width: "16px",
|
|
136
|
+
height: "16px"
|
|
137
|
+
},
|
|
138
|
+
onInput: t[0] ||= (e) => _.value = e.target.value
|
|
139
|
+
}, null, 40, P)])]),
|
|
140
|
+
_: 1
|
|
141
|
+
}, 8, ["value", "disabled"])]),
|
|
142
|
+
u("div", F, [t[8] ||= u("label", { class: "text-12px opacity-70 w-14 shrink-0" }, "结束色", -1), f(r, {
|
|
143
|
+
value: y.value,
|
|
144
|
+
"onUpdate:value": t[3] ||= (e) => y.value = e,
|
|
145
|
+
disabled: n.disabled,
|
|
146
|
+
placeholder: "#35C724",
|
|
147
|
+
size: "small",
|
|
148
|
+
class: "flex-1 min-w-0"
|
|
149
|
+
}, {
|
|
150
|
+
prefix: E(() => [u("div", I, [u("button", {
|
|
151
|
+
type: "button",
|
|
152
|
+
disabled: n.disabled,
|
|
153
|
+
class: m(["w-4 h-4 rounded border border-gray-300 dark:border-gray-700", n.disabled ? "opacity-50 cursor-not-allowed" : ""]),
|
|
154
|
+
style: h({ background: y.value }),
|
|
155
|
+
onClick: ee
|
|
156
|
+
}, null, 14, L), u("input", {
|
|
157
|
+
ref_key: "toColorPickerRef",
|
|
158
|
+
ref: w,
|
|
159
|
+
type: "color",
|
|
160
|
+
value: y.value,
|
|
161
|
+
disabled: n.disabled,
|
|
162
|
+
class: "absolute left-0 top-0 opacity-0 pointer-events-none",
|
|
163
|
+
style: {
|
|
164
|
+
width: "16px",
|
|
165
|
+
height: "16px"
|
|
166
|
+
},
|
|
167
|
+
onInput: t[2] ||= (e) => y.value = e.target.value
|
|
168
|
+
}, null, 40, R)])]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["value", "disabled"])]),
|
|
171
|
+
u("div", z, [
|
|
172
|
+
t[9] ||= u("label", { class: "text-12px opacity-70 w-14 shrink-0" }, "角度", -1),
|
|
173
|
+
f(i, {
|
|
174
|
+
value: b.value,
|
|
175
|
+
"onUpdate:value": t[4] ||= (e) => b.value = e,
|
|
176
|
+
disabled: n.disabled,
|
|
177
|
+
min: 0,
|
|
178
|
+
max: 360,
|
|
179
|
+
step: 1,
|
|
180
|
+
size: "small",
|
|
181
|
+
class: "w-28"
|
|
182
|
+
}, null, 8, ["value", "disabled"]),
|
|
183
|
+
t[10] ||= u("span", { class: "text-12px opacity-70" }, "deg", -1)
|
|
184
|
+
]),
|
|
185
|
+
u("div", B, [
|
|
186
|
+
t[11] ||= u("label", { class: "text-12px opacity-70 w-14 shrink-0" }, "圆角", -1),
|
|
187
|
+
f(i, {
|
|
188
|
+
value: x.value,
|
|
189
|
+
"onUpdate:value": t[5] ||= (e) => x.value = e,
|
|
190
|
+
disabled: n.disabled,
|
|
191
|
+
min: 0,
|
|
192
|
+
max: 50,
|
|
193
|
+
step: 1,
|
|
194
|
+
size: "small",
|
|
195
|
+
class: "w-28"
|
|
196
|
+
}, null, 8, ["value", "disabled"]),
|
|
197
|
+
t[12] ||= u("span", { class: "text-12px opacity-70" }, "%", -1)
|
|
198
|
+
]),
|
|
199
|
+
u("div", V, [
|
|
200
|
+
t[13] ||= u("label", { class: "text-12px opacity-70 w-14 shrink-0" }, "图标大小", -1),
|
|
201
|
+
f(i, {
|
|
202
|
+
value: S.value,
|
|
203
|
+
"onUpdate:value": t[6] ||= (e) => S.value = e,
|
|
204
|
+
disabled: n.disabled,
|
|
205
|
+
min: 0,
|
|
206
|
+
max: 100,
|
|
207
|
+
step: 1,
|
|
208
|
+
size: "small",
|
|
209
|
+
class: "w-28"
|
|
210
|
+
}, null, 8, ["value", "disabled"]),
|
|
211
|
+
t[14] ||= u("span", { class: "text-12px opacity-70" }, "%", -1)
|
|
212
|
+
])
|
|
213
|
+
]);
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}), ue = { class: "flex gap-4 min-h-[600px]" }, de = { class: "w-58 flex flex-col border-r border-[#e5e7eb] dark:border-[#30363d] pr-3" }, fe = { class: "mb-3" }, pe = { class: "flex-1 overflow-auto space-y-1 pr-1" }, me = ["onClick"], he = { class: "truncate max-w-[120px]" }, ge = { class: "ml-2 inline-block min-w-6 text-center text-11px rounded bg-[#eef1f5] dark:bg-[#2d3339] px-1 text-[#5d6671] dark:text-[#9aa3ad]" }, _e = { class: "flex-1 flex flex-col min-w-0" }, ve = { class: "grid grid-cols-6 gap-3 auto-rows-[96px] overflow-auto flex-1 p-1" }, ye = { class: "text-12px leading-tight space-y-1" }, be = { class: "font-medium" }, xe = {
|
|
217
|
+
key: 0,
|
|
218
|
+
class: "opacity-70"
|
|
219
|
+
}, Se = ["onClick"], Ce = { class: "mt-4 flex justify-center select-none" }, we = {
|
|
220
|
+
key: 1,
|
|
221
|
+
class: "flex-1 flex items-center justify-center"
|
|
222
|
+
}, Te = {
|
|
223
|
+
key: 0,
|
|
224
|
+
class: "relative w-60 flex flex-col border-l border-[#e5e7eb] dark:border-[#30363d] pl-4 min-h-0"
|
|
225
|
+
}, Ee = { class: "flex flex-col flex-1 w-full rounded-md border border-dashed border-[#d0d7de] dark:border-[#30363d] text-12px text-[#6b7280] dark:text-[#94a3b8] p-3 overflow-hidden" }, De = { class: "shrink-0 flex justify-center items-center pb-4 border-b border-b-dashed border-b-[#d0d7de] dark:border-b-[#30363d]" }, Oe = { class: "w-8 h-8 flex justify-center items-center" }, ke = { class: "w-8 h-8 flex justify-center items-center" }, Ae = { class: "w-8 h-8 flex justify-center items-center" }, je = { class: "flex-1 w-full mt-3 px-2 overflow-auto space-y-3" }, Me = { class: "flex flex-col justify-start w-full opacity-100" }, Ne = { class: "flex items-center gap-3 mb-0! w-full flex-col" }, Pe = { class: "flex" }, Fe = { class: "text-12px opacity-70 w-14 shrink-0 flex items-center" }, Ie = { class: "flex flex-col" }, Le = { class: "relative inline-flex items-center" }, Re = ["disabled"], ze = ["value", "disabled"], Be = { class: "w-full mt-auto flex aspect-square" }, Ve = { class: "flex-1 w-full h-full py-4 rounded-md border-t border-t-dashed border-t-[#d0d7de] dark:border-t-[#30363d] flex flex-col items-center gap-2" }, He = {
|
|
226
|
+
key: 0,
|
|
227
|
+
class: "w-full h-full flex items-center justify-center"
|
|
228
|
+
}, Ue = { class: "mt-4 flex justify-end gap-2" }, H = 30, U = 24, We = 4, W = /* @__PURE__ */ t(/* @__PURE__ */ p({
|
|
229
|
+
name: "ResourceIconesSelect",
|
|
230
|
+
__name: "Select",
|
|
231
|
+
props: {
|
|
232
|
+
modelValue: {},
|
|
233
|
+
modelModifiers: {},
|
|
234
|
+
boxType: { default: "null" },
|
|
235
|
+
boxTypeModifiers: {},
|
|
236
|
+
angle: { default: 65 },
|
|
237
|
+
angleModifiers: {},
|
|
238
|
+
background: { default: {
|
|
239
|
+
from: "#65E54A",
|
|
240
|
+
to: "#35C724"
|
|
241
|
+
} },
|
|
242
|
+
backgroundModifiers: {},
|
|
243
|
+
radius: { default: "50%" },
|
|
244
|
+
radiusModifiers: {},
|
|
245
|
+
iconColor: { default: "" },
|
|
246
|
+
iconColorModifiers: {},
|
|
247
|
+
iconSize: { default: "50%" },
|
|
248
|
+
iconSizeModifiers: {}
|
|
249
|
+
},
|
|
250
|
+
emits: [
|
|
251
|
+
"update:modelValue",
|
|
252
|
+
"update:boxType",
|
|
253
|
+
"update:angle",
|
|
254
|
+
"update:background",
|
|
255
|
+
"update:radius",
|
|
256
|
+
"update:iconColor",
|
|
257
|
+
"update:iconSize"
|
|
258
|
+
],
|
|
259
|
+
setup(e) {
|
|
260
|
+
let t = x([]), n = v(!1);
|
|
261
|
+
async function p() {
|
|
262
|
+
if (!(t.value.length > 0 || n.value)) {
|
|
263
|
+
n.value = !0;
|
|
264
|
+
try {
|
|
265
|
+
let e = await import("@ant-design/icons-vue");
|
|
266
|
+
t.value = Object.keys(e).filter((e) => /(?:Outlined|Filled|TwoTone)$/.test(e)).map((e) => `antd:${e}`).sort();
|
|
267
|
+
} finally {
|
|
268
|
+
n.value = !1;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
let _ = w(e, "modelValue"), O = w(e, "boxType"), k = w(e, "angle"), A = w(e, "background"), j = w(e, "radius"), M = w(e, "iconColor"), N = w(e, "iconSize"), P = v(_.value), F = v(O.value || "null"), I = v(k.value ?? 65), L = v(A.value ?? {
|
|
273
|
+
from: "#65E54A",
|
|
274
|
+
to: "#35C724"
|
|
275
|
+
}), R = v(j.value ?? "50%"), z = v(N.value ?? "50%"), B = v(M.value ?? ""), V = v(null), W = v(!1);
|
|
276
|
+
function G() {
|
|
277
|
+
p(), P.value = _.value, F.value = O.value || "null", I.value = k.value ?? 65;
|
|
278
|
+
let e = A.value;
|
|
279
|
+
L.value = typeof e == "string" ? e : e ? { ...e } : {
|
|
280
|
+
from: "#65E54A",
|
|
281
|
+
to: "#35C724"
|
|
282
|
+
}, R.value = j.value ?? "50%", z.value = N.value ?? "50%", B.value = M.value ?? "", W.value = !0;
|
|
283
|
+
}
|
|
284
|
+
function K() {
|
|
285
|
+
W.value = !1;
|
|
286
|
+
}
|
|
287
|
+
function Ge() {
|
|
288
|
+
_.value = P.value, O.value = F.value, k.value = I.value;
|
|
289
|
+
let e = L.value;
|
|
290
|
+
A.value = typeof e == "string" ? e : e && { ...e }, j.value = R.value, N.value = z.value, M.value = B.value, W.value = !1;
|
|
291
|
+
}
|
|
292
|
+
function Ke(e) {
|
|
293
|
+
return (e.split(/[\\/]/).pop() || e).replace(/\.(svg|png|jpe?g)$/i, "");
|
|
294
|
+
}
|
|
295
|
+
let qe = o(() => {
|
|
296
|
+
let e = /* @__PURE__ */ new Map(), t = i();
|
|
297
|
+
for (let [n, r] of t.entries()) {
|
|
298
|
+
let t = Object.keys(r).map(Ke).sort();
|
|
299
|
+
e.set(n, t);
|
|
300
|
+
}
|
|
301
|
+
return e;
|
|
302
|
+
}), q = o(() => t.value), Je = o(() => {
|
|
303
|
+
let e = Array.from(qe.value.keys()), t = e.includes("local"), n = e.filter((e) => e !== "local").sort();
|
|
304
|
+
return [
|
|
305
|
+
{
|
|
306
|
+
label: "全部",
|
|
307
|
+
value: "all"
|
|
308
|
+
},
|
|
309
|
+
...t ? [{
|
|
310
|
+
label: "本地",
|
|
311
|
+
value: "local"
|
|
312
|
+
}] : [],
|
|
313
|
+
...n.map((e) => ({
|
|
314
|
+
label: e,
|
|
315
|
+
value: e
|
|
316
|
+
})),
|
|
317
|
+
{
|
|
318
|
+
label: "Ant Design",
|
|
319
|
+
value: "antd"
|
|
320
|
+
}
|
|
321
|
+
];
|
|
322
|
+
}), J = v("all"), Y = v(""), X = o(() => {
|
|
323
|
+
let e = [];
|
|
324
|
+
for (let [t, n] of qe.value.entries()) n.forEach((n) => {
|
|
325
|
+
t === "local" ? e.push({
|
|
326
|
+
name: n,
|
|
327
|
+
module: t
|
|
328
|
+
}) : e.push({
|
|
329
|
+
name: `${t}-[${n}]`,
|
|
330
|
+
module: t
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
return q.value.forEach((t) => e.push({
|
|
334
|
+
name: t,
|
|
335
|
+
module: "antd"
|
|
336
|
+
})), e;
|
|
337
|
+
}), Ye = o(() => J.value === "all" ? X.value : J.value === "antd" ? X.value.filter((e) => e.module === "antd") : X.value.filter((e) => e.module === J.value)), Z = o(() => {
|
|
338
|
+
let e = Y.value.trim().toLowerCase();
|
|
339
|
+
return e ? Ye.value.filter((t) => t.name.toLowerCase().includes(e)) : Ye.value;
|
|
340
|
+
});
|
|
341
|
+
function Xe(e) {
|
|
342
|
+
return e === "all" ? X.value.length : e === "antd" ? X.value.filter((e) => e.module === "antd").length : X.value.filter((t) => t.module === e).length;
|
|
343
|
+
}
|
|
344
|
+
let Q = v(1), Ze = o(() => Math.max(1, Math.ceil(Z.value.length / H))), Qe = o(() => {
|
|
345
|
+
let e = (Q.value - 1) * H;
|
|
346
|
+
return Z.value.slice(e, e + H);
|
|
347
|
+
});
|
|
348
|
+
T([Y, J], () => {
|
|
349
|
+
Q.value = 1;
|
|
350
|
+
}), T(Z, () => {
|
|
351
|
+
Q.value > Ze.value && (Q.value = Ze.value);
|
|
352
|
+
});
|
|
353
|
+
function $e(e) {
|
|
354
|
+
Q.value = e;
|
|
355
|
+
}
|
|
356
|
+
function et(e) {
|
|
357
|
+
P.value = e.name;
|
|
358
|
+
}
|
|
359
|
+
let tt = D.PRESENTED_IMAGE_SIMPLE;
|
|
360
|
+
function nt() {
|
|
361
|
+
if (!(P.value || "").startsWith("antd:")) return;
|
|
362
|
+
let e = V.value;
|
|
363
|
+
e && (e.style.width = "16px", e.style.height = "16px", e.click());
|
|
364
|
+
}
|
|
365
|
+
let $ = o(() => (P.value || "").startsWith("antd:"));
|
|
366
|
+
return T(F, (e, t) => {
|
|
367
|
+
t === "null" && e !== "null" && !B.value && (B.value = "#ffffff");
|
|
368
|
+
}), (e, t) => {
|
|
369
|
+
let n = ce, i = re, o = ae, p = te, v = oe, x = se, w = ee, T = ie, D = ne;
|
|
370
|
+
return g(), l(a, null, [b(e.$slots, "default", { open: G }, () => [f(i, {
|
|
371
|
+
value: _.value,
|
|
372
|
+
readonly: "",
|
|
373
|
+
onClick: G
|
|
374
|
+
}, {
|
|
375
|
+
addonAfter: E(() => [f(n, null, {
|
|
376
|
+
title: E(() => [f(C(r), {
|
|
377
|
+
name: _.value || "",
|
|
378
|
+
size: "40px",
|
|
379
|
+
class: "cursor-default"
|
|
380
|
+
}, null, 8, ["name"])]),
|
|
381
|
+
default: E(() => [f(C(r), {
|
|
382
|
+
name: _.value || "",
|
|
383
|
+
size: "20px",
|
|
384
|
+
class: "cursor-default"
|
|
385
|
+
}, null, 8, ["name"])]),
|
|
386
|
+
_: 1
|
|
387
|
+
})]),
|
|
388
|
+
_: 1
|
|
389
|
+
}, 8, ["value"])], !0), f(D, null, {
|
|
390
|
+
default: E(() => [f(T, {
|
|
391
|
+
open: W.value,
|
|
392
|
+
"onUpdate:open": t[8] ||= (e) => W.value = e,
|
|
393
|
+
title: "选择图标",
|
|
394
|
+
width: "1200px",
|
|
395
|
+
footer: null,
|
|
396
|
+
"destroy-on-close": "",
|
|
397
|
+
onCancel: K
|
|
398
|
+
}, {
|
|
399
|
+
default: E(() => [u("div", ue, [
|
|
400
|
+
u("div", de, [u("div", fe, [f(i, {
|
|
401
|
+
value: Y.value,
|
|
402
|
+
"onUpdate:value": t[0] ||= (e) => Y.value = e,
|
|
403
|
+
"allow-clear": "",
|
|
404
|
+
bordered: !0,
|
|
405
|
+
placeholder: "搜索图标",
|
|
406
|
+
class: "h-9 text-13px"
|
|
407
|
+
}, {
|
|
408
|
+
prefix: E(() => [f(C(r), {
|
|
409
|
+
name: "i-carbon-search",
|
|
410
|
+
size: "16",
|
|
411
|
+
class: "text-[#7a869a]"
|
|
412
|
+
})]),
|
|
413
|
+
_: 1
|
|
414
|
+
}, 8, ["value"])]), u("div", pe, [(g(!0), l(a, null, y(Je.value, (e) => (g(), l("div", {
|
|
415
|
+
key: e.value,
|
|
416
|
+
class: m(["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", J.value === e.value ? "bg-[#eef5ff] dark:bg-[#1e2a33] border-[#1677ff] text-[#1677ff] font-medium" : "text-[#4b5563]"]),
|
|
417
|
+
onClick: (t) => J.value = e.value
|
|
418
|
+
}, [u("span", he, S(e.label), 1), u("span", ge, S(Xe(e.value)), 1)], 10, me))), 128))])]),
|
|
419
|
+
u("div", _e, [Z.value.length ? (g(), l(a, { key: 0 }, [u("div", ve, [(g(!0), l(a, null, y(Qe.value, (e) => (g(), s(n, {
|
|
420
|
+
key: `${e.module || ""}:${e.name}`,
|
|
421
|
+
"mouse-enter-delay": .35
|
|
422
|
+
}, {
|
|
423
|
+
title: E(() => [u("div", ye, [u("div", be, S(e.name), 1), e.module ? (g(), l("div", xe, " 模块: " + S(e.module), 1)) : c("", !0)])]),
|
|
424
|
+
default: E(() => [u("div", {
|
|
425
|
+
class: m(["group relative flex flex-col items-center justify-center cursor-pointer rounded-md border", P.value === e.name ? "border-solid border-[#1677ff]" : "border-dashed border-[#e5e7eb] dark:border-[#30363d]"]),
|
|
426
|
+
onClick: (t) => et(e)
|
|
427
|
+
}, [f(C(r), {
|
|
428
|
+
name: e.name,
|
|
429
|
+
size: "30px"
|
|
430
|
+
}, null, 8, ["name"])], 10, Se)]),
|
|
431
|
+
_: 2
|
|
432
|
+
}, 1024))), 128))]), u("div", Ce, [f(o, {
|
|
433
|
+
current: Q.value,
|
|
434
|
+
"page-size": H,
|
|
435
|
+
total: Z.value.length,
|
|
436
|
+
"show-size-changer": !1,
|
|
437
|
+
"show-quick-jumper": "",
|
|
438
|
+
onChange: $e
|
|
439
|
+
}, null, 8, ["current", "total"])])], 64)) : (g(), l("div", we, [f(p, {
|
|
440
|
+
image: C(tt),
|
|
441
|
+
description: "没有匹配的图标"
|
|
442
|
+
}, null, 8, ["image"])]))]),
|
|
443
|
+
P.value ? (g(), l("div", Te, [u("div", Ee, [
|
|
444
|
+
u("div", De, [f(x, {
|
|
445
|
+
value: F.value,
|
|
446
|
+
"onUpdate:value": t[1] ||= (e) => F.value = e,
|
|
447
|
+
class: "flex justify-center items-center"
|
|
448
|
+
}, {
|
|
449
|
+
default: E(() => [
|
|
450
|
+
f(v, { value: "null" }, {
|
|
451
|
+
default: E(() => [u("div", Oe, [f(C(r), {
|
|
452
|
+
name: P.value,
|
|
453
|
+
size: U - We * 2
|
|
454
|
+
}, null, 8, ["name", "size"])])]),
|
|
455
|
+
_: 1
|
|
456
|
+
}),
|
|
457
|
+
f(v, { value: "square" }, {
|
|
458
|
+
default: E(() => [u("div", ke, [f(C(r), {
|
|
459
|
+
name: P.value,
|
|
460
|
+
box: "square",
|
|
461
|
+
size: U,
|
|
462
|
+
radius: "25%",
|
|
463
|
+
color: "#ffffff"
|
|
464
|
+
}, null, 8, ["name"])])]),
|
|
465
|
+
_: 1
|
|
466
|
+
}),
|
|
467
|
+
f(v, { value: "prism" }, {
|
|
468
|
+
default: E(() => [u("div", Ae, [f(C(r), {
|
|
469
|
+
name: P.value,
|
|
470
|
+
box: "prism",
|
|
471
|
+
size: U,
|
|
472
|
+
color: "#ffffff",
|
|
473
|
+
radius: "2%"
|
|
474
|
+
}, null, 8, ["name"])])]),
|
|
475
|
+
_: 1
|
|
476
|
+
})
|
|
477
|
+
]),
|
|
478
|
+
_: 1
|
|
479
|
+
}, 8, ["value"])]),
|
|
480
|
+
u("div", je, [
|
|
481
|
+
u("div", Me, [t[9] ||= u("div", { class: "text-12px mb-2 opacity-70" }, " 背景设置 ", -1), f(le, {
|
|
482
|
+
angle: I.value,
|
|
483
|
+
"onUpdate:angle": t[2] ||= (e) => I.value = e,
|
|
484
|
+
background: L.value,
|
|
485
|
+
"onUpdate:background": t[3] ||= (e) => L.value = e,
|
|
486
|
+
radius: R.value,
|
|
487
|
+
"onUpdate:radius": t[4] ||= (e) => R.value = e,
|
|
488
|
+
"icon-size": z.value,
|
|
489
|
+
"onUpdate:iconSize": t[5] ||= (e) => z.value = e,
|
|
490
|
+
disabled: F.value === "null"
|
|
491
|
+
}, null, 8, [
|
|
492
|
+
"angle",
|
|
493
|
+
"background",
|
|
494
|
+
"radius",
|
|
495
|
+
"icon-size",
|
|
496
|
+
"disabled"
|
|
497
|
+
])]),
|
|
498
|
+
u("div", Ne, [u("div", Pe, [u("label", Fe, [t[11] ||= d(" 图标色 ", -1), f(n, null, {
|
|
499
|
+
title: E(() => [...t[10] ||= [d(" 仅 Ant Design 图标有效 ", -1)]]),
|
|
500
|
+
default: E(() => [f(C(r), {
|
|
501
|
+
name: "i-carbon-information",
|
|
502
|
+
size: "12px",
|
|
503
|
+
class: "ml-1 cursor-help"
|
|
504
|
+
})]),
|
|
505
|
+
_: 1
|
|
506
|
+
})]), u("div", Ie, [f(i, {
|
|
507
|
+
value: B.value,
|
|
508
|
+
"onUpdate:value": t[7] ||= (e) => B.value = e,
|
|
509
|
+
"allow-clear": "",
|
|
510
|
+
placeholder: F.value === "null" ? "默认" : "#ffffff",
|
|
511
|
+
size: "small",
|
|
512
|
+
class: "flex-1 min-w-0",
|
|
513
|
+
disabled: !$.value
|
|
514
|
+
}, {
|
|
515
|
+
prefix: E(() => [u("div", Le, [u("button", {
|
|
516
|
+
type: "button",
|
|
517
|
+
disabled: !$.value,
|
|
518
|
+
class: m(["w-4 h-4 rounded border border-gray-300 dark:border-gray-700", $.value ? "" : "opacity-50 cursor-not-allowed"]),
|
|
519
|
+
style: h({ background: B.value || "#ffffff" }),
|
|
520
|
+
onClick: nt
|
|
521
|
+
}, null, 14, Re), u("input", {
|
|
522
|
+
ref_key: "iconColorPickerRef",
|
|
523
|
+
ref: V,
|
|
524
|
+
type: "color",
|
|
525
|
+
value: B.value || "#ffffff",
|
|
526
|
+
disabled: !$.value,
|
|
527
|
+
class: "absolute left-0 top-0 opacity-0 pointer-events-none",
|
|
528
|
+
style: {
|
|
529
|
+
width: "16px",
|
|
530
|
+
height: "16px"
|
|
531
|
+
},
|
|
532
|
+
onInput: t[6] ||= (e) => B.value = e.target.value
|
|
533
|
+
}, null, 40, ze)])]),
|
|
534
|
+
_: 1
|
|
535
|
+
}, 8, [
|
|
536
|
+
"value",
|
|
537
|
+
"placeholder",
|
|
538
|
+
"disabled"
|
|
539
|
+
])])])]),
|
|
540
|
+
u("div", Be, [u("div", Ve, [P.value ? (g(), l("div", He, [F.value === "null" ? (g(), s(C(r), {
|
|
541
|
+
key: 0,
|
|
542
|
+
name: P.value,
|
|
543
|
+
size: 80,
|
|
544
|
+
color: $.value && B.value ? B.value : void 0
|
|
545
|
+
}, null, 8, ["name", "color"])) : (g(), s(C(r), {
|
|
546
|
+
key: 1,
|
|
547
|
+
name: P.value,
|
|
548
|
+
box: F.value,
|
|
549
|
+
size: 80,
|
|
550
|
+
angle: I.value,
|
|
551
|
+
background: L.value,
|
|
552
|
+
radius: R.value,
|
|
553
|
+
"icon-size": z.value,
|
|
554
|
+
color: $.value ? B.value || "#ffffff" : void 0
|
|
555
|
+
}, null, 8, [
|
|
556
|
+
"name",
|
|
557
|
+
"box",
|
|
558
|
+
"angle",
|
|
559
|
+
"background",
|
|
560
|
+
"radius",
|
|
561
|
+
"icon-size",
|
|
562
|
+
"color"
|
|
563
|
+
]))])) : c("", !0)])])
|
|
564
|
+
]),
|
|
565
|
+
u("div", Ue, [f(w, { onClick: K }, {
|
|
566
|
+
default: E(() => [...t[12] ||= [d(" 取消 ", -1)]]),
|
|
567
|
+
_: 1
|
|
568
|
+
}), f(w, {
|
|
569
|
+
type: "primary",
|
|
570
|
+
onClick: Ge
|
|
571
|
+
}, {
|
|
572
|
+
default: E(() => [...t[13] ||= [d(" 确定 ", -1)]]),
|
|
573
|
+
_: 1
|
|
574
|
+
})])
|
|
575
|
+
])])) : c("", !0)
|
|
576
|
+
])]),
|
|
577
|
+
_: 1
|
|
578
|
+
}, 8, ["open"])]),
|
|
579
|
+
_: 1
|
|
580
|
+
})], 64);
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
}), [["__scopeId", "data-v-21a5fc0d"]]), G = ["onClick"], K = ["onClick"], Ge = { class: "flex flex-col items-center justify-center" }, Ke = /* @__PURE__ */ p({
|
|
584
|
+
name: "ResourceIconSelect",
|
|
585
|
+
__name: "IconSelect",
|
|
586
|
+
props: {
|
|
587
|
+
modelValue: { default: { meta: {
|
|
588
|
+
url: "",
|
|
589
|
+
component: ""
|
|
590
|
+
} } },
|
|
591
|
+
modelModifiers: {}
|
|
592
|
+
},
|
|
593
|
+
emits: ["update:modelValue"],
|
|
594
|
+
setup(e) {
|
|
595
|
+
let t = w(e, "modelValue");
|
|
596
|
+
function i() {
|
|
597
|
+
return {
|
|
598
|
+
boxType: "null",
|
|
599
|
+
angle: 65,
|
|
600
|
+
background: {
|
|
601
|
+
from: "#65E54A",
|
|
602
|
+
to: "#35C724"
|
|
603
|
+
},
|
|
604
|
+
radius: "50%",
|
|
605
|
+
iconColor: "",
|
|
606
|
+
iconSize: "50%"
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
let a = o(() => t.value.meta || (t.value.meta = {})), d = _(i());
|
|
610
|
+
T(() => a.value.iconOptions, (e) => {
|
|
611
|
+
e ? Object.assign(d, i(), e) : Object.assign(d, i());
|
|
612
|
+
}, { immediate: !0 }), T(d, (e) => {
|
|
613
|
+
if (!t.value.icon) {
|
|
614
|
+
a.value.iconOptions && Reflect.deleteProperty(a.value, "iconOptions");
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
let n = a.value.iconOptions, r = !1;
|
|
618
|
+
if (!n) r = !0;
|
|
619
|
+
else {
|
|
620
|
+
let t = new Set([...Object.keys(n), ...Object.keys(e)]);
|
|
621
|
+
for (let i of t) if (n[i] !== e[i]) {
|
|
622
|
+
r = !0;
|
|
623
|
+
break;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
r && (a.value.iconOptions = { ...e });
|
|
627
|
+
}, { deep: !0 });
|
|
628
|
+
let p = o(() => {
|
|
629
|
+
let e = t.value.type;
|
|
630
|
+
return { icon: [
|
|
631
|
+
n.DYNAMIC_APP,
|
|
632
|
+
n.INDEX,
|
|
633
|
+
n.MENU,
|
|
634
|
+
n.IFRAME,
|
|
635
|
+
n.LINK
|
|
636
|
+
].includes(e) };
|
|
637
|
+
}), m = o(() => !0);
|
|
638
|
+
function h(e) {
|
|
639
|
+
e.stopPropagation(), t.value.icon && (t.value.icon = void 0, Reflect.deleteProperty(a.value, "iconOptions"));
|
|
640
|
+
}
|
|
641
|
+
return (e, n) => {
|
|
642
|
+
let i = O;
|
|
643
|
+
return C(m) && C(p).icon ? (g(), s(i, {
|
|
644
|
+
key: 0,
|
|
645
|
+
label: "资源图标"
|
|
646
|
+
}, {
|
|
647
|
+
default: E(() => [f(W, {
|
|
648
|
+
modelValue: t.value.icon,
|
|
649
|
+
"onUpdate:modelValue": n[0] ||= (e) => t.value.icon = e,
|
|
650
|
+
"box-type": C(d).boxType,
|
|
651
|
+
"onUpdate:boxType": n[1] ||= (e) => C(d).boxType = e,
|
|
652
|
+
angle: C(d).angle,
|
|
653
|
+
"onUpdate:angle": n[2] ||= (e) => C(d).angle = e,
|
|
654
|
+
background: C(d).background,
|
|
655
|
+
"onUpdate:background": n[3] ||= (e) => C(d).background = e,
|
|
656
|
+
radius: C(d).radius,
|
|
657
|
+
"onUpdate:radius": n[4] ||= (e) => C(d).radius = e,
|
|
658
|
+
"icon-color": C(d).iconColor,
|
|
659
|
+
"onUpdate:iconColor": n[5] ||= (e) => C(d).iconColor = e,
|
|
660
|
+
"icon-size": C(d).iconSize,
|
|
661
|
+
"onUpdate:iconSize": n[6] ||= (e) => C(d).iconSize = e
|
|
662
|
+
}, {
|
|
663
|
+
default: E(({ open: e }) => [t.value.icon ? (g(), l("div", {
|
|
664
|
+
key: 0,
|
|
665
|
+
class: "size-64px flex justify-center items-center cursor-pointer rounded-md border-px border-dashed relative group border-[#d9d9d9] dark:border-[#424242] hover:border-[#5794f7] dark:hover:border-[#5187e1] p-8px",
|
|
666
|
+
onClick: e
|
|
667
|
+
}, [C(d).boxType && C(d).boxType !== "null" ? (g(), s(C(r), {
|
|
668
|
+
key: 0,
|
|
669
|
+
name: t.value.icon,
|
|
670
|
+
box: C(d).boxType,
|
|
671
|
+
size: "48px",
|
|
672
|
+
radius: C(d).radius,
|
|
673
|
+
background: C(d).background,
|
|
674
|
+
angle: C(d).angle,
|
|
675
|
+
"icon-size": C(d).iconSize,
|
|
676
|
+
color: (t.value.icon || "").startsWith("antd:") ? C(d).iconColor || "#ffffff" : void 0
|
|
677
|
+
}, null, 8, [
|
|
678
|
+
"name",
|
|
679
|
+
"box",
|
|
680
|
+
"radius",
|
|
681
|
+
"background",
|
|
682
|
+
"angle",
|
|
683
|
+
"icon-size",
|
|
684
|
+
"color"
|
|
685
|
+
])) : (g(), s(C(r), {
|
|
686
|
+
key: 1,
|
|
687
|
+
name: t.value.icon,
|
|
688
|
+
size: "48px",
|
|
689
|
+
color: (t.value.icon || "").startsWith("antd:") && C(d).iconColor || void 0
|
|
690
|
+
}, null, 8, ["name", "color"])), t.value.icon ? (g(), l("button", {
|
|
691
|
+
key: 2,
|
|
692
|
+
class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full cursor-pointer border-none op-65 dark:op-55 hover:op-100",
|
|
693
|
+
type: "button",
|
|
694
|
+
onClick: h
|
|
695
|
+
}, [f(C(r), {
|
|
696
|
+
name: "antd:CloseOutlined",
|
|
697
|
+
size: "10px"
|
|
698
|
+
})])) : c("", !0)], 8, G)) : (g(), l("div", {
|
|
699
|
+
key: 1,
|
|
700
|
+
class: "size-64px flex justify-center items-center rounded-md border-px border-dashed cursor-pointer border-[#d9d9d9] dark:border-[#424242] hover:border-[#5794f7] dark:hover:border-[#5187e1] text-[#d9d9d9] dark:text-[#424242] hover:text-[#5794f7] dark:hover:text-[#5187e1] transition",
|
|
701
|
+
onClick: e
|
|
702
|
+
}, [u("div", Ge, [f(C(r), { name: "antd:PlusOutlined" }), n[7] ||= u("span", { class: "text-10px mt-1" }, "选择图标", -1)])], 8, K))]),
|
|
703
|
+
_: 1
|
|
704
|
+
}, 8, [
|
|
705
|
+
"modelValue",
|
|
706
|
+
"box-type",
|
|
707
|
+
"angle",
|
|
708
|
+
"background",
|
|
709
|
+
"radius",
|
|
710
|
+
"icon-color",
|
|
711
|
+
"icon-size"
|
|
712
|
+
])]),
|
|
713
|
+
_: 1
|
|
714
|
+
})) : c("", !0);
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
}), qe = /* @__PURE__ */ e({ default: () => q }), q = Ke;
|
|
718
|
+
//#endregion
|
|
719
|
+
export { qe as n, q as t };
|