@vtj/ui 0.6.21 → 0.6.23
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/cdn/index.js +1 -1
- package/cdn/style.css +1 -1
- package/lib/index.js +1667 -1270
- package/lib/style.css +1 -1
- package/package.json +8 -7
- package/types/components/action/Action.d.ts +1 -1
- package/types/components/action/Trigger.d.ts +1 -1
- package/types/components/action-bar/ActionBar.d.ts +1 -1
- package/types/components/chart/Chart.d.ts +35 -0
- package/types/components/chart/index.d.ts +3 -0
- package/types/components/chart/types.d.ts +17 -0
- package/types/components/chart/useChart.d.ts +7 -0
- package/types/components/container/Container.d.ts +8 -1
- package/types/components/container/types.d.ts +3 -0
- package/types/components/data-item/DataItem.d.ts +451 -0
- package/types/components/data-item/index.d.ts +3 -0
- package/types/components/data-item/types.d.ts +49 -0
- package/types/components/dialog-form/DialogForm.d.ts +91 -0
- package/types/components/dialog-form/index.d.ts +3 -0
- package/types/components/dialog-form/types.d.ts +46 -0
- package/types/components/field/Field.d.ts +1 -0
- package/types/components/field/editors/CheckboxEditor.d.ts +22 -20
- package/types/components/field/editors/RadioEditor.d.ts +22 -20
- package/types/components/field/editors/SelectEditor.d.ts +20 -12
- package/types/components/form/Form.d.ts +1 -0
- package/types/components/icon/Icon.d.ts +18 -0
- package/types/components/icon/types.d.ts +9 -0
- package/types/components/index.d.ts +4 -0
- package/types/components/mask/components/Avatar.d.ts +11 -10
- package/types/components/mask/components/Brand.d.ts +20 -30
- package/types/components/mask/components/Content.d.ts +11 -20
- package/types/components/mask/components/Menu.d.ts +21 -49
- package/types/components/mask/components/Sidebar.d.ts +11 -10
- package/types/components/mask/components/SwitchBar.d.ts +23 -27
- package/types/components/mask/components/Tabs.d.ts +12 -41
- package/types/components/mask/components/Toolbar.d.ts +21 -27
- package/types/components/menu/Menu.d.ts +24 -27
- package/types/components/menu/MenuItem.d.ts +10 -24
- package/types/components/panel/Panel.d.ts +13 -1
- package/types/components/panel/types.d.ts +6 -0
- package/types/components/simple-mask/SimpleMask.d.ts +26 -30
- package/types/components/startup/Startup.d.ts +22 -26
- package/types/components/tabs/Tabs.d.ts +52 -0
- package/types/components/tabs/index.d.ts +3 -0
- package/types/components/tabs/types.d.ts +24 -0
- package/types/list.d.ts +2 -2
- package/types/version.d.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElDivider as
|
|
3
|
-
import { VideoPlay as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import { Minimize as
|
|
6
|
-
import { useDraggable as
|
|
7
|
-
import { isEqual as
|
|
8
|
-
|
|
1
|
+
import { defineComponent as M, openBlock as u, createElementBlock as E, renderSlot as _, createElementVNode as R, unref as n, toDisplayString as F, createVNode as k, withCtx as f, createTextVNode as N, createBlock as g, createCommentVNode as y, useAttrs as Ue, getCurrentInstance as ve, computed as h, markRaw as be, normalizeClass as Q, normalizeStyle as ue, resolveDynamicComponent as W, mergeProps as j, Fragment as Z, renderList as se, isVNode as jt, h as te, toRef as Be, useSlots as Nt, toRaw as pe, ref as D, normalizeProps as ce, guardReactiveProps as ge, effectScope as ct, watch as L, reactive as He, onMounted as ut, onUnmounted as dt, watchEffect as pt, nextTick as me, Teleport as mt, withDirectives as J, createSlots as ye, render as Ye, vShow as ee, isRef as $e, withModifiers as Xt, KeepAlive as Ut, shallowRef as qe, provide as Se, inject as we } from "vue";
|
|
2
|
+
import { ElDivider as xe, ElButton as de, ElIcon as Ht, ElSubMenu as Wt, ElBadge as Oe, ElMenuItem as Lt, ElMenu as Kt, ElContainer as et, ElHeader as Qt, ElAside as Zt, ElMain as Jt, ElFooter as Gt, ElDropdown as Yt, ElDropdownMenu as qt, ElDropdownItem as eo, ElTooltip as ft, ElSwitch as We, ElInput as je, ElEmpty as to, ElTabs as gt, ElTabPane as Ne, ElPopover as yt, ElAvatar as oo, ElMessageBox as Re, ElSelect as no, ElOption as ao, ElCheckboxButton as so, ElCheckbox as lo, ElCheckboxGroup as io, ElRadioButton as ro, ElRadio as co, ElRadioGroup as uo, ElInputNumber as po, ElDatePicker as tt, ElTimePicker as mo, ElRate as fo, ElSlider as go, ElCascader as yo, formContextKey as ho, ElFormItem as vo, ElForm as bo, ElImage as _o } from "element-plus";
|
|
3
|
+
import { VideoPlay as ko, Document as re, Menu as ht, ArrowRight as wo, StarFilled as vt, Search as Xe, Close as bt, Expand as xo, Fold as So, Star as _t, Refresh as zo, CopyDocument as Co, Moon as To, Sunny as Eo, MoreFilled as Mo, UserFilled as $o, HomeFilled as Bo, WarningFilled as Io } from "@element-plus/icons-vue";
|
|
4
|
+
import { useRouter as Ae, useRoute as Le, RouterView as kt, routeLocationKey as Ao } from "vue-router";
|
|
5
|
+
import { Minimize as Vo, Popup as Po, Maximize as Do, RawClose as Ro } from "@vtj/icons";
|
|
6
|
+
import { useDraggable as Fo, useMouseInElement as Oo, useEventListener as Ie, useElementSize as wt, useDark as jo, useResizeObserver as No } from "@vueuse/core";
|
|
7
|
+
import { isEqual as Ke, isObject as Qe, uid as xt, arrayToMap as Xo, isUrl as Uo, upperFirstCamelCase as St, toArray as Ho, merge as Wo, set as ot, debounce as Lo } from "@vtj/utils";
|
|
8
|
+
import * as nt from "echarts";
|
|
9
|
+
function oe(a) {
|
|
9
10
|
return typeof a == "string" ? a : `${a}px`;
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function Te(a = 0, t) {
|
|
12
13
|
if (typeof a == "number")
|
|
13
14
|
return a;
|
|
14
15
|
if (/(%|vh|vw)$/i.test(a)) {
|
|
@@ -17,32 +18,32 @@ function _e(a = 0, t) {
|
|
|
17
18
|
}
|
|
18
19
|
return Number.parseInt(a);
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function Va(a, t) {
|
|
21
22
|
const e = {};
|
|
22
23
|
return Object.keys(a).forEach((o) => {
|
|
23
24
|
t.includes(o) || (e[o] = a[o]);
|
|
24
25
|
}), e;
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function Pa(a, t) {
|
|
27
28
|
const e = {};
|
|
28
29
|
return Object.keys(a).forEach((o) => {
|
|
29
30
|
t.includes(o) && (e[o] = a[o]);
|
|
30
31
|
}), e;
|
|
31
32
|
}
|
|
32
|
-
const
|
|
33
|
-
},
|
|
33
|
+
const Da = () => {
|
|
34
|
+
}, at = Symbol("INSTALLED_KEY"), Ko = (a = []) => ({
|
|
34
35
|
install: (e) => {
|
|
35
|
-
e[
|
|
36
|
+
e[at] || (e[at] = !0, a.forEach((o) => {
|
|
36
37
|
o.name && e.component(o.name, o);
|
|
37
38
|
}));
|
|
38
39
|
}
|
|
39
|
-
}),
|
|
40
|
+
}), zt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAQd0lEQVR4nO2dCXRVxRnHf/clIPsekBgIS1hFdqVoZbGLFNTWWgQ3bLVurRYJcTuntbW22qooKKWl2toWquygIFa01doqmBBWWcomIkhACLIKyXvcnu/eefiSNzd57y4vAfI/553wuPfNzJ3/nW9m/t83M4Yx6iTVGOlAC6AD0Bs4F2gGtFT/lmtNgLpABDgMFAN7gCJgH3AQ2ACsAz5V91RbpFfDguUAg4EewBCgLdAQqJXAb5sD7RyuHVGfpcBy4AOgADjkc/k9obq0kP7AN4CrgK7qrQ8aJrALeAt4Q/3dV7XVULWEtAauBq5ThNSpqoIo7AReBWYA/6mqQlQFId2AW4HRwHmpzjwBSMv5N/BHYAHwRSozTyUhQsS9iohGqcrUI1YDE4GXgROpyDAVhMiIKBe4I0V9QxCQgcCvgdeCzigUcPo/BN4HHjiNyRAMBBYBs4BOQWYUFCFdgIXA80DHgPKoCowE3gHuCirvIAj5AfAmcEUAaVcHZAJTgHlqjuQr/CREJm/PAH8G2pyWVZ0crlbzl8v8TNQvQrLVGP5en9I7XdBV9S0/9qu8fhDSC1isZI6zEaKjTQYe8aM+vSZwqeq8u5+lZMTiYeA5oLaXRLwQMhSYe5b0F4niR8BUL6S4VXsvAWYCGZ6Kf2bi+8oVcDuQ9KzbTQvpqQS4GjKcIVrdU25+mCwhbZWuk+WhsGcLxgEPJvusyRAi84xpNR14UhD9a1QyP0iGkEeBQcGV/YyE1O+zwPnJ/CARSEc1NrBin9kQtftFoHEiT5kIIeLj/s3ZXqsecSHwUCJJVEZIGjAJaFXVT3QG4D7ga5U9RmWEiHI7/GyvSZ8QUkPhhhUlVxEhLZUcUAP/ILFld7slJK9GFgkEuRXEjjkSIh6/O0+fZzyt0EK5tLVwIiSvMltXA0+4yWluoiOkqwrVqUFwqA/ckygholI2SCUZZhjM4/bflOYrn1IwT4AZSW3eSlLpUP4/yxPSKtWtwyyBnPPgioHQtpX93Zd0TVXZEbviddcJQ59OMHwAZDTxL+8EIWFRN5a/tTwh31UxtymBtIrhF8GiBwwWPmDw2oMGg3t5rxghIi0NLugAbcRJUKoIiEUYbhwCrz9k57sgz6BvZ7u1pBBjlPk6hdjIRSHnXeV8ChzmF3DlJfDyWIP653yZ28ZP4dKHTfYdBCPNHRndsuGpmwwGdYNjJ2DiYpMnFtheI8OwTWPnLCh43KBR3S9/u/0z+N4Ek8KNYKQu9PvbKkDEQmwL6QP0S0UJhIxhA2D6PWXJEHTNhN7t7Tc46XQj0KQRzBhrMLwPNKgDLRvDY9cZfFOeLtrywjC0B2XIELTLgNm5Br072603RRgZm00sIcNSsSRAyBjSF6b/xIirEMHRE7D7gEtfZhiG9YGe2fGXLuwY41A1oOhzfRLtW8LMcQbnd0wZKd9UC40shGL+Xhl0zkLGwJ4w816D5g7juKlvwbqPwEhkvVRs2thPcfWFhvb62h02ERZqw+vL4e//1afVuTXMGW/QpV1KSMmIDaGKEtI+GSeKGwgZ/brZZLR08AzMWgY/e8l03TqyW8PXesRf2roH3t3w5aI46UdKwnDnVJNXC/XJiemcPd4gp03gpMhr8tXol+ijDwly7iFk9Opiv3VtmuvvmZsPtzxnWp2wm85cCBnRB5pr9IXFK2F/sXImKBjpcOQY3DTJ5LWV+iQvaGOTkp0Z+Ojr8mjoUJSQnkHlJG9X9xyYO96wOk0dFq6AHzxncvS4XVFJ52FCWh24+qJ4cxU5Ca8WmpZNK39VzOKhIzDmWZO31+nT7t0OZuUaZGYESkrbaOB2SMVmBeIrlwfo0h7mjTfo6ODikrdzzCSTw8eS7zdOIQzd28JXNCs3pO94f6PzGl6jNhQfhOsnmrz3P/09F+XAy7kGGc0CmzzWV2tQLEJaqD7EVwgZHdvA/DyDLpn6lN9aCzc/a/L5YfdkWJ15BIb1soe55TEv3+SYpF9BvySkFO2D6yeZrNyuv2dQV3hpnEHTRvZcJwB0jRIieko9X8kogQ5ZMC/PoJvDss531sMNE032H7QrxDVOQq168F2NuZIh9PyCsn2HE4xzYMduuPZpk3U79Td9vQdMG2vQqF4gpAgPTUPKi+XWWMRByDivpW13ezosZ/lgC9w4yWRvsUcysGWRAZ3UPKMclm6CDTsSD5gVUrbssEnZskd/jwwc/ibqQl3fSZGl4e1DakWQLxAyWjW3Z7v9HIygmIRRT5vs2mtXgBdE9SmZe6RpTJKYq8gJe5ibKEQyWb8NrnnS5KPP9D/6dn948W6DunV8JUVc5i1Dfi3GFDKaNYaX7zUY2Fl/z4ZdMPoZk493eyfDwklo2Bgu7x1/af8ReH1VYuaqPISUNZvhe0+ZfLJff8/Ir8Cff2xwTm3f3AZS0mYhxYwnCBkNG9id3lCH6aWYgJETTDZ97BMZ2Obqki5o+6klq2H7LveDBaMurNhoi427HWSW0RfDCz8ySE/3hRSplcyQ2lXHNaQg9evB9LEGlzvMZiwV9SmTddv8U1Etc2XYc4+QxiTN+cB0sRigLISU/HU2KZ85bFFz46Uw9Q5FijcnV3qUkBZuUzBPQnoaTLnd4CoHnViavDzQ6s0+S9oRaJkBwzXm6qO98M46f/Y6ElLeXwM3PGty4Kj+nluGwiOjDatMcX6X5HCutz6kFAb1gDEO08pPDyj/woYA/Aul8PULIEsjxSxaAcX73c36dRBS3iyAMZNNDjvsfJI7Avp2scvlAVYfohHBE0QELu+lH8KImbr2GdNq8ob7HLSw3sJaemW3NAxzlml0Eq+oA4veh9ummhQfiU+rTi3VWr2ZrXohT0mY0NbB4P1qnsl7+f6TYSEM7VrDEM0AYvUOyN/i/9Zs1tC5Dsx8A/70tv6erOae34JwyNOWdwbscNjyK3eEQe+eAUnXYfttbKFRdhcWmhw/7FIxrgzH4VuD4Iav6u/bVeytA5Hd7UJqj0J3SIf5+SZhTRvrrqSTCzra8rtfkIGEKLvXDIh/G4+VJC6VJAt5hqF9Ydo9BplN4398vNTuuzzm/VlIbRjpDrVg2Qb45Vz9myHu0Hn3++wOVcruAI2y+98N8OF2/82VkHFJT5hRgafzyYWwcpMnEUoq8dOQ2r3TFSy7mgaPzoDHFuhTyGkF8+4z6OqXOzSCNcQuHxwhmP2BaanMFSm7yULI6NvV1uacPJ3P/xMemWladZGMTFMO4m3ZJUV3EAcSg/XwafDT6SYTF+t/Ij7q+fcbdMn2RoqYqzoN4Dua0dWeg7BkjZ8yqU1Gz072C6UzU4KX3oO7nzeJRDz3WzJg3ivV6SAMJA4piGlA3l9MJr+h/5n4qOfeZ9C5rQdSSuGiTtBHI1z+60PYUeRf/2F5OjvaZc52GEnOWQa3TTEt/7wPcx5pIQdCapNhzxBSIibkvmjygsOw8PwsmDXesHwlrtyhJlzV31nZlf7Fg8n4Mpvj0Dkb5uYZlsnVQYIjbplicsyl21mD9SJshNSOzw6iQHIQUkojcPcfTaY5bLTaKxvm5CUfOCA6UcMmcEXf+Gtbimzvox/mSsjIaav6PQfHxOJVth/+8FEPbud4iMHdGfJ7+20h5UQp3PUHk9nL9Pf0aWcHo2W1SoKUsK3sdtJEHr+yHD53G1wXAylL+yw70uR8h70qpJ+6aaLJwSO+kiEQV1pJdGK41M+UpQlLBMmtk00WOsQ9DciBmbkG52YkGDhgwKiB8cqutMgFBfaw24u5EjKyzrXNVG9N5KPg3xtst3PxId/JKFVbn596p1b4mrwKsREhTpq2NfrR4OLOtkOrRdOKSRGJP7OV6Gbx11Zth8Jt3syV5enMgFnjDKv16rB0M4yaYLLvcx/czvGQAwM+JIaQpZ5lMQ2EFIkokbfqPxv19wzpDjPGGTRpXIE7NGJHJLbWDD1fKTD54rB7cyVkNG1im1AnT6fldp5gsmd/IGQIlkUVk+hjFHiZIFYEeYB9B2w/+vJt+hulsl8aa9CgfjwplrKbbo+uyuPIcZi/3B7qurFWklcD8XT+xGBwN/0963fans5Pinz0dMbj1Lg0SsghdTpAIJAH2b3XJuXDT/Q5fKt3DCmxbTUCHVrDZRplV2z6+iSiSmIhZrBeXTsKf5jGyYUavUkEytZPAl0vIkrfv6JfYhv6PwLLUgUObFNv26bd+nuu7AeTbzVID8V43kTZ7QPNNBrSPHHTliTfmVuhp2nwu9sMK4JEB/HnjJQYra2BL96ReeDa6JdYQpaoIXBgkAfbuN1+67Y5SJo3D4b+nWKWoaVLKKeDVLLWpZBYCiP6w/cH6y+LS0HKuGpTQP6cspgZ23/HElKsdhgNFEKK+NdHTzLZ6aCi1a6ltE/DLuqWong1WUJ8dha5JOSkPUHVQRYLSUhpQRBu53gcjV3OhmZsMt2zVzgByIMWrFeklPPGyIx7xRZ7GGu1i3T4wxLKBELvPwwTF6m5h5sCpMGba+wJbCyk1V03yeS9tSlbYyh9R5nxZ5rR4+ex33eqLYQc3h//IJNHiaV9ax00bWBw0oRFhTDur2UXfIqafPQYvFIIoZBhEZg3zSR/o/shqKS9cw98XAz9OthL6wq22v7yd9ekdMHneGBzmbJpzg8ZpXYdTQmsCWEte3Hm3gO2qdKJddbIy1RtOux9PmD1T6XQvb3tSFu+FfbsC2yeoUOhWvFcRjzSEVJXTVQCW8RTHlblnLQru6IRU3Tk5YeieyrNUpV3ekB+eGfcDPyt/FXd/FbGxRNSWTKpYCMBb5t1n8/hPaImyDwpxWTIUUpzdBecBIeZUbGrBoHgcYnJSIYQsWu/CELfqoGliMx2qoaKJLl/qGPjauAfpMf6WUV7wlemkcrOZw7LVmrgAhPVgMkRlRGytWYjTN8gXqHHKkssES/C8zWmyzPCamfwSiN8EiEkorY23VT1z3Xa4qfquL1KkaifbZfapTR1mxadOZiTzLwuGcfn20p7qUHiWKlOcEt4BWKynugp6tiKGlSObUoX3JtMXbkJDXhYEVMDZxSpzUQ3J1tHbkPLZMTwlxpCtNinDu0vcPNjt4SE1XHcf3L5+zMV0jKuTXREpYOX4MsSNfJ6+myt/XKQSfR3YkN63MDr0pawGnkldHrMGYxCdc6KZ4Xcr7VGv1F2M9ColWoKOfR+hF8TZz+P756htprN9zHN6oxSdU7hdZ7WaZaD3wfcS6TUN1SLOZN9KavVxpW/dXO8akXwmxBUWOpDyqauCiD9qkSJImGo187bCUEQEsUSdbz3A3426SrEEhUiJWbqQFDFCJIQgewK8oTacfN36vvpBmnl10s8uCyFD7rsujCgINFDnTl+bex+59UUMtP+vQr40AYkBIFUExKFbFl5gzqLKacqCuCAQ6pveEGZqNQe8VKFhEQhiwwuA66RXVj93JAzCRxTSwJmqWBzX5aJu0VVExILWZ4vCwQuVvY6M9EDfZNERAmABao1vKP6iWpREdWJkFjUUgHfMhjopD79Vb9TW20YWdlChOPK5JSoRflr1NLjfDVfcr8LUoDwed8c3yCzYFmUIB9BM3U6prQi+UjrkY9s4CnXZGdu0dWkD5CwJZFwxO0sw20JLJCFdPIJfKmFJwD/B4g2wB0X86iqAAAAAElFTkSuQmCC", Qo = { class: "x-startup" }, Zo = { class: "brand" }, Jo = ["src"], Go = /* @__PURE__ */ R("h3", null, [
|
|
40
41
|
/* @__PURE__ */ N("基于 "),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ R("span", null, "Vue3 + TypeScript"),
|
|
42
43
|
/* @__PURE__ */ N(" 的低代码设计器引擎")
|
|
43
|
-
], -1),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
], -1),
|
|
44
|
+
], -1), Yo = { class: "btn" }, qo = /* @__PURE__ */ R("div", { class: "ba" }, [
|
|
45
|
+
/* @__PURE__ */ R("a", { href: "http://beian.miit.gov.cn/" }, "粤ICP备2023104074号")
|
|
46
|
+
], -1), en = /* @__PURE__ */ M({
|
|
46
47
|
name: "XStartup",
|
|
47
48
|
__name: "Startup",
|
|
48
49
|
props: {
|
|
@@ -56,53 +57,53 @@ const ga = () => {
|
|
|
56
57
|
}, o = () => {
|
|
57
58
|
t.example && t.example(t.link);
|
|
58
59
|
};
|
|
59
|
-
return (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
return (l, s) => (u(), E("div", Qo, [
|
|
61
|
+
_(l.$slots, "default", {}, () => [
|
|
62
|
+
R("div", null, [
|
|
63
|
+
R("div", Zo, [
|
|
64
|
+
R("img", { src: n(zt) }, null, 8, Jo),
|
|
65
|
+
R("h1", null, F(t.text), 1)
|
|
65
66
|
]),
|
|
66
|
-
k(n(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
k(n(
|
|
67
|
+
k(n(xe)),
|
|
68
|
+
Go,
|
|
69
|
+
R("div", Yo, [
|
|
70
|
+
k(n(de), {
|
|
70
71
|
onClick: e,
|
|
71
72
|
type: "primary",
|
|
72
73
|
round: "",
|
|
73
74
|
size: "large",
|
|
74
|
-
icon: n(
|
|
75
|
+
icon: n(ko)
|
|
75
76
|
}, {
|
|
76
|
-
default:
|
|
77
|
+
default: f(() => [
|
|
77
78
|
N(" 立即开始体验 ")
|
|
78
79
|
]),
|
|
79
80
|
_: 1
|
|
80
81
|
}, 8, ["icon"]),
|
|
81
|
-
t.example ? (
|
|
82
|
+
t.example ? (u(), g(n(de), {
|
|
82
83
|
key: 0,
|
|
83
84
|
onClick: o,
|
|
84
85
|
type: "default",
|
|
85
86
|
round: "",
|
|
86
87
|
size: "large",
|
|
87
|
-
icon: n(
|
|
88
|
+
icon: n(re)
|
|
88
89
|
}, {
|
|
89
|
-
default:
|
|
90
|
+
default: f(() => [
|
|
90
91
|
N(" 加载示例项目 ")
|
|
91
92
|
]),
|
|
92
93
|
_: 1
|
|
93
|
-
}, 8, ["icon"])) :
|
|
94
|
+
}, 8, ["icon"])) : y("", !0)
|
|
94
95
|
])
|
|
95
96
|
])
|
|
96
97
|
]),
|
|
97
|
-
|
|
98
|
+
qo
|
|
98
99
|
]));
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
|
-
const
|
|
102
|
+
const tn = {
|
|
102
103
|
default: 14,
|
|
103
104
|
small: 12,
|
|
104
105
|
large: 18
|
|
105
|
-
},
|
|
106
|
+
}, on = {
|
|
106
107
|
icon: {
|
|
107
108
|
type: [String, Object]
|
|
108
109
|
},
|
|
@@ -115,47 +116,61 @@ const Qo = {
|
|
|
115
116
|
},
|
|
116
117
|
src: {
|
|
117
118
|
type: String
|
|
119
|
+
},
|
|
120
|
+
background: {
|
|
121
|
+
type: String
|
|
122
|
+
},
|
|
123
|
+
padding: {
|
|
124
|
+
type: Number
|
|
125
|
+
},
|
|
126
|
+
radius: {
|
|
127
|
+
type: Number
|
|
118
128
|
}
|
|
119
|
-
},
|
|
129
|
+
}, nn = ["src"], ae = /* @__PURE__ */ M({
|
|
120
130
|
name: "XIcon",
|
|
121
131
|
__name: "Icon",
|
|
122
|
-
props:
|
|
132
|
+
props: on,
|
|
123
133
|
setup(a) {
|
|
124
|
-
const t = a, e =
|
|
134
|
+
const t = a, e = Ue(), o = ve(), l = h(() => {
|
|
125
135
|
if (!t.icon)
|
|
126
136
|
return null;
|
|
127
|
-
const
|
|
128
|
-
return typeof t.icon == "object" ?
|
|
129
|
-
}),
|
|
130
|
-
const
|
|
137
|
+
const i = o?.appContext.app;
|
|
138
|
+
return typeof t.icon == "object" ? be(t.icon) : i?.component(t.icon) || t.icon;
|
|
139
|
+
}), s = h(() => {
|
|
140
|
+
const i = {
|
|
131
141
|
"is-pointer": !!e.onClick
|
|
132
142
|
};
|
|
133
|
-
return !
|
|
134
|
-
}),
|
|
135
|
-
|
|
136
|
-
|
|
143
|
+
return !l.value && t.icon && (i[t.icon] = !0), i;
|
|
144
|
+
}), c = h(() => ({
|
|
145
|
+
"background-color": t.background,
|
|
146
|
+
"border-radius": t.radius ? oe(t.radius) : void 0,
|
|
147
|
+
padding: t.padding ? oe(t.padding) : void 0
|
|
148
|
+
})), r = h(() => typeof t.size == "number" ? t.size : tn[t.size] ?? void 0);
|
|
149
|
+
return (i, m) => (u(), g(n(Ht), {
|
|
150
|
+
class: Q(["x-icon", s.value]),
|
|
137
151
|
color: t.color,
|
|
138
|
-
size:
|
|
152
|
+
size: r.value,
|
|
153
|
+
style: ue(c.value)
|
|
139
154
|
}, {
|
|
140
|
-
default:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
t.src ? (
|
|
155
|
+
default: f(() => [
|
|
156
|
+
_(i.$slots, "default", {}, () => [
|
|
157
|
+
l.value ? (u(), g(W(l.value), { key: 0 })) : y("", !0),
|
|
158
|
+
t.src ? (u(), E("img", {
|
|
144
159
|
key: 1,
|
|
145
160
|
src: t.src
|
|
146
|
-
}, null, 8,
|
|
161
|
+
}, null, 8, nn)) : y("", !0)
|
|
147
162
|
])
|
|
148
163
|
]),
|
|
149
164
|
_: 3
|
|
150
|
-
}, 8, ["class", "color", "size"]));
|
|
165
|
+
}, 8, ["class", "color", "size", "style"]));
|
|
151
166
|
}
|
|
152
|
-
}),
|
|
167
|
+
}), an = { class: "x-menu__wrapper" }, sn = {
|
|
153
168
|
key: 1,
|
|
154
169
|
class: "x-menu__title"
|
|
155
|
-
},
|
|
170
|
+
}, ln = /* @__PURE__ */ R("i", null, null, -1), rn = {
|
|
156
171
|
key: 0,
|
|
157
172
|
class: "x-menu__title"
|
|
158
|
-
},
|
|
173
|
+
}, cn = /* @__PURE__ */ R("i", null, null, -1), Ct = /* @__PURE__ */ M({
|
|
159
174
|
inheritAttrs: !1,
|
|
160
175
|
name: "XMenuItem",
|
|
161
176
|
__name: "MenuItem",
|
|
@@ -165,70 +180,70 @@ const Qo = {
|
|
|
165
180
|
defaultIcon: { type: [Object, Function] }
|
|
166
181
|
},
|
|
167
182
|
setup(a) {
|
|
168
|
-
const t = a, e =
|
|
169
|
-
if (
|
|
170
|
-
return typeof
|
|
171
|
-
},
|
|
172
|
-
return (
|
|
183
|
+
const t = a, e = ve(), o = (c) => {
|
|
184
|
+
if (c)
|
|
185
|
+
return typeof c == "string" && (e?.appContext.app?.component(c) || t.defaultIcon) || c;
|
|
186
|
+
}, l = (c) => typeof c == "object" ? c : { value: c }, s = (c = []) => c.filter((r) => !r.hidden);
|
|
187
|
+
return (c, r) => t.item.children ? (u(), g(n(Wt), j({
|
|
173
188
|
key: 0,
|
|
174
189
|
disabled: t.item.disabled
|
|
175
190
|
}, t.subMenu, {
|
|
176
191
|
index: String(t.item.id)
|
|
177
192
|
}), {
|
|
178
|
-
title:
|
|
179
|
-
|
|
180
|
-
t.item.icon ? (
|
|
193
|
+
title: f(() => [
|
|
194
|
+
R("div", an, [
|
|
195
|
+
t.item.icon ? (u(), g(n(ae), {
|
|
181
196
|
key: 0,
|
|
182
197
|
icon: o(t.item.icon)
|
|
183
|
-
}, null, 8, ["icon"])) :
|
|
184
|
-
t.item.title ? (
|
|
185
|
-
t.item.badge ? (
|
|
198
|
+
}, null, 8, ["icon"])) : y("", !0),
|
|
199
|
+
t.item.title ? (u(), E("span", sn, F(t.item.title), 1)) : y("", !0),
|
|
200
|
+
t.item.badge ? (u(), g(n(Oe), j({
|
|
186
201
|
key: 2,
|
|
187
202
|
class: "x-menu__badge"
|
|
188
|
-
},
|
|
189
|
-
default:
|
|
190
|
-
|
|
203
|
+
}, l(t.item.badge)), {
|
|
204
|
+
default: f(() => [
|
|
205
|
+
ln
|
|
191
206
|
]),
|
|
192
207
|
_: 1
|
|
193
|
-
}, 16)) :
|
|
208
|
+
}, 16)) : y("", !0)
|
|
194
209
|
])
|
|
195
210
|
]),
|
|
196
|
-
default:
|
|
197
|
-
(
|
|
198
|
-
key:
|
|
199
|
-
item:
|
|
211
|
+
default: f(() => [
|
|
212
|
+
(u(!0), E(Z, null, se(s(t.item.children), (i) => (u(), g(n(Ct), {
|
|
213
|
+
key: i.id,
|
|
214
|
+
item: i,
|
|
200
215
|
subMenu: t.subMenu,
|
|
201
216
|
defaultIcon: t.defaultIcon
|
|
202
217
|
}, null, 8, ["item", "subMenu", "defaultIcon"]))), 128))
|
|
203
218
|
]),
|
|
204
219
|
_: 1
|
|
205
|
-
}, 16, ["disabled", "index"])) : (
|
|
220
|
+
}, 16, ["disabled", "index"])) : (u(), g(n(Lt), {
|
|
206
221
|
key: 1,
|
|
207
222
|
index: String(t.item.id),
|
|
208
223
|
disabled: t.item.disabled
|
|
209
224
|
}, {
|
|
210
|
-
title:
|
|
211
|
-
t.item.title ? (
|
|
212
|
-
t.item.badge ? (
|
|
225
|
+
title: f(() => [
|
|
226
|
+
t.item.title ? (u(), E("span", rn, F(t.item.title), 1)) : y("", !0),
|
|
227
|
+
t.item.badge ? (u(), g(n(Oe), j({
|
|
213
228
|
key: 1,
|
|
214
229
|
class: "x-menu__badge"
|
|
215
|
-
},
|
|
216
|
-
default:
|
|
217
|
-
|
|
230
|
+
}, l(t.item.badge)), {
|
|
231
|
+
default: f(() => [
|
|
232
|
+
cn
|
|
218
233
|
]),
|
|
219
234
|
_: 1
|
|
220
|
-
}, 16)) :
|
|
235
|
+
}, 16)) : y("", !0)
|
|
221
236
|
]),
|
|
222
|
-
default:
|
|
223
|
-
t.item.icon ? (
|
|
237
|
+
default: f(() => [
|
|
238
|
+
t.item.icon ? (u(), g(n(ae), {
|
|
224
239
|
key: 0,
|
|
225
240
|
icon: o(t.item.icon)
|
|
226
|
-
}, null, 8, ["icon"])) :
|
|
241
|
+
}, null, 8, ["icon"])) : y("", !0)
|
|
227
242
|
]),
|
|
228
243
|
_: 1
|
|
229
244
|
}, 8, ["index", "disabled"]));
|
|
230
245
|
}
|
|
231
|
-
}),
|
|
246
|
+
}), ne = /* @__PURE__ */ M({
|
|
232
247
|
inheritAttrs: !1,
|
|
233
248
|
name: "XMenu",
|
|
234
249
|
__name: "Menu",
|
|
@@ -239,27 +254,27 @@ const Qo = {
|
|
|
239
254
|
},
|
|
240
255
|
emits: ["select"],
|
|
241
256
|
setup(a, { emit: t }) {
|
|
242
|
-
const e = a, o = h(() => e.data.filter((
|
|
243
|
-
const
|
|
244
|
-
for (const
|
|
245
|
-
if (
|
|
246
|
-
return
|
|
247
|
-
if (
|
|
248
|
-
const S =
|
|
257
|
+
const e = a, o = t, l = h(() => e.data.filter((r) => !r.hidden)), s = (r, i) => {
|
|
258
|
+
const m = (p, d = []) => {
|
|
259
|
+
for (const b of d) {
|
|
260
|
+
if (b.id.toString() === p.toString())
|
|
261
|
+
return b;
|
|
262
|
+
if (b.children?.length) {
|
|
263
|
+
const S = m(p, b.children);
|
|
249
264
|
if (S)
|
|
250
265
|
return S;
|
|
251
266
|
}
|
|
252
267
|
}
|
|
253
268
|
};
|
|
254
|
-
return
|
|
255
|
-
},
|
|
256
|
-
const
|
|
257
|
-
|
|
269
|
+
return m(i, r);
|
|
270
|
+
}, c = (r) => {
|
|
271
|
+
const i = s(l.value, r);
|
|
272
|
+
i && o("select", i);
|
|
258
273
|
};
|
|
259
|
-
return (
|
|
260
|
-
default:
|
|
261
|
-
(
|
|
262
|
-
item: { ...
|
|
274
|
+
return (r, i) => (u(), g(n(Kt), j({ class: "x-menu" }, r.$attrs, { onSelect: c }), {
|
|
275
|
+
default: f(() => [
|
|
276
|
+
(u(!0), E(Z, null, se(l.value, (m) => (u(), g(n(Ct), {
|
|
277
|
+
item: { ...m, icon: m.icon || n(ht) },
|
|
263
278
|
defaultIcon: e.defaultIcon,
|
|
264
279
|
subMenu: e.subMenu
|
|
265
280
|
}, null, 8, ["item", "defaultIcon", "subMenu"]))), 256))
|
|
@@ -267,7 +282,7 @@ const Qo = {
|
|
|
267
282
|
_: 1
|
|
268
283
|
}, 16));
|
|
269
284
|
}
|
|
270
|
-
}),
|
|
285
|
+
}), un = { class: "x-simple-mask__brand" }, dn = { class: "x-simple-mask__aciton" }, pn = /* @__PURE__ */ M({
|
|
271
286
|
name: "XSimpleMask",
|
|
272
287
|
__name: "SimpleMask",
|
|
273
288
|
props: {
|
|
@@ -279,53 +294,53 @@ const Qo = {
|
|
|
279
294
|
menu: {}
|
|
280
295
|
},
|
|
281
296
|
setup(a, { expose: t }) {
|
|
282
|
-
const e = a, o =
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
const
|
|
289
|
-
o.push(
|
|
297
|
+
const e = a, o = Ae(), l = Le(), s = h(() => l.params.id), c = () => {
|
|
298
|
+
const i = e.project.home;
|
|
299
|
+
i && o.push(i);
|
|
300
|
+
}, r = (i) => {
|
|
301
|
+
const m = i?.id;
|
|
302
|
+
if (m) {
|
|
303
|
+
const d = `${e.preview ? "/preview" : e.project.page}/${m}`;
|
|
304
|
+
o.push(d);
|
|
290
305
|
}
|
|
291
306
|
};
|
|
292
307
|
return t({
|
|
293
|
-
goHome:
|
|
294
|
-
}), (
|
|
295
|
-
default:
|
|
296
|
-
k(n(
|
|
297
|
-
default:
|
|
298
|
-
|
|
299
|
-
|
|
308
|
+
goHome: c
|
|
309
|
+
}), (i, m) => (u(), g(n(et), { class: "x-simple-mask" }, {
|
|
310
|
+
default: f(() => [
|
|
311
|
+
k(n(Qt), { class: "x-simple-mask__header" }, {
|
|
312
|
+
default: f(() => [
|
|
313
|
+
R("div", un, [
|
|
314
|
+
R("span", {
|
|
300
315
|
class: "x-simple-mask__logo",
|
|
301
|
-
onClick:
|
|
316
|
+
onClick: c
|
|
302
317
|
}, [
|
|
303
|
-
|
|
304
|
-
N(
|
|
318
|
+
_(i.$slots, "logo", {}, () => [
|
|
319
|
+
N(F(e.project.name), 1)
|
|
305
320
|
])
|
|
306
321
|
])
|
|
307
322
|
]),
|
|
308
|
-
|
|
309
|
-
|
|
323
|
+
R("div", dn, [
|
|
324
|
+
_(i.$slots, "action")
|
|
310
325
|
])
|
|
311
326
|
]),
|
|
312
327
|
_: 3
|
|
313
328
|
}),
|
|
314
|
-
k(n(
|
|
315
|
-
default:
|
|
316
|
-
k(n(
|
|
317
|
-
default:
|
|
318
|
-
k(n(
|
|
319
|
-
"default-active":
|
|
320
|
-
onSelect:
|
|
329
|
+
k(n(et), null, {
|
|
330
|
+
default: f(() => [
|
|
331
|
+
k(n(Zt), { class: "x-simple-mask__aside" }, {
|
|
332
|
+
default: f(() => [
|
|
333
|
+
k(n(ne), j(e.menu, {
|
|
334
|
+
"default-active": s.value,
|
|
335
|
+
onSelect: r
|
|
321
336
|
}), null, 16, ["default-active"])
|
|
322
337
|
]),
|
|
323
338
|
_: 1
|
|
324
339
|
}),
|
|
325
|
-
k(n(
|
|
326
|
-
default:
|
|
327
|
-
|
|
328
|
-
k(n(
|
|
340
|
+
k(n(Jt), { class: "x-simple-mask__main" }, {
|
|
341
|
+
default: f(() => [
|
|
342
|
+
_(i.$slots, "default", {}, () => [
|
|
343
|
+
k(n(kt))
|
|
329
344
|
])
|
|
330
345
|
]),
|
|
331
346
|
_: 3
|
|
@@ -333,21 +348,21 @@ const Qo = {
|
|
|
333
348
|
]),
|
|
334
349
|
_: 3
|
|
335
350
|
}),
|
|
336
|
-
|
|
351
|
+
i.$slots.footer ? (u(), g(n(Gt), {
|
|
337
352
|
key: 0,
|
|
338
353
|
class: "x-simple-mask__footer",
|
|
339
354
|
height: "40px"
|
|
340
355
|
}, {
|
|
341
|
-
default:
|
|
342
|
-
|
|
356
|
+
default: f(() => [
|
|
357
|
+
_(i.$slots, "footer")
|
|
343
358
|
]),
|
|
344
359
|
_: 3
|
|
345
|
-
})) :
|
|
360
|
+
})) : y("", !0)
|
|
346
361
|
]),
|
|
347
362
|
_: 3
|
|
348
363
|
}));
|
|
349
364
|
}
|
|
350
|
-
}),
|
|
365
|
+
}), Tt = {
|
|
351
366
|
/**
|
|
352
367
|
* 动作名称标识
|
|
353
368
|
*/
|
|
@@ -443,21 +458,21 @@ const Qo = {
|
|
|
443
458
|
type: Boolean
|
|
444
459
|
}
|
|
445
460
|
};
|
|
446
|
-
function
|
|
461
|
+
function mn(a) {
|
|
447
462
|
return h(() => {
|
|
448
463
|
const t = a.tooltip;
|
|
449
464
|
if (t)
|
|
450
465
|
return typeof t == "string" ? { content: t } : t;
|
|
451
466
|
});
|
|
452
467
|
}
|
|
453
|
-
function
|
|
468
|
+
function fn(a) {
|
|
454
469
|
return h(() => {
|
|
455
470
|
const t = a.badge;
|
|
456
471
|
if (t)
|
|
457
472
|
return typeof t == "object" ? t : { value: t };
|
|
458
473
|
});
|
|
459
474
|
}
|
|
460
|
-
function
|
|
475
|
+
function gn(a) {
|
|
461
476
|
return h(() => {
|
|
462
477
|
const { dropdown: t, menus: e } = a;
|
|
463
478
|
if (e && e.length > 0)
|
|
@@ -467,12 +482,12 @@ function rn(a) {
|
|
|
467
482
|
);
|
|
468
483
|
});
|
|
469
484
|
}
|
|
470
|
-
function
|
|
471
|
-
const t =
|
|
485
|
+
function yn(a) {
|
|
486
|
+
const t = ve();
|
|
472
487
|
return h(() => {
|
|
473
488
|
const e = n(a);
|
|
474
489
|
if (e)
|
|
475
|
-
if (typeof e == "string" || e.setup || e.render ||
|
|
490
|
+
if (typeof e == "string" || e.setup || e.render || jt(e)) {
|
|
476
491
|
const o = t?.appContext.app;
|
|
477
492
|
return {
|
|
478
493
|
icon: typeof e == "string" && o?.component(e) || e
|
|
@@ -482,93 +497,93 @@ function cn(a) {
|
|
|
482
497
|
return null;
|
|
483
498
|
});
|
|
484
499
|
}
|
|
485
|
-
function
|
|
486
|
-
const t =
|
|
487
|
-
return t.value ?
|
|
500
|
+
function he(a) {
|
|
501
|
+
const t = yn(a);
|
|
502
|
+
return t.value ? be(M({ render: () => te(ae, t.value) })) : null;
|
|
488
503
|
}
|
|
489
|
-
function
|
|
504
|
+
function Ze(a, t) {
|
|
490
505
|
return h(() => {
|
|
491
506
|
const e = n(a);
|
|
492
507
|
return typeof e == "function" ? e(t) : !!e;
|
|
493
508
|
});
|
|
494
509
|
}
|
|
495
|
-
const
|
|
510
|
+
const hn = { key: 0 }, vn = /* @__PURE__ */ M({
|
|
496
511
|
__name: "Trigger",
|
|
497
|
-
props:
|
|
512
|
+
props: Tt,
|
|
498
513
|
emits: ["click"],
|
|
499
514
|
setup(a, { emit: t }) {
|
|
500
|
-
const e = a, o =
|
|
515
|
+
const e = a, o = t, l = he(Be(e, "icon")), s = Ze(Be(e, "disabled")), c = h(() => ({
|
|
501
516
|
[`is-${e.mode}`]: !!e.mode,
|
|
502
517
|
[`is-${e.type}`]: !!e.type,
|
|
503
518
|
[`is-${e.size}`]: !!e.size && e.size !== "default",
|
|
504
519
|
[`is-background-${e.background}`]: e.mode === "icon" && !!e.background,
|
|
505
520
|
"is-disabled": !!e.disabled,
|
|
506
521
|
"is-circle": !!e.circle
|
|
507
|
-
})),
|
|
508
|
-
|
|
522
|
+
})), r = () => {
|
|
523
|
+
o("click");
|
|
509
524
|
};
|
|
510
|
-
return (
|
|
525
|
+
return (i, m) => e.mode === "button" ? (u(), g(n(de), j({
|
|
511
526
|
key: 0,
|
|
512
|
-
icon: n(
|
|
527
|
+
icon: n(l),
|
|
513
528
|
type: e.type,
|
|
514
529
|
size: e.size,
|
|
515
530
|
disabled: n(s)
|
|
516
|
-
}, e.button, { onClick:
|
|
517
|
-
default:
|
|
518
|
-
N(
|
|
531
|
+
}, e.button, { onClick: r }), {
|
|
532
|
+
default: f(() => [
|
|
533
|
+
N(F(i.label), 1)
|
|
519
534
|
]),
|
|
520
535
|
_: 1
|
|
521
|
-
}, 16, ["icon", "type", "size", "disabled"])) : (
|
|
536
|
+
}, 16, ["icon", "type", "size", "disabled"])) : (u(), E("div", {
|
|
522
537
|
key: 1,
|
|
523
|
-
class:
|
|
524
|
-
onClick:
|
|
538
|
+
class: Q(["x-action__inner", c.value]),
|
|
539
|
+
onClick: r
|
|
525
540
|
}, [
|
|
526
|
-
(
|
|
527
|
-
|
|
541
|
+
(u(), g(W(n(l)))),
|
|
542
|
+
i.label ? (u(), E("span", hn, F(i.label), 1)) : y("", !0)
|
|
528
543
|
], 2));
|
|
529
544
|
}
|
|
530
|
-
}),
|
|
545
|
+
}), Y = /* @__PURE__ */ M({
|
|
531
546
|
name: "XAction",
|
|
532
547
|
__name: "Action",
|
|
533
|
-
props:
|
|
548
|
+
props: Tt,
|
|
534
549
|
emits: ["click", "command"],
|
|
535
550
|
setup(a, { emit: t }) {
|
|
536
|
-
const e = a, o =
|
|
551
|
+
const e = a, o = Nt(), l = t, s = mn(e), c = fn(e), r = gn(e), i = Ze(Be(e, "disabled")), m = h(() => ({
|
|
537
552
|
[`x-action--${e.mode}`]: !!e.mode
|
|
538
|
-
})),
|
|
539
|
-
|
|
540
|
-
},
|
|
541
|
-
const T = e.menus?.find((
|
|
542
|
-
T &&
|
|
543
|
-
},
|
|
544
|
-
|
|
545
|
-
{ ...
|
|
553
|
+
})), p = () => {
|
|
554
|
+
l("click", pe(e));
|
|
555
|
+
}, d = (x) => {
|
|
556
|
+
const T = e.menus?.find((v) => v.command === x);
|
|
557
|
+
T && l("command", pe(T));
|
|
558
|
+
}, b = (x) => te(Oe, c.value, () => [].concat(x)), S = (x) => te(
|
|
559
|
+
Yt,
|
|
560
|
+
{ ...r.value, disabled: i.value, onCommand: d },
|
|
546
561
|
{
|
|
547
|
-
default: () => [
|
|
562
|
+
default: () => [x],
|
|
548
563
|
dropdown: () => [
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
() => (e.menus || []).map((T) =>
|
|
552
|
-
|
|
564
|
+
te(
|
|
565
|
+
qt,
|
|
566
|
+
() => (e.menus || []).map((T) => te(
|
|
567
|
+
eo,
|
|
553
568
|
T,
|
|
554
569
|
() => o.item ? o.item({ item: T }) : T.label
|
|
555
570
|
))
|
|
556
571
|
)
|
|
557
572
|
]
|
|
558
573
|
}
|
|
559
|
-
),
|
|
560
|
-
|
|
561
|
-
]),
|
|
562
|
-
let
|
|
563
|
-
return
|
|
574
|
+
), w = (x) => te(ft, { ...s.value, disabled: i.value }, () => [
|
|
575
|
+
x
|
|
576
|
+
]), V = h(() => {
|
|
577
|
+
let x = o.default ? o.default()[0] : te(be(vn), { ...e, onClick: p });
|
|
578
|
+
return c.value && (x = b(x)), r.value && (x = S(x)), s.value && (x = w(x)), x;
|
|
564
579
|
});
|
|
565
|
-
return (
|
|
566
|
-
class:
|
|
580
|
+
return (x, T) => (u(), E("div", {
|
|
581
|
+
class: Q(["x-action", m.value])
|
|
567
582
|
}, [
|
|
568
|
-
(
|
|
583
|
+
(u(), g(W(V.value)))
|
|
569
584
|
], 2));
|
|
570
585
|
}
|
|
571
|
-
}),
|
|
586
|
+
}), bn = {
|
|
572
587
|
/**
|
|
573
588
|
* 动作项
|
|
574
589
|
*/
|
|
@@ -639,38 +654,38 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
639
654
|
button: {
|
|
640
655
|
type: Object
|
|
641
656
|
}
|
|
642
|
-
},
|
|
657
|
+
}, Ve = /* @__PURE__ */ M({
|
|
643
658
|
name: "XActionBar",
|
|
644
659
|
__name: "ActionBar",
|
|
645
|
-
props:
|
|
660
|
+
props: bn,
|
|
646
661
|
emits: ["click", "command"],
|
|
647
662
|
setup(a, { emit: t }) {
|
|
648
|
-
const e = a, o = h(() => (e.items || []).map((
|
|
649
|
-
...
|
|
650
|
-
badge:
|
|
663
|
+
const e = a, o = t, l = h(() => (e.items || []).map((r) => r === "|" ? r : {
|
|
664
|
+
...r,
|
|
665
|
+
badge: r.badge ? {
|
|
651
666
|
...e.badge,
|
|
652
|
-
...typeof
|
|
667
|
+
...typeof r.badge == "object" ? r.badge || {} : { value: r.badge }
|
|
653
668
|
} : void 0,
|
|
654
|
-
tooltip:
|
|
669
|
+
tooltip: r.tooltip ? {
|
|
655
670
|
...e.tooltip,
|
|
656
|
-
...typeof
|
|
671
|
+
...typeof r.tooltip == "object" ? r.tooltip || {} : { content: r.tooltip }
|
|
657
672
|
} : void 0
|
|
658
|
-
})), s = (
|
|
659
|
-
|
|
660
|
-
},
|
|
661
|
-
|
|
673
|
+
})), s = (r) => {
|
|
674
|
+
o("click", r);
|
|
675
|
+
}, c = (r, i) => {
|
|
676
|
+
o("command", r, i);
|
|
662
677
|
};
|
|
663
|
-
return (
|
|
678
|
+
return (r, i) => (u(), g(n($), {
|
|
664
679
|
class: "x-action-bar",
|
|
665
680
|
align: "center"
|
|
666
681
|
}, {
|
|
667
|
-
default:
|
|
668
|
-
(
|
|
669
|
-
|
|
682
|
+
default: f(() => [
|
|
683
|
+
(u(!0), E(Z, null, se(l.value, (m) => (u(), E(Z, null, [
|
|
684
|
+
m === "|" ? (u(), g(n(xe), {
|
|
670
685
|
key: 0,
|
|
671
686
|
direction: "vertical",
|
|
672
687
|
class: "x-action-bar__divider"
|
|
673
|
-
})) : (
|
|
688
|
+
})) : (u(), g(n(Y), j({
|
|
674
689
|
key: 1,
|
|
675
690
|
mode: e.mode,
|
|
676
691
|
size: e.size,
|
|
@@ -679,17 +694,17 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
679
694
|
background: e.background,
|
|
680
695
|
button: e.button,
|
|
681
696
|
dropdown: e.dropdown,
|
|
682
|
-
disabled: n(
|
|
683
|
-
},
|
|
697
|
+
disabled: n(Ze)(e.disabled, m).value
|
|
698
|
+
}, m, {
|
|
684
699
|
onClick: s,
|
|
685
|
-
onCommand: (
|
|
700
|
+
onCommand: (p) => c(m, p)
|
|
686
701
|
}), null, 16, ["mode", "size", "type", "circle", "background", "button", "dropdown", "disabled", "onCommand"]))
|
|
687
702
|
], 64))), 256))
|
|
688
703
|
]),
|
|
689
704
|
_: 1
|
|
690
705
|
}));
|
|
691
706
|
}
|
|
692
|
-
}),
|
|
707
|
+
}), _n = {
|
|
693
708
|
/**
|
|
694
709
|
* 组件渲染html标签
|
|
695
710
|
*/
|
|
@@ -797,18 +812,22 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
797
812
|
padding: {
|
|
798
813
|
type: Boolean,
|
|
799
814
|
default: !1
|
|
815
|
+
},
|
|
816
|
+
// 嵌套子组件加间隔
|
|
817
|
+
gap: {
|
|
818
|
+
type: Boolean
|
|
800
819
|
}
|
|
801
|
-
},
|
|
820
|
+
}, $ = /* @__PURE__ */ M({
|
|
802
821
|
name: "XContainer",
|
|
803
822
|
__name: "Container",
|
|
804
|
-
props:
|
|
823
|
+
props: _n,
|
|
805
824
|
setup(a) {
|
|
806
|
-
const t = a, e =
|
|
807
|
-
const
|
|
808
|
-
if (!
|
|
825
|
+
const t = a, e = Ue(), o = ve(), l = h(() => {
|
|
826
|
+
const r = o?.parent;
|
|
827
|
+
if (!r)
|
|
809
828
|
return !1;
|
|
810
|
-
const
|
|
811
|
-
return
|
|
829
|
+
const i = r.proxy;
|
|
830
|
+
return i.$options.name === "XContainer" || !!i.flex;
|
|
812
831
|
}), s = h(() => ({
|
|
813
832
|
"is-fit": t.fit,
|
|
814
833
|
"is-flex": t.flex && !t.inline,
|
|
@@ -818,29 +837,31 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
818
837
|
[`is-justify-${t.justify}`]: t.flex && t.justify !== "flex-start",
|
|
819
838
|
[`is-align-${t.align}`]: t.flex && t.align !== "flex-start",
|
|
820
839
|
[`is-align-content-${t.alignContent}`]: t.flex && t.alignContent !== "stretch",
|
|
821
|
-
"is-grow": t.grow ??
|
|
822
|
-
"is-shrink":
|
|
823
|
-
[`is-align-self-${t.alignSelf}`]:
|
|
840
|
+
"is-grow": t.grow ?? l.value,
|
|
841
|
+
"is-shrink": l.value && t.shrink,
|
|
842
|
+
[`is-align-self-${t.alignSelf}`]: l.value && t.alignSelf !== "auto",
|
|
824
843
|
[`is-overflow-${t.overflow}`]: !!t.overflow,
|
|
825
|
-
"is-padding": !!t.padding
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
844
|
+
"is-padding": !!t.padding,
|
|
845
|
+
"is-pointer": !!e.onClick,
|
|
846
|
+
"is-gap": !!t.gap
|
|
847
|
+
})), c = h(() => {
|
|
848
|
+
const { width: r, height: i, fit: m } = t;
|
|
849
|
+
return m ? null : {
|
|
850
|
+
width: r ? oe(r) : void 0,
|
|
851
|
+
height: i ? oe(i) : void 0
|
|
831
852
|
};
|
|
832
853
|
});
|
|
833
|
-
return (
|
|
834
|
-
class:
|
|
835
|
-
style:
|
|
854
|
+
return (r, i) => (u(), g(W(t.tag), {
|
|
855
|
+
class: Q(["x-container", s.value]),
|
|
856
|
+
style: ue(c.value)
|
|
836
857
|
}, {
|
|
837
|
-
default:
|
|
838
|
-
|
|
858
|
+
default: f(() => [
|
|
859
|
+
_(r.$slots, "default")
|
|
839
860
|
]),
|
|
840
861
|
_: 3
|
|
841
862
|
}, 8, ["class", "style"]));
|
|
842
863
|
}
|
|
843
|
-
}),
|
|
864
|
+
}), kn = {
|
|
844
865
|
size: {
|
|
845
866
|
type: String,
|
|
846
867
|
default: "default"
|
|
@@ -861,65 +882,65 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
861
882
|
more: {
|
|
862
883
|
type: Boolean
|
|
863
884
|
}
|
|
864
|
-
},
|
|
885
|
+
}, wn = {
|
|
865
886
|
key: 2,
|
|
866
887
|
class: "x-header__subtitle"
|
|
867
|
-
},
|
|
888
|
+
}, xn = {
|
|
868
889
|
key: 0,
|
|
869
890
|
class: "x-header__actions"
|
|
870
|
-
},
|
|
891
|
+
}, Et = /* @__PURE__ */ M({
|
|
871
892
|
name: "XHeader",
|
|
872
893
|
inheritAttrs: !1,
|
|
873
894
|
__name: "Header",
|
|
874
|
-
props:
|
|
895
|
+
props: kn,
|
|
875
896
|
setup(a) {
|
|
876
|
-
const t = a, e =
|
|
897
|
+
const t = a, e = Ue(), o = he(Be(t, "icon")), l = h(() => ({
|
|
877
898
|
[`is-size-${t.size}`]: !!t.size && t.size !== "default",
|
|
878
899
|
"is-border": t.border,
|
|
879
900
|
"is-pointer": !!e.onClick
|
|
880
901
|
}));
|
|
881
|
-
return (
|
|
882
|
-
class:
|
|
902
|
+
return (s, c) => (u(), g(n($), {
|
|
903
|
+
class: Q(["x-header", l.value]),
|
|
883
904
|
justify: "space-between",
|
|
884
905
|
align: "center"
|
|
885
906
|
}, {
|
|
886
|
-
default:
|
|
887
|
-
k(n(
|
|
907
|
+
default: f(() => [
|
|
908
|
+
k(n($), {
|
|
888
909
|
align: "center",
|
|
889
|
-
class:
|
|
910
|
+
class: Q(["x-header__wrapper", l.value]),
|
|
890
911
|
grow: ""
|
|
891
912
|
}, {
|
|
892
|
-
default:
|
|
893
|
-
n(o) ? (
|
|
913
|
+
default: f(() => [
|
|
914
|
+
n(o) ? (u(), g(W(n(o)), {
|
|
894
915
|
key: 0,
|
|
895
916
|
class: "x-header__icon"
|
|
896
|
-
})) :
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
N(
|
|
917
|
+
})) : y("", !0),
|
|
918
|
+
R("span", j({ class: "x-header__content" }, s.$attrs), [
|
|
919
|
+
_(s.$slots, "default", {}, () => [
|
|
920
|
+
N(F(t.content), 1)
|
|
900
921
|
])
|
|
901
922
|
], 16),
|
|
902
|
-
t.more ? (
|
|
923
|
+
t.more ? (u(), g(n(ae), {
|
|
903
924
|
key: 1,
|
|
904
925
|
class: "x-header__more",
|
|
905
|
-
icon: n(
|
|
906
|
-
}, null, 8, ["icon"])) :
|
|
907
|
-
t.subtitle ||
|
|
908
|
-
|
|
909
|
-
N(
|
|
926
|
+
icon: n(wo)
|
|
927
|
+
}, null, 8, ["icon"])) : y("", !0),
|
|
928
|
+
t.subtitle || s.$slots.subtitle ? (u(), E("span", wn, [
|
|
929
|
+
_(s.$slots, "subtitle", {}, () => [
|
|
930
|
+
N(F(t.subtitle), 1)
|
|
910
931
|
])
|
|
911
|
-
])) :
|
|
932
|
+
])) : y("", !0)
|
|
912
933
|
]),
|
|
913
934
|
_: 3
|
|
914
935
|
}, 8, ["class"]),
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
])) :
|
|
936
|
+
s.$slots.actions ? (u(), E("div", xn, [
|
|
937
|
+
_(s.$slots, "actions")
|
|
938
|
+
])) : y("", !0)
|
|
918
939
|
]),
|
|
919
940
|
_: 3
|
|
920
941
|
}, 8, ["class"]));
|
|
921
942
|
}
|
|
922
|
-
}),
|
|
943
|
+
}), Sn = {
|
|
923
944
|
/**
|
|
924
945
|
* 宽高自适应
|
|
925
946
|
*/
|
|
@@ -991,88 +1012,88 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
991
1012
|
footer: {
|
|
992
1013
|
type: Object
|
|
993
1014
|
}
|
|
994
|
-
},
|
|
1015
|
+
}, Mt = /* @__PURE__ */ M({
|
|
995
1016
|
name: "XPanel",
|
|
996
1017
|
__name: "Panel",
|
|
997
|
-
props:
|
|
1018
|
+
props: Sn,
|
|
998
1019
|
setup(a, { expose: t }) {
|
|
999
|
-
const e = a, o =
|
|
1020
|
+
const e = a, o = D(), l = h(() => ({
|
|
1000
1021
|
"x-panel--card": !!e.card,
|
|
1001
1022
|
"x-panel--default": !e.card,
|
|
1002
1023
|
[`is-${e.size}`]: !!e.size && e.size !== "default",
|
|
1003
1024
|
"is-border": !!e.border,
|
|
1004
1025
|
"is-radius": !!e.radius,
|
|
1005
1026
|
[`is-shadow-${e.shadow}`]: !!e.shadow && e.shadow !== "none"
|
|
1006
|
-
})),
|
|
1027
|
+
})), s = h(() => e.header === null ? null : typeof e.header == "string" ? {
|
|
1007
1028
|
content: e.header,
|
|
1008
1029
|
size: e.size
|
|
1009
1030
|
} : {
|
|
1010
1031
|
...e.header,
|
|
1011
1032
|
size: e.size
|
|
1012
|
-
}),
|
|
1033
|
+
}), c = h(() => e.fit || e.height ? "auto" : void 0);
|
|
1013
1034
|
return t({
|
|
1014
1035
|
bodyRef: o
|
|
1015
|
-
}), (
|
|
1016
|
-
class:
|
|
1036
|
+
}), (r, i) => (u(), g(n($), {
|
|
1037
|
+
class: Q(["x-panel", l.value]),
|
|
1017
1038
|
direction: "column",
|
|
1018
1039
|
fit: e.fit,
|
|
1019
1040
|
width: e.width,
|
|
1020
1041
|
height: e.height
|
|
1021
1042
|
}, {
|
|
1022
|
-
default:
|
|
1023
|
-
|
|
1043
|
+
default: f(() => [
|
|
1044
|
+
s.value ? (u(), g(n($), {
|
|
1024
1045
|
key: 0,
|
|
1025
1046
|
flex: !1,
|
|
1026
1047
|
class: "x-panel__header"
|
|
1027
1048
|
}, {
|
|
1028
|
-
default:
|
|
1029
|
-
|
|
1030
|
-
k(n(
|
|
1031
|
-
default:
|
|
1032
|
-
|
|
1049
|
+
default: f(() => [
|
|
1050
|
+
_(r.$slots, "header", {}, () => [
|
|
1051
|
+
k(n(Et), ce(ge(s.value)), {
|
|
1052
|
+
default: f(() => [
|
|
1053
|
+
_(r.$slots, "title")
|
|
1033
1054
|
]),
|
|
1034
|
-
actions:
|
|
1035
|
-
|
|
1055
|
+
actions: f(() => [
|
|
1056
|
+
_(r.$slots, "actions")
|
|
1036
1057
|
]),
|
|
1037
1058
|
_: 3
|
|
1038
1059
|
}, 16)
|
|
1039
1060
|
])
|
|
1040
1061
|
]),
|
|
1041
1062
|
_: 3
|
|
1042
|
-
})) :
|
|
1043
|
-
k(n(
|
|
1063
|
+
})) : y("", !0),
|
|
1064
|
+
k(n($), j({
|
|
1044
1065
|
ref_key: "bodyRef",
|
|
1045
1066
|
ref: o,
|
|
1046
1067
|
flex: !1,
|
|
1047
|
-
overflow:
|
|
1068
|
+
overflow: c.value,
|
|
1048
1069
|
grow: "",
|
|
1049
1070
|
padding: "",
|
|
1050
1071
|
class: "x-panel__body"
|
|
1051
1072
|
}, e.body), {
|
|
1052
|
-
default:
|
|
1053
|
-
|
|
1073
|
+
default: f(() => [
|
|
1074
|
+
_(r.$slots, "default")
|
|
1054
1075
|
]),
|
|
1055
1076
|
_: 3
|
|
1056
1077
|
}, 16, ["overflow"]),
|
|
1057
|
-
|
|
1078
|
+
r.$slots.footer ? (u(), g(n($), j({
|
|
1058
1079
|
key: 1,
|
|
1059
1080
|
flex: !1,
|
|
1060
1081
|
padding: "",
|
|
1061
1082
|
class: "x-panel__footer"
|
|
1062
1083
|
}, e.footer), {
|
|
1063
|
-
default:
|
|
1064
|
-
|
|
1084
|
+
default: f(() => [
|
|
1085
|
+
_(r.$slots, "footer")
|
|
1065
1086
|
]),
|
|
1066
1087
|
_: 3
|
|
1067
|
-
}, 16)) :
|
|
1088
|
+
}, 16)) : y("", !0)
|
|
1068
1089
|
]),
|
|
1069
1090
|
_: 3
|
|
1070
1091
|
}, 8, ["class", "fit", "width", "height"]));
|
|
1071
1092
|
}
|
|
1072
|
-
}),
|
|
1073
|
-
class
|
|
1093
|
+
}), st = "user-select-none";
|
|
1094
|
+
class lt {
|
|
1074
1095
|
constructor(t, e = {}) {
|
|
1075
|
-
this.el = t, this.options = e, this.scope =
|
|
1096
|
+
this.el = t, this.options = e, this.scope = ct(), this.scope.run(() => {
|
|
1076
1097
|
this.init();
|
|
1077
1098
|
});
|
|
1078
1099
|
}
|
|
@@ -1087,158 +1108,158 @@ class ot {
|
|
|
1087
1108
|
return typeof t == "string" ? document.querySelector(t) : n(t) || document.body;
|
|
1088
1109
|
}
|
|
1089
1110
|
init() {
|
|
1090
|
-
const { el: t, options: e } = this, { disabled: o, delay:
|
|
1111
|
+
const { el: t, options: e } = this, { disabled: o, delay: l = 150, onStart: s, onEnd: c } = e;
|
|
1091
1112
|
if (o)
|
|
1092
1113
|
return;
|
|
1093
|
-
let
|
|
1094
|
-
const
|
|
1095
|
-
let
|
|
1096
|
-
const { x:
|
|
1097
|
-
initialValue: { x:
|
|
1114
|
+
let r = null;
|
|
1115
|
+
const i = this.getHandle(), m = this.getTarget();
|
|
1116
|
+
let p = t.getBoundingClientRect(), d = null;
|
|
1117
|
+
const { x: b, y: S } = Fo(t, {
|
|
1118
|
+
initialValue: { x: p.x, y: p.y },
|
|
1098
1119
|
...e,
|
|
1099
|
-
handle:
|
|
1100
|
-
onStart: (w,
|
|
1101
|
-
document.body.classList.add(
|
|
1102
|
-
this.dragging = !0,
|
|
1103
|
-
},
|
|
1120
|
+
handle: i,
|
|
1121
|
+
onStart: (w, V) => {
|
|
1122
|
+
document.body.classList.add(st), clearTimeout(r), r = setTimeout(() => {
|
|
1123
|
+
this.dragging = !0, p = t.getBoundingClientRect(), d = m?.getBoundingClientRect(), s && s(w, V);
|
|
1124
|
+
}, l);
|
|
1104
1125
|
},
|
|
1105
|
-
onEnd: (w,
|
|
1106
|
-
if (clearTimeout(
|
|
1126
|
+
onEnd: (w, V) => {
|
|
1127
|
+
if (clearTimeout(r), document.body.classList.remove(st), this.dragging && d) {
|
|
1107
1128
|
this.dragging = !1;
|
|
1108
|
-
const { x
|
|
1109
|
-
|
|
1129
|
+
const { x, y: T } = w, v = this.getPosition(d, p, x, T);
|
|
1130
|
+
c && c(v, V), d = null;
|
|
1110
1131
|
}
|
|
1111
1132
|
}
|
|
1112
1133
|
});
|
|
1113
|
-
|
|
1114
|
-
if (this.dragging &&
|
|
1115
|
-
const w = this.getPosition(
|
|
1134
|
+
L([b, S], () => {
|
|
1135
|
+
if (this.dragging && d) {
|
|
1136
|
+
const w = this.getPosition(d, p, b.value, S.value);
|
|
1116
1137
|
t.style.left = `${w.x}px`, t.style.top = `${w.y}px`;
|
|
1117
1138
|
}
|
|
1118
1139
|
});
|
|
1119
1140
|
}
|
|
1120
|
-
getPosition(t, e, o,
|
|
1121
|
-
const { edge:
|
|
1141
|
+
getPosition(t, e, o, l) {
|
|
1142
|
+
const { edge: s = 50 } = this.options, c = -e.width + s, r = t.width - s, i = 0, m = t.height - s, p = Math.min(r, Math.max(o, c)), d = Math.min(m, Math.max(l, i));
|
|
1122
1143
|
return {
|
|
1123
|
-
x:
|
|
1124
|
-
y:
|
|
1144
|
+
x: p,
|
|
1145
|
+
y: d
|
|
1125
1146
|
};
|
|
1126
1147
|
}
|
|
1127
1148
|
destory() {
|
|
1128
1149
|
this.scope.stop();
|
|
1129
1150
|
}
|
|
1130
1151
|
}
|
|
1131
|
-
const
|
|
1152
|
+
const zn = {
|
|
1132
1153
|
mounted(a, t) {
|
|
1133
|
-
const e = t.value || {}, o = new
|
|
1154
|
+
const e = t.value || {}, o = new lt(a, e);
|
|
1134
1155
|
a.__draggable__ = o;
|
|
1135
1156
|
},
|
|
1136
1157
|
updated(a, t) {
|
|
1137
1158
|
const e = t.value || {};
|
|
1138
1159
|
let o = a.__draggable__;
|
|
1139
|
-
o && !
|
|
1160
|
+
o && !Ke(o.options, e) && (o.destory(), a.__draggable__ = new lt(a, e));
|
|
1140
1161
|
},
|
|
1141
1162
|
unmounted(a) {
|
|
1142
1163
|
const t = a.__draggable__;
|
|
1143
1164
|
t && (t.destory(), a.__draggable__ = null);
|
|
1144
1165
|
}
|
|
1145
|
-
},
|
|
1146
|
-
class
|
|
1166
|
+
}, Fe = "user-select-none";
|
|
1167
|
+
class it {
|
|
1147
1168
|
constructor(t, e = {}) {
|
|
1148
|
-
this.el = t, this.options = e, this.scope =
|
|
1169
|
+
this.el = t, this.options = e, this.scope = ct(), this.scope.run(() => {
|
|
1149
1170
|
this.init();
|
|
1150
1171
|
});
|
|
1151
1172
|
}
|
|
1152
1173
|
scope;
|
|
1153
|
-
resizing =
|
|
1154
|
-
direction =
|
|
1174
|
+
resizing = D(!1);
|
|
1175
|
+
direction = D("");
|
|
1155
1176
|
MIE = null;
|
|
1156
1177
|
cleanMousedown;
|
|
1157
1178
|
cleanMouseup;
|
|
1158
1179
|
init() {
|
|
1159
|
-
const { el: t, options: e } = this, { disabled: o, onStart:
|
|
1180
|
+
const { el: t, options: e } = this, { disabled: o, onStart: l, onEnd: s } = e;
|
|
1160
1181
|
if (o)
|
|
1161
1182
|
return;
|
|
1162
|
-
this.MIE =
|
|
1163
|
-
this.direction?.value && this.MIE && (this.resizing.value = !0, t.classList.add("is-resizing", `is-${this.direction.value}-resizing`),
|
|
1164
|
-
}), this.cleanMouseup =
|
|
1183
|
+
this.MIE = Oo(t), this.cleanMousedown = Ie(document, "mousedown", () => {
|
|
1184
|
+
this.direction?.value && this.MIE && (this.resizing.value = !0, t.classList.add("is-resizing", `is-${this.direction.value}-resizing`), l && l(this.direction.value, this.MIE));
|
|
1185
|
+
}), this.cleanMouseup = Ie(document, "mouseup", () => {
|
|
1165
1186
|
this.resizing.value && this.direction?.value && this.MIE && (t.classList.remove(
|
|
1166
1187
|
"is-resizing",
|
|
1167
1188
|
`is-${this.direction.value}-resizing`
|
|
1168
|
-
),
|
|
1169
|
-
}),
|
|
1170
|
-
const
|
|
1171
|
-
|
|
1189
|
+
), s && s(this.direction.value, this.MIE)), this.resizing.value = !1;
|
|
1190
|
+
}), L(this.direction, (i) => {
|
|
1191
|
+
const m = document.body;
|
|
1192
|
+
m.style.cursor = i ? `${i}-resize` : "", i ? m.classList.add(Fe) : m.classList.remove(Fe);
|
|
1172
1193
|
});
|
|
1173
|
-
const { x:
|
|
1174
|
-
|
|
1194
|
+
const { x: c, y: r } = this.MIE;
|
|
1195
|
+
L([c, r], () => {
|
|
1175
1196
|
this.resizing.value ? this.resize() : this.direction.value = this.getDirection();
|
|
1176
1197
|
});
|
|
1177
1198
|
}
|
|
1178
1199
|
resize() {
|
|
1179
|
-
const { MIE: t, direction: e, resizing: o, options:
|
|
1180
|
-
if (!t || !o.value || !
|
|
1200
|
+
const { MIE: t, direction: e, resizing: o, options: l, el: s } = this, c = e?.value || "";
|
|
1201
|
+
if (!t || !o.value || !c)
|
|
1181
1202
|
return;
|
|
1182
|
-
const { x:
|
|
1203
|
+
const { x: r, y: i, elementX: m, elementY: p, elementHeight: d, elementWidth: b } = t, { onResizing: S } = l, {
|
|
1183
1204
|
minWidth: w = 0,
|
|
1184
|
-
minHeight:
|
|
1185
|
-
maxWidth:
|
|
1186
|
-
maxHeight:
|
|
1187
|
-
} =
|
|
1188
|
-
if (
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1205
|
+
minHeight: V = 0,
|
|
1206
|
+
maxWidth: x = 99999,
|
|
1207
|
+
maxHeight: T = 99999
|
|
1208
|
+
} = l;
|
|
1209
|
+
if (c.includes("e")) {
|
|
1210
|
+
const v = Math.min(Math.max(m.value, w), x);
|
|
1211
|
+
s.style.width = `${v}px`;
|
|
1191
1212
|
}
|
|
1192
|
-
if (
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1213
|
+
if (c.includes("s")) {
|
|
1214
|
+
const v = Math.min(Math.max(p.value, V), T);
|
|
1215
|
+
s.style.height = `${v}px`;
|
|
1195
1216
|
}
|
|
1196
|
-
if (
|
|
1197
|
-
const
|
|
1198
|
-
Math.max(
|
|
1199
|
-
|
|
1217
|
+
if (c.includes("w")) {
|
|
1218
|
+
const v = Math.min(
|
|
1219
|
+
Math.max(b.value - m.value, w),
|
|
1220
|
+
x
|
|
1200
1221
|
);
|
|
1201
|
-
|
|
1222
|
+
s.style.width = `${v}px`, s.style.left = `${r.value}px`;
|
|
1202
1223
|
}
|
|
1203
|
-
if (
|
|
1204
|
-
const
|
|
1205
|
-
Math.max(
|
|
1206
|
-
|
|
1224
|
+
if (c.includes("n")) {
|
|
1225
|
+
const v = Math.min(
|
|
1226
|
+
Math.max(d.value - p.value, V),
|
|
1227
|
+
T
|
|
1207
1228
|
);
|
|
1208
|
-
this.el.style.height = `${
|
|
1229
|
+
this.el.style.height = `${v}px`, this.el.style.top = `${i.value}px`;
|
|
1209
1230
|
}
|
|
1210
|
-
|
|
1231
|
+
S && S(c, t);
|
|
1211
1232
|
}
|
|
1212
1233
|
getDirection() {
|
|
1213
1234
|
if (!this.MIE)
|
|
1214
1235
|
return "";
|
|
1215
|
-
const { elementX: t, elementY: e, elementHeight: o, elementWidth:
|
|
1216
|
-
if (
|
|
1236
|
+
const { elementX: t, elementY: e, elementHeight: o, elementWidth: l, isOutside: s } = this.MIE;
|
|
1237
|
+
if (s.value)
|
|
1217
1238
|
return "";
|
|
1218
|
-
const { dirs:
|
|
1219
|
-
let
|
|
1220
|
-
return
|
|
1239
|
+
const { dirs: c = ["n", "s", "w", "e"], edge: r = 5 } = this.options;
|
|
1240
|
+
let i = "";
|
|
1241
|
+
return c.includes("n") && e.value <= r ? i += "n" : c.includes("s") && e.value > o.value - r && (i += "s"), c.includes("w") && t.value <= r ? i += "w" : c.includes("e") && t.value > l.value - r && (i += "e"), i;
|
|
1221
1242
|
}
|
|
1222
1243
|
destory() {
|
|
1223
1244
|
const t = document.body;
|
|
1224
|
-
t.style.cursor = "", t.classList.remove(
|
|
1245
|
+
t.style.cursor = "", t.classList.remove(Fe), this.cleanMousedown && this.cleanMousedown(), this.cleanMouseup && this.cleanMouseup(), this.MIE?.stop(), this.scope.stop();
|
|
1225
1246
|
}
|
|
1226
1247
|
}
|
|
1227
|
-
const
|
|
1248
|
+
const $t = {
|
|
1228
1249
|
mounted(a, t) {
|
|
1229
|
-
const e = t.value || {}, o = new
|
|
1250
|
+
const e = t.value || {}, o = new it(a, e);
|
|
1230
1251
|
a.__resizable__ = o;
|
|
1231
1252
|
},
|
|
1232
1253
|
updated(a, t) {
|
|
1233
1254
|
const e = t.value || {};
|
|
1234
1255
|
let o = a.__resizable__;
|
|
1235
|
-
o && !
|
|
1256
|
+
o && !Ke(o.options, e) && (o.destory(), a.__resizable__ = new it(a, e));
|
|
1236
1257
|
},
|
|
1237
1258
|
unmounted(a) {
|
|
1238
1259
|
const t = a.__resizable__;
|
|
1239
1260
|
t && (t.destory(), a.__resizable__ = null);
|
|
1240
1261
|
}
|
|
1241
|
-
},
|
|
1262
|
+
}, Cn = {
|
|
1242
1263
|
modelValue: {
|
|
1243
1264
|
type: Boolean,
|
|
1244
1265
|
default: !0
|
|
@@ -1323,9 +1344,9 @@ const St = {
|
|
|
1323
1344
|
type: Boolean
|
|
1324
1345
|
}
|
|
1325
1346
|
};
|
|
1326
|
-
let
|
|
1327
|
-
function
|
|
1328
|
-
const { width: e, height: o } =
|
|
1347
|
+
let fe = 1e3;
|
|
1348
|
+
function Tn(a, t) {
|
|
1349
|
+
const { width: e, height: o } = wt(t), l = He({
|
|
1329
1350
|
mode: a.mode || "normal",
|
|
1330
1351
|
wrapperWidth: 0,
|
|
1331
1352
|
wrapperHeight: 0,
|
|
@@ -1333,274 +1354,274 @@ function _n(a, t) {
|
|
|
1333
1354
|
height: 0,
|
|
1334
1355
|
top: 0,
|
|
1335
1356
|
left: 0,
|
|
1336
|
-
zIndex: ++
|
|
1357
|
+
zIndex: ++fe,
|
|
1337
1358
|
dragging: !1,
|
|
1338
1359
|
resizing: !1
|
|
1339
1360
|
});
|
|
1340
|
-
return
|
|
1341
|
-
|
|
1342
|
-
}),
|
|
1343
|
-
|
|
1361
|
+
return L([e, o], ([s, c]) => {
|
|
1362
|
+
l.wrapperWidth = s, l.wrapperHeight = c, l.width = Te(a.width, s), l.height = Te(a.height, c), l.left = a.left ? Te(a.left, s) - l.width / 2 : Math.max(Math.floor((s - l.width) / 2), 0), l.top = a.top ? Te(a.top, c) : Math.max(Math.floor((c - l.height) / 2), 0);
|
|
1363
|
+
}), L(l, (s) => {
|
|
1364
|
+
fe = Math.max(s.zIndex, fe);
|
|
1344
1365
|
}), {
|
|
1345
|
-
state:
|
|
1346
|
-
normal: h(() =>
|
|
1347
|
-
maximized: h(() =>
|
|
1348
|
-
minimized: h(() =>
|
|
1366
|
+
state: l,
|
|
1367
|
+
normal: h(() => l.mode === "normal"),
|
|
1368
|
+
maximized: h(() => l.mode === "maximized"),
|
|
1369
|
+
minimized: h(() => l.mode === "minimized")
|
|
1349
1370
|
};
|
|
1350
1371
|
}
|
|
1351
|
-
function
|
|
1372
|
+
function En(a, t) {
|
|
1352
1373
|
const e = h(() => {
|
|
1353
|
-
const { width:
|
|
1374
|
+
const { width: c, height: r, top: i, left: m, zIndex: p } = t;
|
|
1354
1375
|
return {
|
|
1355
|
-
width: `${
|
|
1356
|
-
height: `${
|
|
1357
|
-
top: `${
|
|
1358
|
-
left: `${
|
|
1359
|
-
zIndex:
|
|
1376
|
+
width: `${c}px`,
|
|
1377
|
+
height: `${r}px`,
|
|
1378
|
+
top: `${i}px`,
|
|
1379
|
+
left: `${m}px`,
|
|
1380
|
+
zIndex: p
|
|
1360
1381
|
};
|
|
1361
1382
|
}), o = h(() => ({
|
|
1362
1383
|
[`is-${t.mode}`]: !!t.mode,
|
|
1363
1384
|
"is-draggable": !!a.draggable,
|
|
1364
1385
|
"is-resizable": !!a.resizable,
|
|
1365
1386
|
"is-primary": !!a.primary
|
|
1366
|
-
})),
|
|
1387
|
+
})), l = h(() => ({
|
|
1367
1388
|
[`is-${t.mode}`]: !!t.mode,
|
|
1368
1389
|
"is-dragging": t.dragging,
|
|
1369
1390
|
"is-resizing": t.resizing
|
|
1370
|
-
})),
|
|
1391
|
+
})), s = h(() => ({
|
|
1371
1392
|
zIndex: t.zIndex
|
|
1372
1393
|
}));
|
|
1373
1394
|
return {
|
|
1374
1395
|
styles: e,
|
|
1375
1396
|
classes: o,
|
|
1376
|
-
wrapperClass:
|
|
1377
|
-
modalStyle:
|
|
1397
|
+
wrapperClass: l,
|
|
1398
|
+
modalStyle: s
|
|
1378
1399
|
};
|
|
1379
1400
|
}
|
|
1380
|
-
function
|
|
1381
|
-
const o = (
|
|
1382
|
-
t.mode =
|
|
1383
|
-
},
|
|
1401
|
+
function Mn(a, t, e) {
|
|
1402
|
+
const o = (p) => {
|
|
1403
|
+
t.mode = p, ["maximized", "minimized", "normal"].includes(p) && e(p), e("modeChange", p);
|
|
1404
|
+
}, l = async () => {
|
|
1384
1405
|
(!a.beforeClose || await a.beforeClose()) && (e("update:modelValue", !1), e("close"), e("destroy"));
|
|
1385
1406
|
};
|
|
1386
1407
|
return {
|
|
1387
|
-
close:
|
|
1408
|
+
close: l,
|
|
1388
1409
|
changeMode: o,
|
|
1389
1410
|
show: () => o("normal"),
|
|
1390
1411
|
hide: () => o("minimized"),
|
|
1391
1412
|
active: () => {
|
|
1392
|
-
t.zIndex = Math.max(t.zIndex, ++
|
|
1413
|
+
t.zIndex = Math.max(t.zIndex, ++fe);
|
|
1393
1414
|
},
|
|
1394
1415
|
submit: () => e("submit"),
|
|
1395
1416
|
cancel: () => {
|
|
1396
|
-
e("cancel"),
|
|
1417
|
+
e("cancel"), l();
|
|
1397
1418
|
}
|
|
1398
1419
|
};
|
|
1399
1420
|
}
|
|
1400
|
-
function
|
|
1421
|
+
function $n(a, t, e, o) {
|
|
1401
1422
|
return h(() => {
|
|
1402
|
-
const
|
|
1423
|
+
const l = typeof a.draggable == "boolean" ? !a.draggable : !!a.draggable?.disabled;
|
|
1403
1424
|
return {
|
|
1404
|
-
...
|
|
1405
|
-
disabled:
|
|
1425
|
+
...Qe(a.draggable) ? a.draggable : {},
|
|
1426
|
+
disabled: l,
|
|
1406
1427
|
target: o,
|
|
1407
1428
|
selector: ".x-panel__header",
|
|
1408
|
-
onStart(
|
|
1409
|
-
t.dragging = !0, t.zIndex = Math.max(t.zIndex, ++
|
|
1429
|
+
onStart(s) {
|
|
1430
|
+
t.dragging = !0, t.zIndex = Math.max(t.zIndex, ++fe), e("dragStart", s);
|
|
1410
1431
|
},
|
|
1411
|
-
onMove(
|
|
1412
|
-
e("dragging",
|
|
1432
|
+
onMove(s) {
|
|
1433
|
+
e("dragging", s);
|
|
1413
1434
|
},
|
|
1414
|
-
onEnd(
|
|
1435
|
+
onEnd(s) {
|
|
1415
1436
|
if (t.mode === "maximized")
|
|
1416
1437
|
return;
|
|
1417
|
-
const { x:
|
|
1418
|
-
t.left =
|
|
1438
|
+
const { x: c, y: r } = s;
|
|
1439
|
+
t.left = c, t.top = r, t.dragging = !1, e("dragEnd", s);
|
|
1419
1440
|
}
|
|
1420
1441
|
};
|
|
1421
1442
|
});
|
|
1422
1443
|
}
|
|
1423
|
-
function
|
|
1444
|
+
function Bn(a, t, e) {
|
|
1424
1445
|
return h(() => {
|
|
1425
1446
|
const o = typeof a.resizable == "boolean" ? !a.resizable : !!a.resizable?.disabled;
|
|
1426
1447
|
return {
|
|
1427
1448
|
minWidth: 200,
|
|
1428
1449
|
minHeight: 150,
|
|
1429
|
-
...
|
|
1450
|
+
...Qe(a.resizable) ? a.resizable : {},
|
|
1430
1451
|
disabled: o,
|
|
1431
1452
|
dirs: ["e", "s", "w"],
|
|
1432
|
-
onStart(
|
|
1433
|
-
t.resizing = !0, t.zIndex = Math.max(t.zIndex, ++
|
|
1453
|
+
onStart(l, s) {
|
|
1454
|
+
t.resizing = !0, t.zIndex = Math.max(t.zIndex, ++fe), e("resizeStart", l, s);
|
|
1434
1455
|
},
|
|
1435
|
-
onResizing(
|
|
1436
|
-
e("resizing",
|
|
1456
|
+
onResizing(l, s) {
|
|
1457
|
+
e("resizing", l, s);
|
|
1437
1458
|
},
|
|
1438
|
-
onEnd(
|
|
1439
|
-
t.left =
|
|
1459
|
+
onEnd(l, s) {
|
|
1460
|
+
t.left = s.elementPositionX.value, t.top = s.elementPositionY.value, t.width = s.elementWidth.value, t.height = s.elementHeight.value, t.resizing = !1, e("resizeEnd", l, s);
|
|
1440
1461
|
}
|
|
1441
1462
|
};
|
|
1442
1463
|
});
|
|
1443
1464
|
}
|
|
1444
|
-
function
|
|
1465
|
+
function In(a, t) {
|
|
1445
1466
|
const e = a.componentInstance;
|
|
1446
1467
|
if (!e)
|
|
1447
1468
|
return;
|
|
1448
1469
|
let o = null;
|
|
1449
|
-
return
|
|
1450
|
-
const
|
|
1451
|
-
o = e.$el,
|
|
1452
|
-
}),
|
|
1470
|
+
return ut(() => {
|
|
1471
|
+
const l = n(t), s = n(l?.bodyRef);
|
|
1472
|
+
o = e.$el, s && s.$el && s.$el.appendChild(o);
|
|
1473
|
+
}), dt(() => {
|
|
1453
1474
|
o && o.parentNode && o.parentNode.removeChild(o);
|
|
1454
1475
|
}), {
|
|
1455
1476
|
componentInstance: e
|
|
1456
1477
|
};
|
|
1457
1478
|
}
|
|
1458
|
-
const
|
|
1479
|
+
const An = ["src"], Je = /* @__PURE__ */ M({
|
|
1459
1480
|
name: "XDialog",
|
|
1460
1481
|
__name: "Dialog",
|
|
1461
|
-
props:
|
|
1482
|
+
props: Cn,
|
|
1462
1483
|
emits: ["update:modelValue", "open", "close", "destroy", "maximized", "minimized", "normal", "modeChange", "dragStart", "dragging", "dragEnd", "resizeStart", "resizeEnd", "resizing", "submit", "cancel"],
|
|
1463
1484
|
setup(a, { expose: t, emit: e }) {
|
|
1464
|
-
const o = a, s =
|
|
1485
|
+
const o = a, l = e, s = ve(), c = D(), r = D(), { state: i, maximized: m, minimized: p, normal: d } = Tn(o, c), { styles: b, classes: S, wrapperClass: w, modalStyle: V } = En(o, i), { changeMode: x, active: T, close: v, show: I, hide: A, submit: U, cancel: z } = Mn(
|
|
1465
1486
|
o,
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
),
|
|
1469
|
-
|
|
1470
|
-
o.modelValue && (await
|
|
1487
|
+
i,
|
|
1488
|
+
l
|
|
1489
|
+
), H = $n(o, i, l, c), X = Bn(o, i, l), le = In(o, r);
|
|
1490
|
+
pt(async () => {
|
|
1491
|
+
o.modelValue && (await me(), s && l("open", s));
|
|
1471
1492
|
});
|
|
1472
|
-
const
|
|
1493
|
+
const _e = h(() => r.value?.$el);
|
|
1473
1494
|
return t({
|
|
1474
|
-
$vtjEl:
|
|
1475
|
-
panelRef:
|
|
1476
|
-
state:
|
|
1477
|
-
maximized:
|
|
1478
|
-
minimized:
|
|
1479
|
-
changeMode:
|
|
1480
|
-
show:
|
|
1481
|
-
hide:
|
|
1482
|
-
submit:
|
|
1483
|
-
cancel:
|
|
1484
|
-
componentInstance:
|
|
1485
|
-
}), (
|
|
1495
|
+
$vtjEl: _e,
|
|
1496
|
+
panelRef: r,
|
|
1497
|
+
state: i,
|
|
1498
|
+
maximized: m,
|
|
1499
|
+
minimized: p,
|
|
1500
|
+
changeMode: x,
|
|
1501
|
+
show: I,
|
|
1502
|
+
hide: A,
|
|
1503
|
+
submit: U,
|
|
1504
|
+
cancel: z,
|
|
1505
|
+
componentInstance: le
|
|
1506
|
+
}), (K, G) => o.modelValue ? (u(), g(mt, {
|
|
1486
1507
|
key: 0,
|
|
1487
1508
|
to: "body"
|
|
1488
1509
|
}, [
|
|
1489
|
-
|
|
1510
|
+
R("div", {
|
|
1490
1511
|
ref_key: "wrapper",
|
|
1491
|
-
ref:
|
|
1492
|
-
class:
|
|
1512
|
+
ref: c,
|
|
1513
|
+
class: Q(["x-dialog__wrapper", n(w)])
|
|
1493
1514
|
}, [
|
|
1494
|
-
o.modal ? (
|
|
1515
|
+
o.modal ? (u(), E("div", {
|
|
1495
1516
|
key: 0,
|
|
1496
1517
|
class: "x-dialog__modal",
|
|
1497
|
-
style:
|
|
1498
|
-
}, null, 4)) :
|
|
1499
|
-
|
|
1518
|
+
style: ue(n(V))
|
|
1519
|
+
}, null, 4)) : y("", !0),
|
|
1520
|
+
J((u(), g(n(Mt), {
|
|
1500
1521
|
ref_key: "panelRef",
|
|
1501
|
-
ref:
|
|
1502
|
-
class:
|
|
1522
|
+
ref: r,
|
|
1523
|
+
class: Q(["x-dialog", n(S)]),
|
|
1503
1524
|
card: "",
|
|
1504
1525
|
shadow: "always",
|
|
1505
1526
|
header: { icon: o.icon, subtitle: o.subtitle },
|
|
1506
1527
|
width: "800px",
|
|
1507
1528
|
height: "600px",
|
|
1508
1529
|
footer: { justify: "space-between", flex: !0, align: "center" },
|
|
1509
|
-
style:
|
|
1530
|
+
style: ue(n(b)),
|
|
1510
1531
|
size: o.size,
|
|
1511
1532
|
body: { padding: o.bodyPadding },
|
|
1512
1533
|
onClick: n(T)
|
|
1513
1534
|
}, ye({
|
|
1514
|
-
title:
|
|
1515
|
-
N(
|
|
1535
|
+
title: f(() => [
|
|
1536
|
+
N(F(o.title), 1)
|
|
1516
1537
|
]),
|
|
1517
|
-
actions:
|
|
1518
|
-
|
|
1519
|
-
o.minimizable ? (
|
|
1538
|
+
actions: f(() => [
|
|
1539
|
+
_(K.$slots, "actions"),
|
|
1540
|
+
o.minimizable ? (u(), g(n(Y), {
|
|
1520
1541
|
key: 0,
|
|
1521
|
-
icon: n(
|
|
1542
|
+
icon: n(Vo),
|
|
1522
1543
|
size: o.size,
|
|
1523
1544
|
mode: "icon",
|
|
1524
1545
|
type: "primary",
|
|
1525
1546
|
background: "hover",
|
|
1526
|
-
onClick:
|
|
1527
|
-
}, null, 8, ["icon", "size"])) :
|
|
1528
|
-
o.maximizable ? (
|
|
1529
|
-
n(
|
|
1547
|
+
onClick: G[0] || (G[0] = (ie) => n(x)("minimized"))
|
|
1548
|
+
}, null, 8, ["icon", "size"])) : y("", !0),
|
|
1549
|
+
o.maximizable ? (u(), E(Z, { key: 1 }, [
|
|
1550
|
+
n(d) ? (u(), g(n(Y), {
|
|
1530
1551
|
key: 1,
|
|
1531
|
-
icon: n(
|
|
1552
|
+
icon: n(Do),
|
|
1532
1553
|
size: o.size,
|
|
1533
1554
|
mode: "icon",
|
|
1534
1555
|
type: "primary",
|
|
1535
1556
|
background: "hover",
|
|
1536
|
-
onClick:
|
|
1537
|
-
}, null, 8, ["icon", "size"])) : (
|
|
1557
|
+
onClick: G[2] || (G[2] = (ie) => n(x)("maximized"))
|
|
1558
|
+
}, null, 8, ["icon", "size"])) : (u(), g(n(Y), {
|
|
1538
1559
|
key: 0,
|
|
1539
|
-
icon: n(
|
|
1560
|
+
icon: n(Po),
|
|
1540
1561
|
size: o.size,
|
|
1541
1562
|
mode: "icon",
|
|
1542
1563
|
type: "primary",
|
|
1543
1564
|
background: "hover",
|
|
1544
|
-
onClick:
|
|
1565
|
+
onClick: G[1] || (G[1] = (ie) => n(x)("normal"))
|
|
1545
1566
|
}, null, 8, ["icon", "size"]))
|
|
1546
|
-
], 64)) :
|
|
1547
|
-
o.closable ? (
|
|
1567
|
+
], 64)) : y("", !0),
|
|
1568
|
+
o.closable ? (u(), g(n(Y), {
|
|
1548
1569
|
key: 2,
|
|
1549
|
-
icon: n(
|
|
1570
|
+
icon: n(Ro),
|
|
1550
1571
|
size: o.size,
|
|
1551
1572
|
mode: "icon",
|
|
1552
1573
|
type: "danger",
|
|
1553
1574
|
background: "hover",
|
|
1554
|
-
onClick: n(
|
|
1555
|
-
}, null, 8, ["icon", "size", "onClick"])) :
|
|
1575
|
+
onClick: n(v)
|
|
1576
|
+
}, null, 8, ["icon", "size", "onClick"])) : y("", !0)
|
|
1556
1577
|
]),
|
|
1557
|
-
default:
|
|
1558
|
-
|
|
1559
|
-
o.content ? (
|
|
1560
|
-
o.src ? (
|
|
1578
|
+
default: f(() => [
|
|
1579
|
+
_(K.$slots, "default", {}, () => [
|
|
1580
|
+
o.content ? (u(), g(W(o.content), { key: 0 })) : y("", !0),
|
|
1581
|
+
o.src ? (u(), E("iframe", {
|
|
1561
1582
|
key: 1,
|
|
1562
1583
|
src: o.src,
|
|
1563
1584
|
class: "x-dialog__frame"
|
|
1564
|
-
}, null, 8,
|
|
1585
|
+
}, null, 8, An)) : y("", !0)
|
|
1565
1586
|
])
|
|
1566
1587
|
]),
|
|
1567
1588
|
_: 2
|
|
1568
1589
|
}, [
|
|
1569
|
-
o.cancel || o.submit ||
|
|
1590
|
+
o.cancel || o.submit || K.$slots.footer || K.$slots.extra || K.$slots.handle ? {
|
|
1570
1591
|
name: "footer",
|
|
1571
|
-
fn:
|
|
1572
|
-
|
|
1573
|
-
k(n(
|
|
1574
|
-
default:
|
|
1575
|
-
|
|
1592
|
+
fn: f(() => [
|
|
1593
|
+
_(K.$slots, "footer", {}, () => [
|
|
1594
|
+
k(n($), { align: "center" }, {
|
|
1595
|
+
default: f(() => [
|
|
1596
|
+
_(K.$slots, "extra")
|
|
1576
1597
|
]),
|
|
1577
1598
|
_: 3
|
|
1578
1599
|
}),
|
|
1579
|
-
k(n(
|
|
1580
|
-
default:
|
|
1581
|
-
|
|
1582
|
-
o.cancel ? (
|
|
1600
|
+
k(n($), { align: "center" }, {
|
|
1601
|
+
default: f(() => [
|
|
1602
|
+
_(K.$slots, "handle"),
|
|
1603
|
+
o.cancel ? (u(), g(n(de), {
|
|
1583
1604
|
key: 0,
|
|
1584
1605
|
type: "default",
|
|
1585
1606
|
size: o.size,
|
|
1586
|
-
onClick: n(
|
|
1607
|
+
onClick: n(z)
|
|
1587
1608
|
}, {
|
|
1588
|
-
default:
|
|
1589
|
-
N(
|
|
1609
|
+
default: f(() => [
|
|
1610
|
+
N(F(typeof o.cancel == "string" ? o.cancel : "取消"), 1)
|
|
1590
1611
|
]),
|
|
1591
1612
|
_: 1
|
|
1592
|
-
}, 8, ["size", "onClick"])) :
|
|
1593
|
-
o.submit ? (
|
|
1613
|
+
}, 8, ["size", "onClick"])) : y("", !0),
|
|
1614
|
+
o.submit ? (u(), g(n(de), {
|
|
1594
1615
|
key: 1,
|
|
1595
1616
|
type: "primary",
|
|
1596
1617
|
size: o.size,
|
|
1597
|
-
onClick: n(
|
|
1618
|
+
onClick: n(U)
|
|
1598
1619
|
}, {
|
|
1599
|
-
default:
|
|
1600
|
-
N(
|
|
1620
|
+
default: f(() => [
|
|
1621
|
+
N(F(typeof o.submit == "string" ? o.submit : "确定"), 1)
|
|
1601
1622
|
]),
|
|
1602
1623
|
_: 1
|
|
1603
|
-
}, 8, ["size", "onClick"])) :
|
|
1624
|
+
}, 8, ["size", "onClick"])) : y("", !0)
|
|
1604
1625
|
]),
|
|
1605
1626
|
_: 3
|
|
1606
1627
|
})
|
|
@@ -1609,42 +1630,42 @@ const Cn = ["src"], zt = /* @__PURE__ */ E({
|
|
|
1609
1630
|
key: "0"
|
|
1610
1631
|
} : void 0
|
|
1611
1632
|
]), 1032, ["header", "class", "style", "size", "body", "onClick"])), [
|
|
1612
|
-
[n(
|
|
1613
|
-
[n(
|
|
1633
|
+
[n(zn), n(H)],
|
|
1634
|
+
[n($t), n(X)]
|
|
1614
1635
|
])
|
|
1615
1636
|
], 2)
|
|
1616
|
-
])) :
|
|
1637
|
+
])) : y("", !0);
|
|
1617
1638
|
}
|
|
1618
1639
|
});
|
|
1619
|
-
function
|
|
1620
|
-
const e = document.createElement("div"), o = k(
|
|
1621
|
-
o.appContext = t ??
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1640
|
+
function Ge(a, t) {
|
|
1641
|
+
const e = document.createElement("div"), o = k(Je, a);
|
|
1642
|
+
o.appContext = t ?? Ge._context, Ye(o, e);
|
|
1643
|
+
const l = () => {
|
|
1644
|
+
Ye(null, e), e.parentNode?.removeChild(e);
|
|
1624
1645
|
};
|
|
1625
1646
|
return o.props.onDestroy = () => {
|
|
1626
|
-
|
|
1647
|
+
l();
|
|
1627
1648
|
}, document.body.appendChild(e), {
|
|
1628
1649
|
vnode: o,
|
|
1629
|
-
destroy:
|
|
1650
|
+
destroy: l
|
|
1630
1651
|
};
|
|
1631
1652
|
}
|
|
1632
|
-
const
|
|
1653
|
+
const Vn = /* @__PURE__ */ R("div", { class: "x-mask-sidebar__helper" }, null, -1), Pn = /* @__PURE__ */ M({
|
|
1633
1654
|
__name: "Sidebar",
|
|
1634
1655
|
props: {
|
|
1635
1656
|
collapsed: { type: Boolean }
|
|
1636
1657
|
},
|
|
1637
1658
|
setup(a) {
|
|
1638
1659
|
const t = a;
|
|
1639
|
-
return (e, o) =>
|
|
1640
|
-
class:
|
|
1660
|
+
return (e, o) => J((u(), g(n($), {
|
|
1661
|
+
class: Q(["x-mask-sidebar", { "is-collapsed": t.collapsed }]),
|
|
1641
1662
|
grow: !1,
|
|
1642
1663
|
flex: "",
|
|
1643
1664
|
direction: "column"
|
|
1644
1665
|
}, {
|
|
1645
|
-
default:
|
|
1646
|
-
|
|
1647
|
-
k(n(
|
|
1666
|
+
default: f(() => [
|
|
1667
|
+
_(e.$slots, "brand"),
|
|
1668
|
+
k(n($), {
|
|
1648
1669
|
class: "x-mask-sidebar__wrapper",
|
|
1649
1670
|
flex: "",
|
|
1650
1671
|
grow: "",
|
|
@@ -1652,16 +1673,16 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1652
1673
|
justify: "space-between",
|
|
1653
1674
|
align: "center"
|
|
1654
1675
|
}, {
|
|
1655
|
-
default:
|
|
1656
|
-
|
|
1657
|
-
|
|
1676
|
+
default: f(() => [
|
|
1677
|
+
_(e.$slots, "default"),
|
|
1678
|
+
Vn
|
|
1658
1679
|
]),
|
|
1659
1680
|
_: 3
|
|
1660
1681
|
})
|
|
1661
1682
|
]),
|
|
1662
1683
|
_: 3
|
|
1663
1684
|
}, 8, ["class"])), [
|
|
1664
|
-
[n(
|
|
1685
|
+
[n($t), {
|
|
1665
1686
|
dirs: ["e"],
|
|
1666
1687
|
disabled: t.collapsed,
|
|
1667
1688
|
maxWidth: 500,
|
|
@@ -1669,7 +1690,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1669
1690
|
}]
|
|
1670
1691
|
]);
|
|
1671
1692
|
}
|
|
1672
|
-
}),
|
|
1693
|
+
}), Dn = /* @__PURE__ */ M({
|
|
1673
1694
|
__name: "SwitchBar",
|
|
1674
1695
|
props: {
|
|
1675
1696
|
collasped: { type: Boolean, default: !1 },
|
|
@@ -1682,92 +1703,92 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1682
1703
|
"update:favorite"
|
|
1683
1704
|
],
|
|
1684
1705
|
setup(a, { emit: t }) {
|
|
1685
|
-
const e = a, o =
|
|
1686
|
-
|
|
1687
|
-
},
|
|
1688
|
-
s.value = "",
|
|
1689
|
-
},
|
|
1690
|
-
|
|
1706
|
+
const e = a, o = t, l = D(!1), s = D(""), c = D(!1), r = () => {
|
|
1707
|
+
l.value = !0;
|
|
1708
|
+
}, i = () => {
|
|
1709
|
+
s.value = "", l.value = !1, o("update:keyword", s.value);
|
|
1710
|
+
}, m = () => {
|
|
1711
|
+
o("update:collasped", !e.collasped);
|
|
1712
|
+
}, p = () => {
|
|
1713
|
+
o("update:keyword", s.value);
|
|
1691
1714
|
}, d = () => {
|
|
1692
|
-
|
|
1693
|
-
}, f = () => {
|
|
1694
|
-
t("update:favorite", i.value);
|
|
1715
|
+
o("update:favorite", c.value);
|
|
1695
1716
|
};
|
|
1696
|
-
return (
|
|
1717
|
+
return (b, S) => (u(), g(n($), {
|
|
1697
1718
|
class: "x-mask-switch-bar",
|
|
1698
1719
|
justify: "space-between",
|
|
1699
1720
|
align: "center"
|
|
1700
1721
|
}, {
|
|
1701
|
-
default:
|
|
1702
|
-
e.collasped ?
|
|
1722
|
+
default: f(() => [
|
|
1723
|
+
e.collasped ? y("", !0) : (u(), g(n($), {
|
|
1703
1724
|
key: 0,
|
|
1704
1725
|
class: "x-mask-switch-bar__left",
|
|
1705
1726
|
grow: ""
|
|
1706
1727
|
}, {
|
|
1707
|
-
default:
|
|
1708
|
-
|
|
1728
|
+
default: f(() => [
|
|
1729
|
+
l.value ? y("", !0) : (u(), g(n(We), {
|
|
1709
1730
|
key: 0,
|
|
1710
|
-
modelValue:
|
|
1711
|
-
"onUpdate:modelValue": S[0] || (S[0] = (
|
|
1731
|
+
modelValue: c.value,
|
|
1732
|
+
"onUpdate:modelValue": S[0] || (S[0] = (w) => c.value = w),
|
|
1712
1733
|
class: "x-mask-switch-bar__switch",
|
|
1713
|
-
"active-icon": n(
|
|
1714
|
-
"inactive-icon": n(
|
|
1715
|
-
onChange:
|
|
1734
|
+
"active-icon": n(vt),
|
|
1735
|
+
"inactive-icon": n(ht),
|
|
1736
|
+
onChange: d
|
|
1716
1737
|
}, null, 8, ["modelValue", "active-icon", "inactive-icon"])),
|
|
1717
|
-
|
|
1738
|
+
l.value ? (u(), g(n(je), {
|
|
1718
1739
|
key: 1,
|
|
1719
1740
|
modelValue: s.value,
|
|
1720
|
-
"onUpdate:modelValue": S[1] || (S[1] = (
|
|
1741
|
+
"onUpdate:modelValue": S[1] || (S[1] = (w) => s.value = w),
|
|
1721
1742
|
class: "x-mask-switch-bar__input",
|
|
1722
1743
|
size: "small",
|
|
1723
1744
|
placeholder: "请输入查询关键字",
|
|
1724
|
-
onInput:
|
|
1725
|
-
"prefix-icon": n(
|
|
1745
|
+
onInput: p,
|
|
1746
|
+
"prefix-icon": n(Xe)
|
|
1726
1747
|
}, {
|
|
1727
|
-
suffix:
|
|
1728
|
-
k(n(
|
|
1729
|
-
icon: n(
|
|
1730
|
-
onClick:
|
|
1748
|
+
suffix: f(() => [
|
|
1749
|
+
k(n(ae), {
|
|
1750
|
+
icon: n(bt),
|
|
1751
|
+
onClick: i
|
|
1731
1752
|
}, null, 8, ["icon"])
|
|
1732
1753
|
]),
|
|
1733
1754
|
_: 1
|
|
1734
|
-
}, 8, ["modelValue", "prefix-icon"])) :
|
|
1755
|
+
}, 8, ["modelValue", "prefix-icon"])) : y("", !0)
|
|
1735
1756
|
]),
|
|
1736
1757
|
_: 1
|
|
1737
1758
|
})),
|
|
1738
|
-
k(n(
|
|
1739
|
-
class:
|
|
1759
|
+
k(n($), {
|
|
1760
|
+
class: Q(["x-mask-switch-bar__right", { "is-collasped": e.collasped }]),
|
|
1740
1761
|
flex: "",
|
|
1741
1762
|
align: "center",
|
|
1742
1763
|
justify: "center"
|
|
1743
1764
|
}, {
|
|
1744
|
-
default:
|
|
1745
|
-
!
|
|
1765
|
+
default: f(() => [
|
|
1766
|
+
!l.value && !e.collasped ? (u(), g(n(Y), {
|
|
1746
1767
|
key: 0,
|
|
1747
|
-
icon: n(
|
|
1768
|
+
icon: n(Xe),
|
|
1748
1769
|
mode: "icon",
|
|
1749
1770
|
background: "hover",
|
|
1750
1771
|
size: "default",
|
|
1751
1772
|
circle: "",
|
|
1752
|
-
onClick:
|
|
1753
|
-
}, null, 8, ["icon"])) :
|
|
1754
|
-
e.collasped ? (
|
|
1773
|
+
onClick: r
|
|
1774
|
+
}, null, 8, ["icon"])) : y("", !0),
|
|
1775
|
+
e.collasped ? (u(), g(n(Y), {
|
|
1755
1776
|
key: 1,
|
|
1756
|
-
icon: n(
|
|
1777
|
+
icon: n(xo),
|
|
1757
1778
|
mode: "icon",
|
|
1758
1779
|
size: "default",
|
|
1759
1780
|
background: "hover",
|
|
1760
|
-
onClick:
|
|
1781
|
+
onClick: m,
|
|
1761
1782
|
circle: ""
|
|
1762
|
-
}, null, 8, ["icon"])) :
|
|
1763
|
-
e.collasped ?
|
|
1783
|
+
}, null, 8, ["icon"])) : y("", !0),
|
|
1784
|
+
e.collasped ? y("", !0) : (u(), g(n(Y), {
|
|
1764
1785
|
key: 2,
|
|
1765
|
-
icon: n(
|
|
1786
|
+
icon: n(So),
|
|
1766
1787
|
mode: "icon",
|
|
1767
1788
|
size: "default",
|
|
1768
1789
|
background: "hover",
|
|
1769
1790
|
circle: "",
|
|
1770
|
-
onClick:
|
|
1791
|
+
onClick: m
|
|
1771
1792
|
}, null, 8, ["icon"]))
|
|
1772
1793
|
]),
|
|
1773
1794
|
_: 1
|
|
@@ -1776,7 +1797,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1776
1797
|
_: 1
|
|
1777
1798
|
}));
|
|
1778
1799
|
}
|
|
1779
|
-
}),
|
|
1800
|
+
}), Rn = ["src"], Fn = { key: 0 }, On = /* @__PURE__ */ M({
|
|
1780
1801
|
__name: "Brand",
|
|
1781
1802
|
props: {
|
|
1782
1803
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -1785,42 +1806,42 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1785
1806
|
url: {}
|
|
1786
1807
|
},
|
|
1787
1808
|
setup(a) {
|
|
1788
|
-
const t = a, e =
|
|
1809
|
+
const t = a, e = Ae(), o = () => {
|
|
1789
1810
|
t.url && e.push(t.url);
|
|
1790
1811
|
};
|
|
1791
|
-
return (
|
|
1792
|
-
class:
|
|
1812
|
+
return (l, s) => (u(), g(n($), {
|
|
1813
|
+
class: Q(["x-mask-brand", { "is-collapsed": t.collapsed }]),
|
|
1793
1814
|
align: "center"
|
|
1794
1815
|
}, {
|
|
1795
|
-
default:
|
|
1796
|
-
k(n(
|
|
1816
|
+
default: f(() => [
|
|
1817
|
+
k(n($), {
|
|
1797
1818
|
class: "x-mask-brand__logo",
|
|
1798
1819
|
flex: "",
|
|
1799
1820
|
justify: "center",
|
|
1800
1821
|
align: "center",
|
|
1801
1822
|
onClick: o
|
|
1802
1823
|
}, {
|
|
1803
|
-
default:
|
|
1804
|
-
|
|
1805
|
-
t.logo ? (
|
|
1824
|
+
default: f(() => [
|
|
1825
|
+
_(l.$slots, "logo", {}, () => [
|
|
1826
|
+
t.logo ? (u(), E("img", {
|
|
1806
1827
|
key: 0,
|
|
1807
1828
|
src: t.logo
|
|
1808
|
-
}, null, 8,
|
|
1829
|
+
}, null, 8, Rn)) : y("", !0)
|
|
1809
1830
|
])
|
|
1810
1831
|
]),
|
|
1811
1832
|
_: 3
|
|
1812
1833
|
}),
|
|
1813
|
-
k(n(
|
|
1834
|
+
k(n($), {
|
|
1814
1835
|
class: "x-mask-brand__title",
|
|
1815
1836
|
flex: "",
|
|
1816
1837
|
align: "center"
|
|
1817
1838
|
}, {
|
|
1818
|
-
default:
|
|
1819
|
-
t.title ? (
|
|
1820
|
-
|
|
1821
|
-
N(
|
|
1839
|
+
default: f(() => [
|
|
1840
|
+
t.title ? (u(), E("span", Fn, [
|
|
1841
|
+
_(l.$slots, "title", {}, () => [
|
|
1842
|
+
N(F(t.title), 1)
|
|
1822
1843
|
])
|
|
1823
|
-
])) :
|
|
1844
|
+
])) : y("", !0)
|
|
1824
1845
|
]),
|
|
1825
1846
|
_: 3
|
|
1826
1847
|
})
|
|
@@ -1828,7 +1849,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1828
1849
|
_: 3
|
|
1829
1850
|
}, 8, ["class"]));
|
|
1830
1851
|
}
|
|
1831
|
-
}),
|
|
1852
|
+
}), Ee = "__favorites__", Me = "__search__", jn = /* @__PURE__ */ M({
|
|
1832
1853
|
__name: "Menu",
|
|
1833
1854
|
props: {
|
|
1834
1855
|
collapse: { type: Boolean, default: !1 },
|
|
@@ -1841,47 +1862,47 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1841
1862
|
},
|
|
1842
1863
|
emits: ["select"],
|
|
1843
1864
|
setup(a, { emit: t }) {
|
|
1844
|
-
const e = a, o = h(() => e.menus || []), s = h(() => String(e.active?.id)),
|
|
1865
|
+
const e = a, o = h(() => e.menus || []), l = t, s = h(() => String(e.active?.id)), c = h(() => [
|
|
1845
1866
|
{
|
|
1846
|
-
id:
|
|
1867
|
+
id: Ee,
|
|
1847
1868
|
title: "收藏",
|
|
1848
|
-
icon:
|
|
1869
|
+
icon: _t,
|
|
1849
1870
|
children: e.favorites?.length ? e.favorites : [
|
|
1850
1871
|
{
|
|
1851
|
-
id:
|
|
1872
|
+
id: Ee + "empty",
|
|
1852
1873
|
disabled: !0,
|
|
1853
1874
|
title: "暂无收藏菜单"
|
|
1854
1875
|
}
|
|
1855
1876
|
]
|
|
1856
1877
|
}
|
|
1857
|
-
]),
|
|
1858
|
-
const
|
|
1878
|
+
]), r = h(() => {
|
|
1879
|
+
const m = (e.keyword || "").trim(), p = m ? (e.flatMenus || []).filter((d) => d.title?.includes(m)) : [];
|
|
1859
1880
|
return [
|
|
1860
1881
|
{
|
|
1861
|
-
id:
|
|
1882
|
+
id: Me,
|
|
1862
1883
|
title: "搜索",
|
|
1863
|
-
icon:
|
|
1864
|
-
children:
|
|
1884
|
+
icon: Xe,
|
|
1885
|
+
children: p?.length ? p : [
|
|
1865
1886
|
{
|
|
1866
|
-
id:
|
|
1887
|
+
id: Me + "empty",
|
|
1867
1888
|
disabled: !0,
|
|
1868
1889
|
title: "查询匹配不到菜单项"
|
|
1869
1890
|
}
|
|
1870
1891
|
]
|
|
1871
1892
|
}
|
|
1872
1893
|
];
|
|
1873
|
-
}),
|
|
1874
|
-
|
|
1894
|
+
}), i = (m) => {
|
|
1895
|
+
l("select", m);
|
|
1875
1896
|
};
|
|
1876
|
-
return (
|
|
1877
|
-
|
|
1897
|
+
return (m, p) => (u(), E(Z, null, [
|
|
1898
|
+
J(k(n($), {
|
|
1878
1899
|
class: "x-mask-menu",
|
|
1879
1900
|
grow: "",
|
|
1880
1901
|
flex: !1,
|
|
1881
1902
|
overflow: "auto"
|
|
1882
1903
|
}, {
|
|
1883
|
-
default:
|
|
1884
|
-
|
|
1904
|
+
default: f(() => [
|
|
1905
|
+
J(k(n(ne), {
|
|
1885
1906
|
subMenu: {
|
|
1886
1907
|
popperClass: "x-mask-menu-popper",
|
|
1887
1908
|
teleported: !0,
|
|
@@ -1889,45 +1910,45 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1889
1910
|
hideTimeout: 200
|
|
1890
1911
|
},
|
|
1891
1912
|
data: o.value,
|
|
1892
|
-
"default-icon": n(
|
|
1913
|
+
"default-icon": n(re),
|
|
1893
1914
|
collapse: !0,
|
|
1894
1915
|
"collapse-transition": !1,
|
|
1895
1916
|
"default-active": s.value,
|
|
1896
|
-
onSelect:
|
|
1917
|
+
onSelect: i
|
|
1897
1918
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1898
|
-
[
|
|
1919
|
+
[ee, e.collapse]
|
|
1899
1920
|
]),
|
|
1900
|
-
|
|
1921
|
+
J(k(n(ne), {
|
|
1901
1922
|
subMenu: {
|
|
1902
1923
|
popperClass: "x-mask-menu-popper",
|
|
1903
1924
|
teleported: !0
|
|
1904
1925
|
},
|
|
1905
1926
|
data: o.value,
|
|
1906
|
-
"default-icon": n(
|
|
1927
|
+
"default-icon": n(re),
|
|
1907
1928
|
collapse: !1,
|
|
1908
1929
|
"collapse-transition": !1,
|
|
1909
1930
|
"default-active": s.value,
|
|
1910
|
-
onSelect:
|
|
1931
|
+
onSelect: i
|
|
1911
1932
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1912
|
-
[
|
|
1933
|
+
[ee, !e.collapse]
|
|
1913
1934
|
]),
|
|
1914
|
-
o.value.length ?
|
|
1935
|
+
o.value.length ? y("", !0) : (u(), g(n(to), {
|
|
1915
1936
|
key: 0,
|
|
1916
1937
|
description: "暂无菜单数据"
|
|
1917
1938
|
}))
|
|
1918
1939
|
]),
|
|
1919
1940
|
_: 1
|
|
1920
1941
|
}, 512), [
|
|
1921
|
-
[
|
|
1942
|
+
[ee, !e.favorite && !e.keyword]
|
|
1922
1943
|
]),
|
|
1923
|
-
|
|
1944
|
+
J(k(n($), {
|
|
1924
1945
|
class: "x-mask-menu",
|
|
1925
1946
|
grow: "",
|
|
1926
1947
|
flex: !1,
|
|
1927
1948
|
overflow: "auto"
|
|
1928
1949
|
}, {
|
|
1929
|
-
default:
|
|
1930
|
-
|
|
1950
|
+
default: f(() => [
|
|
1951
|
+
J(k(n(ne), {
|
|
1931
1952
|
class: "x-mask-menu__favorites",
|
|
1932
1953
|
subMenu: {
|
|
1933
1954
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1935,17 +1956,17 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1935
1956
|
showTimeout: 200,
|
|
1936
1957
|
hideTimeout: 200
|
|
1937
1958
|
},
|
|
1938
|
-
data:
|
|
1939
|
-
"default-icon": n(
|
|
1959
|
+
data: c.value,
|
|
1960
|
+
"default-icon": n(re),
|
|
1940
1961
|
collapse: !0,
|
|
1941
1962
|
"collapse-transition": !1,
|
|
1942
1963
|
"default-active": s.value,
|
|
1943
|
-
"default-openeds": [
|
|
1944
|
-
onSelect:
|
|
1964
|
+
"default-openeds": [Ee],
|
|
1965
|
+
onSelect: i
|
|
1945
1966
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1946
|
-
[
|
|
1967
|
+
[ee, e.collapse]
|
|
1947
1968
|
]),
|
|
1948
|
-
|
|
1969
|
+
J(k(n(ne), {
|
|
1949
1970
|
class: "x-mask-menu__favorites",
|
|
1950
1971
|
subMenu: {
|
|
1951
1972
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1953,30 +1974,30 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1953
1974
|
showTimeout: 200,
|
|
1954
1975
|
hideTimeout: 200
|
|
1955
1976
|
},
|
|
1956
|
-
data:
|
|
1957
|
-
"default-icon": n(
|
|
1977
|
+
data: c.value,
|
|
1978
|
+
"default-icon": n(re),
|
|
1958
1979
|
collapse: !1,
|
|
1959
1980
|
"collapse-transition": !1,
|
|
1960
1981
|
"default-active": s.value,
|
|
1961
|
-
"default-openeds": [
|
|
1962
|
-
onSelect:
|
|
1982
|
+
"default-openeds": [Ee],
|
|
1983
|
+
onSelect: i
|
|
1963
1984
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1964
|
-
[
|
|
1985
|
+
[ee, !e.collapse]
|
|
1965
1986
|
])
|
|
1966
1987
|
]),
|
|
1967
1988
|
_: 1
|
|
1968
1989
|
}, 512), [
|
|
1969
|
-
[
|
|
1990
|
+
[ee, e.favorite && !e.keyword]
|
|
1970
1991
|
]),
|
|
1971
|
-
e.keyword ?
|
|
1992
|
+
e.keyword ? J((u(), g(n($), {
|
|
1972
1993
|
key: 0,
|
|
1973
1994
|
class: "x-mask-menu",
|
|
1974
1995
|
grow: "",
|
|
1975
1996
|
flex: !1,
|
|
1976
1997
|
overflow: "auto"
|
|
1977
1998
|
}, {
|
|
1978
|
-
default:
|
|
1979
|
-
|
|
1999
|
+
default: f(() => [
|
|
2000
|
+
J(k(n(ne), {
|
|
1980
2001
|
class: "x-mask-menu__search",
|
|
1981
2002
|
subMenu: {
|
|
1982
2003
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1984,17 +2005,17 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1984
2005
|
showTimeout: 200,
|
|
1985
2006
|
hideTimeout: 200
|
|
1986
2007
|
},
|
|
1987
|
-
data:
|
|
1988
|
-
"default-icon": n(
|
|
2008
|
+
data: r.value,
|
|
2009
|
+
"default-icon": n(re),
|
|
1989
2010
|
collapse: !0,
|
|
1990
2011
|
"collapse-transition": !1,
|
|
1991
2012
|
"default-active": s.value,
|
|
1992
|
-
"default-openeds": [
|
|
1993
|
-
onSelect:
|
|
2013
|
+
"default-openeds": [Me],
|
|
2014
|
+
onSelect: i
|
|
1994
2015
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1995
|
-
[
|
|
2016
|
+
[ee, e.collapse]
|
|
1996
2017
|
]),
|
|
1997
|
-
|
|
2018
|
+
J(k(n(ne), {
|
|
1998
2019
|
class: "x-mask-menu__search",
|
|
1999
2020
|
subMenu: {
|
|
2000
2021
|
popperClass: "x-mask-menu-popper",
|
|
@@ -2002,24 +2023,24 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2002
2023
|
showTimeout: 200,
|
|
2003
2024
|
hideTimeout: 200
|
|
2004
2025
|
},
|
|
2005
|
-
data:
|
|
2006
|
-
"default-icon": n(
|
|
2026
|
+
data: r.value,
|
|
2027
|
+
"default-icon": n(re),
|
|
2007
2028
|
collapse: !1,
|
|
2008
2029
|
"collapse-transition": !1,
|
|
2009
2030
|
"default-active": s.value,
|
|
2010
|
-
"default-openeds": [
|
|
2011
|
-
onSelect:
|
|
2031
|
+
"default-openeds": [Me],
|
|
2032
|
+
onSelect: i
|
|
2012
2033
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
2013
|
-
[
|
|
2034
|
+
[ee, !e.collapse]
|
|
2014
2035
|
])
|
|
2015
2036
|
]),
|
|
2016
2037
|
_: 1
|
|
2017
2038
|
}, 512)), [
|
|
2018
|
-
[
|
|
2019
|
-
]) :
|
|
2039
|
+
[ee, !!e.keyword]
|
|
2040
|
+
]) : y("", !0)
|
|
2020
2041
|
], 64));
|
|
2021
2042
|
}
|
|
2022
|
-
}),
|
|
2043
|
+
}), Nn = { class: "x-mask-tabs__trigger" }, Xn = { key: 1 }, Un = ["onDragstart", "onDragend"], Hn = { key: 1 }, Wn = /* @__PURE__ */ M({
|
|
2023
2044
|
__name: "Tabs",
|
|
2024
2045
|
props: {
|
|
2025
2046
|
tabs: {},
|
|
@@ -2030,62 +2051,62 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2030
2051
|
},
|
|
2031
2052
|
emits: ["click", "remove", "refresh", "toggleFavorite", "dialog"],
|
|
2032
2053
|
setup(a, { emit: t }) {
|
|
2033
|
-
const e = a, o = (
|
|
2034
|
-
const
|
|
2035
|
-
(
|
|
2054
|
+
const e = a, o = t, l = (p) => {
|
|
2055
|
+
const d = !!e.favorites.find(
|
|
2056
|
+
(b) => b === p.menu || b.id === p.menu?.id
|
|
2036
2057
|
);
|
|
2037
2058
|
return [
|
|
2038
2059
|
{
|
|
2039
|
-
icon:
|
|
2060
|
+
icon: zo,
|
|
2040
2061
|
label: "刷新",
|
|
2041
2062
|
name: "refresh",
|
|
2042
|
-
value:
|
|
2063
|
+
value: p
|
|
2043
2064
|
},
|
|
2044
2065
|
"|",
|
|
2045
2066
|
{
|
|
2046
|
-
icon:
|
|
2067
|
+
icon: d ? vt : _t,
|
|
2047
2068
|
label: "收藏",
|
|
2048
2069
|
name: "favorite",
|
|
2049
|
-
value:
|
|
2050
|
-
disabled: !
|
|
2070
|
+
value: p.menu,
|
|
2071
|
+
disabled: !p.menu
|
|
2051
2072
|
},
|
|
2052
2073
|
"|",
|
|
2053
2074
|
{
|
|
2054
|
-
icon:
|
|
2075
|
+
icon: Co,
|
|
2055
2076
|
label: "弹窗",
|
|
2056
2077
|
name: "dialog",
|
|
2057
|
-
value:
|
|
2078
|
+
value: p
|
|
2058
2079
|
}
|
|
2059
2080
|
];
|
|
2060
|
-
}, s = (
|
|
2061
|
-
const
|
|
2062
|
-
if (
|
|
2063
|
-
|
|
2081
|
+
}, s = (p) => {
|
|
2082
|
+
const d = p.paneName;
|
|
2083
|
+
if (d === e.home.id) {
|
|
2084
|
+
o("click", e.home);
|
|
2064
2085
|
return;
|
|
2065
2086
|
}
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2068
|
-
},
|
|
2069
|
-
const
|
|
2070
|
-
|
|
2071
|
-
},
|
|
2072
|
-
switch (
|
|
2087
|
+
const b = e.tabs.find((S) => S.id === d);
|
|
2088
|
+
b && o("click", b);
|
|
2089
|
+
}, c = (p) => {
|
|
2090
|
+
const d = e.tabs.find((b) => b.id === p);
|
|
2091
|
+
d && o("remove", d);
|
|
2092
|
+
}, r = (p) => {
|
|
2093
|
+
switch (p.name) {
|
|
2073
2094
|
case "refresh":
|
|
2074
|
-
|
|
2095
|
+
o("refresh", p.value);
|
|
2075
2096
|
break;
|
|
2076
2097
|
case "favorite":
|
|
2077
|
-
|
|
2098
|
+
o("toggleFavorite", p.value);
|
|
2078
2099
|
break;
|
|
2079
2100
|
case "dialog":
|
|
2080
|
-
|
|
2101
|
+
o("dialog", p.value);
|
|
2081
2102
|
break;
|
|
2082
2103
|
}
|
|
2083
|
-
},
|
|
2084
|
-
|
|
2085
|
-
},
|
|
2086
|
-
|
|
2104
|
+
}, i = (p, d) => {
|
|
2105
|
+
d.dataTransfer && (d.dataTransfer.setData("tab", p.id), d.target && d.target.classList.add("is-dagging"));
|
|
2106
|
+
}, m = (p, d) => {
|
|
2107
|
+
d.target && d.target.classList.remove("is-dagging");
|
|
2087
2108
|
};
|
|
2088
|
-
return (
|
|
2109
|
+
return (p, d) => (u(), g(n($), {
|
|
2089
2110
|
ref: "tabsRef",
|
|
2090
2111
|
class: "x-mask-tabs",
|
|
2091
2112
|
height: "100%",
|
|
@@ -2094,58 +2115,58 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2094
2115
|
justify: "flex-end",
|
|
2095
2116
|
direction: "column"
|
|
2096
2117
|
}, {
|
|
2097
|
-
default:
|
|
2098
|
-
k(n(
|
|
2118
|
+
default: f(() => [
|
|
2119
|
+
k(n(gt), {
|
|
2099
2120
|
type: "card",
|
|
2100
2121
|
"model-value": e.value,
|
|
2101
|
-
onTabRemove:
|
|
2122
|
+
onTabRemove: c,
|
|
2102
2123
|
onTabClick: s
|
|
2103
2124
|
}, {
|
|
2104
|
-
default:
|
|
2105
|
-
e.home ? (
|
|
2125
|
+
default: f(() => [
|
|
2126
|
+
e.home ? (u(), g(n(Ne), {
|
|
2106
2127
|
key: 0,
|
|
2107
2128
|
name: e.home.id
|
|
2108
2129
|
}, {
|
|
2109
|
-
label:
|
|
2110
|
-
|
|
2111
|
-
e.home.icon ? (
|
|
2112
|
-
e.home.title ? (
|
|
2130
|
+
label: f(() => [
|
|
2131
|
+
R("div", Nn, [
|
|
2132
|
+
e.home.icon ? (u(), g(W(n(he)(e.home.icon)), { key: 0 })) : y("", !0),
|
|
2133
|
+
e.home.title ? (u(), E("span", Xn, F(e.home.title), 1)) : y("", !0)
|
|
2113
2134
|
])
|
|
2114
2135
|
]),
|
|
2115
2136
|
_: 1
|
|
2116
|
-
}, 8, ["name"])) :
|
|
2117
|
-
(
|
|
2118
|
-
key:
|
|
2119
|
-
name:
|
|
2137
|
+
}, 8, ["name"])) : y("", !0),
|
|
2138
|
+
(u(!0), E(Z, null, se(e.tabs, (b) => (u(), g(n(Ne), {
|
|
2139
|
+
key: b.id,
|
|
2140
|
+
name: b.id,
|
|
2120
2141
|
lazy: "",
|
|
2121
2142
|
closable: ""
|
|
2122
2143
|
}, {
|
|
2123
|
-
label:
|
|
2124
|
-
k(n(
|
|
2144
|
+
label: f(() => [
|
|
2145
|
+
k(n(yt), {
|
|
2125
2146
|
"open-delay": 500,
|
|
2126
2147
|
placement: "bottom",
|
|
2127
2148
|
trigger: "hover",
|
|
2128
2149
|
width: "200px",
|
|
2129
|
-
disabled:
|
|
2150
|
+
disabled: b.id !== e.value
|
|
2130
2151
|
}, {
|
|
2131
|
-
reference:
|
|
2132
|
-
|
|
2152
|
+
reference: f(() => [
|
|
2153
|
+
R("div", {
|
|
2133
2154
|
class: "x-mask-tabs__trigger",
|
|
2134
2155
|
draggable: "true",
|
|
2135
|
-
onDragstart: (S) =>
|
|
2136
|
-
onDragend: (S) =>
|
|
2156
|
+
onDragstart: (S) => i(b, S),
|
|
2157
|
+
onDragend: (S) => m(b, S)
|
|
2137
2158
|
}, [
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
], 40,
|
|
2159
|
+
b.icon ? (u(), g(W(n(he)(b.icon)), { key: 0 })) : y("", !0),
|
|
2160
|
+
b.title ? (u(), E("span", Hn, F(b.title), 1)) : y("", !0)
|
|
2161
|
+
], 40, Un)
|
|
2141
2162
|
]),
|
|
2142
|
-
default:
|
|
2143
|
-
k(n(
|
|
2144
|
-
items:
|
|
2163
|
+
default: f(() => [
|
|
2164
|
+
k(n(Ve), {
|
|
2165
|
+
items: l(b),
|
|
2145
2166
|
mode: "text",
|
|
2146
2167
|
size: "small",
|
|
2147
2168
|
type: "info",
|
|
2148
|
-
onClick:
|
|
2169
|
+
onClick: r
|
|
2149
2170
|
}, null, 8, ["items"])
|
|
2150
2171
|
]),
|
|
2151
2172
|
_: 2
|
|
@@ -2160,20 +2181,20 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2160
2181
|
_: 1
|
|
2161
2182
|
}, 512));
|
|
2162
2183
|
}
|
|
2163
|
-
}),
|
|
2184
|
+
}), Ln = /* @__PURE__ */ M({
|
|
2164
2185
|
__name: "ThemeSwitch",
|
|
2165
2186
|
setup(a) {
|
|
2166
|
-
const t =
|
|
2167
|
-
return (e, o) => (
|
|
2187
|
+
const t = jo();
|
|
2188
|
+
return (e, o) => (u(), g(n(We), {
|
|
2168
2189
|
class: "x-mask-theme-switch",
|
|
2169
2190
|
modelValue: n(t),
|
|
2170
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
2191
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => $e(t) ? t.value = l : null),
|
|
2171
2192
|
size: "default",
|
|
2172
|
-
"active-action-icon": n(
|
|
2173
|
-
"inactive-action-icon": n(
|
|
2193
|
+
"active-action-icon": n(To),
|
|
2194
|
+
"inactive-action-icon": n(Eo)
|
|
2174
2195
|
}, null, 8, ["modelValue", "active-action-icon", "inactive-action-icon"]));
|
|
2175
2196
|
}
|
|
2176
|
-
}),
|
|
2197
|
+
}), Kn = { class: "x-mask-toolbar__menu-item" }, Qn = /* @__PURE__ */ M({
|
|
2177
2198
|
__name: "Toolbar",
|
|
2178
2199
|
props: {
|
|
2179
2200
|
tabs: { default: () => [] },
|
|
@@ -2189,11 +2210,11 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2189
2210
|
"actionCommand"
|
|
2190
2211
|
],
|
|
2191
2212
|
setup(a, { emit: t }) {
|
|
2192
|
-
const e = a, o = h(() => {
|
|
2193
|
-
const
|
|
2194
|
-
divided:
|
|
2195
|
-
label:
|
|
2196
|
-
command:
|
|
2213
|
+
const e = a, o = t, l = h(() => {
|
|
2214
|
+
const m = e.tabs.map((p, d) => ({
|
|
2215
|
+
divided: d === 0,
|
|
2216
|
+
label: p.title,
|
|
2217
|
+
command: p
|
|
2197
2218
|
}));
|
|
2198
2219
|
return [
|
|
2199
2220
|
{
|
|
@@ -2204,106 +2225,106 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2204
2225
|
label: "关闭全部",
|
|
2205
2226
|
command: "all"
|
|
2206
2227
|
},
|
|
2207
|
-
...
|
|
2228
|
+
...m
|
|
2208
2229
|
];
|
|
2209
|
-
}), s = (
|
|
2210
|
-
|
|
2211
|
-
},
|
|
2212
|
-
switch (
|
|
2230
|
+
}), s = (m) => {
|
|
2231
|
+
o("closeTab", m.command);
|
|
2232
|
+
}, c = (m) => {
|
|
2233
|
+
switch (m.command) {
|
|
2213
2234
|
case "all":
|
|
2214
|
-
|
|
2235
|
+
o("closeAllTabs");
|
|
2215
2236
|
break;
|
|
2216
2237
|
case "other":
|
|
2217
|
-
|
|
2238
|
+
o("closeOtherTabs");
|
|
2218
2239
|
break;
|
|
2219
2240
|
default:
|
|
2220
|
-
|
|
2241
|
+
o("clickTab", m.command);
|
|
2221
2242
|
break;
|
|
2222
2243
|
}
|
|
2223
|
-
},
|
|
2224
|
-
|
|
2225
|
-
},
|
|
2226
|
-
|
|
2244
|
+
}, r = (m) => {
|
|
2245
|
+
o("actionClick", m);
|
|
2246
|
+
}, i = (m, p) => {
|
|
2247
|
+
o("actionCommand", m, p);
|
|
2227
2248
|
};
|
|
2228
|
-
return (
|
|
2249
|
+
return (m, p) => (u(), g(n($), {
|
|
2229
2250
|
class: "x-mask-toolbar",
|
|
2230
2251
|
align: "center"
|
|
2231
2252
|
}, {
|
|
2232
|
-
default:
|
|
2233
|
-
k(n(
|
|
2234
|
-
icon: n(
|
|
2235
|
-
menus:
|
|
2253
|
+
default: f(() => [
|
|
2254
|
+
k(n(Y), {
|
|
2255
|
+
icon: n(Mo),
|
|
2256
|
+
menus: l.value,
|
|
2236
2257
|
dropdown: { size: "small" },
|
|
2237
2258
|
mode: "icon",
|
|
2238
2259
|
circle: "",
|
|
2239
2260
|
background: "hover",
|
|
2240
|
-
onCommand:
|
|
2261
|
+
onCommand: c
|
|
2241
2262
|
}, {
|
|
2242
|
-
item:
|
|
2243
|
-
|
|
2244
|
-
N(
|
|
2245
|
-
["other", "all"].includes(
|
|
2263
|
+
item: f(({ item: d }) => [
|
|
2264
|
+
R("span", Kn, [
|
|
2265
|
+
N(F(d.label) + " ", 1),
|
|
2266
|
+
["other", "all"].includes(d.command) ? y("", !0) : (u(), g(n(ae), {
|
|
2246
2267
|
key: 0,
|
|
2247
|
-
onClick:
|
|
2248
|
-
icon: n(
|
|
2268
|
+
onClick: Xt((b) => s(d), ["stop"]),
|
|
2269
|
+
icon: n(bt)
|
|
2249
2270
|
}, null, 8, ["onClick", "icon"]))
|
|
2250
2271
|
])
|
|
2251
2272
|
]),
|
|
2252
2273
|
_: 1
|
|
2253
2274
|
}, 8, ["icon", "menus"]),
|
|
2254
|
-
k(n(
|
|
2255
|
-
e.actions ? (
|
|
2275
|
+
k(n(xe), { direction: "vertical" }),
|
|
2276
|
+
e.actions ? (u(), g(n(Ve), {
|
|
2256
2277
|
key: 0,
|
|
2257
2278
|
circle: "",
|
|
2258
2279
|
mode: "icon",
|
|
2259
2280
|
size: "default",
|
|
2260
2281
|
background: "hover",
|
|
2261
|
-
items:
|
|
2262
|
-
onClick:
|
|
2263
|
-
onCommand:
|
|
2264
|
-
}, null, 8, ["items"])) :
|
|
2265
|
-
e.actions ? (
|
|
2282
|
+
items: m.actions,
|
|
2283
|
+
onClick: r,
|
|
2284
|
+
onCommand: i
|
|
2285
|
+
}, null, 8, ["items"])) : y("", !0),
|
|
2286
|
+
e.actions ? (u(), g(n(xe), {
|
|
2266
2287
|
key: 1,
|
|
2267
2288
|
direction: "vertical"
|
|
2268
|
-
})) :
|
|
2269
|
-
e.theme ? (
|
|
2270
|
-
e.theme ? (
|
|
2289
|
+
})) : y("", !0),
|
|
2290
|
+
e.theme ? (u(), g(Ln, { key: 2 })) : y("", !0),
|
|
2291
|
+
e.theme ? (u(), g(n(xe), {
|
|
2271
2292
|
key: 3,
|
|
2272
2293
|
direction: "vertical"
|
|
2273
|
-
})) :
|
|
2274
|
-
|
|
2294
|
+
})) : y("", !0),
|
|
2295
|
+
_(m.$slots, "default")
|
|
2275
2296
|
]),
|
|
2276
2297
|
_: 3
|
|
2277
2298
|
}));
|
|
2278
2299
|
}
|
|
2279
|
-
}),
|
|
2300
|
+
}), Zn = /* @__PURE__ */ M({
|
|
2280
2301
|
__name: "Avatar",
|
|
2281
2302
|
props: {
|
|
2282
2303
|
avatar: {}
|
|
2283
2304
|
},
|
|
2284
2305
|
setup(a) {
|
|
2285
2306
|
const t = a;
|
|
2286
|
-
return (e, o) => (
|
|
2307
|
+
return (e, o) => (u(), g(n(yt), {
|
|
2287
2308
|
width: 200,
|
|
2288
2309
|
"popper-class": "x-mask-avatar__popper",
|
|
2289
2310
|
disabled: !e.$slots.default
|
|
2290
2311
|
}, {
|
|
2291
|
-
reference:
|
|
2292
|
-
k(n(
|
|
2312
|
+
reference: f(() => [
|
|
2313
|
+
k(n(oo), {
|
|
2293
2314
|
class: "x-mask-avatar",
|
|
2294
2315
|
shape: "circle",
|
|
2295
|
-
icon: n(
|
|
2316
|
+
icon: n($o),
|
|
2296
2317
|
src: t.avatar,
|
|
2297
2318
|
size: 26
|
|
2298
2319
|
}, null, 8, ["icon", "src"])
|
|
2299
2320
|
]),
|
|
2300
|
-
default:
|
|
2301
|
-
e.$slots.default ?
|
|
2321
|
+
default: f(() => [
|
|
2322
|
+
e.$slots.default ? _(e.$slots, "default", { key: 0 }) : y("", !0)
|
|
2302
2323
|
]),
|
|
2303
2324
|
_: 3
|
|
2304
2325
|
}, 8, ["disabled"]));
|
|
2305
2326
|
}
|
|
2306
|
-
}),
|
|
2327
|
+
}), rt = /* @__PURE__ */ M({
|
|
2307
2328
|
__name: "Content",
|
|
2308
2329
|
props: {
|
|
2309
2330
|
createView: { type: Function },
|
|
@@ -2311,22 +2332,22 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2311
2332
|
},
|
|
2312
2333
|
setup(a) {
|
|
2313
2334
|
const t = a;
|
|
2314
|
-
return (e, o) => (
|
|
2335
|
+
return (e, o) => (u(), g(n($), {
|
|
2315
2336
|
class: "x-mask__content",
|
|
2316
2337
|
flex: !1,
|
|
2317
2338
|
grow: "",
|
|
2318
2339
|
padding: !1
|
|
2319
2340
|
}, {
|
|
2320
|
-
default:
|
|
2321
|
-
|
|
2322
|
-
k(n(
|
|
2323
|
-
default:
|
|
2324
|
-
(
|
|
2341
|
+
default: f(() => [
|
|
2342
|
+
_(e.$slots, "default"),
|
|
2343
|
+
k(n(kt), null, {
|
|
2344
|
+
default: f(({ Component: l, route: s }) => [
|
|
2345
|
+
(u(), g(Ut, {
|
|
2325
2346
|
exclude: t.exclude
|
|
2326
2347
|
}, [
|
|
2327
|
-
|
|
2328
|
-
key:
|
|
2329
|
-
})) :
|
|
2348
|
+
l ? (u(), g(W(t.createView(l, s)), {
|
|
2349
|
+
key: s.fullPath
|
|
2350
|
+
})) : y("", !0)
|
|
2330
2351
|
], 1032, ["exclude"]))
|
|
2331
2352
|
]),
|
|
2332
2353
|
_: 1
|
|
@@ -2335,13 +2356,13 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2335
2356
|
_: 3
|
|
2336
2357
|
}));
|
|
2337
2358
|
}
|
|
2338
|
-
}),
|
|
2359
|
+
}), Jn = 140, Gn = {
|
|
2339
2360
|
/**
|
|
2340
2361
|
* 系统logo
|
|
2341
2362
|
*/
|
|
2342
2363
|
logo: {
|
|
2343
2364
|
type: String,
|
|
2344
|
-
default:
|
|
2365
|
+
default: zt
|
|
2345
2366
|
},
|
|
2346
2367
|
/**
|
|
2347
2368
|
* 系统标题
|
|
@@ -2418,382 +2439,382 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2418
2439
|
removeFavorite: {
|
|
2419
2440
|
type: Function
|
|
2420
2441
|
}
|
|
2421
|
-
},
|
|
2422
|
-
function
|
|
2423
|
-
const t =
|
|
2442
|
+
}, Bt = Symbol(), It = Symbol();
|
|
2443
|
+
function Yn(a) {
|
|
2444
|
+
const t = D(!1), e = D(""), o = D(!1);
|
|
2424
2445
|
return {
|
|
2425
2446
|
collapsed: t,
|
|
2426
2447
|
keyword: e,
|
|
2427
2448
|
favorite: o
|
|
2428
2449
|
};
|
|
2429
2450
|
}
|
|
2430
|
-
function
|
|
2431
|
-
const t =
|
|
2451
|
+
function qn(a) {
|
|
2452
|
+
const t = xt();
|
|
2432
2453
|
return h(() => {
|
|
2433
2454
|
const e = a.home;
|
|
2434
2455
|
return Object.assign(
|
|
2435
|
-
{ id: t, url: "/", name: "MaskHome", icon:
|
|
2456
|
+
{ id: t, url: "/", name: "MaskHome", icon: Bo, closable: !1 },
|
|
2436
2457
|
typeof e == "string" ? { url: e } : e || {}
|
|
2437
2458
|
);
|
|
2438
2459
|
});
|
|
2439
2460
|
}
|
|
2440
|
-
function
|
|
2461
|
+
function At(a, t) {
|
|
2441
2462
|
let e = [];
|
|
2442
2463
|
return a.forEach((o) => {
|
|
2443
|
-
o = t ? t(o) : o, o.children ? e = e.concat(
|
|
2464
|
+
o = t ? t(o) : o, o.children ? e = e.concat(At(o.children, t)) : e.push(o);
|
|
2444
2465
|
}), e;
|
|
2445
2466
|
}
|
|
2446
|
-
function
|
|
2447
|
-
const e =
|
|
2448
|
-
const
|
|
2449
|
-
if (!
|
|
2467
|
+
function ea(a, t) {
|
|
2468
|
+
const e = Ae(), o = qe([]), l = qe([]), s = h(() => At(o.value, a.menuAdapter)), c = h(() => Xo(s.value, "id")), r = D(null), i = (w) => {
|
|
2469
|
+
const V = typeof w == "object" ? w.id : w, x = c.value.get(V);
|
|
2470
|
+
if (!x) {
|
|
2450
2471
|
console.warn("找不到菜单", w);
|
|
2451
2472
|
return;
|
|
2452
2473
|
}
|
|
2453
|
-
const { type:
|
|
2454
|
-
if (!
|
|
2455
|
-
|
|
2474
|
+
const { type: T = "route", url: v, title: I, icon: A } = x;
|
|
2475
|
+
if (!v) {
|
|
2476
|
+
r.value = x, t("select", x);
|
|
2456
2477
|
return;
|
|
2457
2478
|
}
|
|
2458
|
-
if (
|
|
2459
|
-
|
|
2479
|
+
if (T === "route") {
|
|
2480
|
+
Uo(v) || v.startsWith("//") ? window.open(v) : (r.value = x, e.push(v).catch((U) => U));
|
|
2460
2481
|
return;
|
|
2461
2482
|
}
|
|
2462
|
-
if (
|
|
2463
|
-
window.open(
|
|
2483
|
+
if (T === "window") {
|
|
2484
|
+
window.open(v);
|
|
2464
2485
|
return;
|
|
2465
2486
|
}
|
|
2466
|
-
|
|
2487
|
+
T === "dialog" && Ge({
|
|
2467
2488
|
resizable: !0,
|
|
2468
2489
|
bodyPadding: !1,
|
|
2469
2490
|
width: "80%",
|
|
2470
2491
|
height: "80%",
|
|
2471
|
-
title:
|
|
2472
|
-
icon:
|
|
2473
|
-
src:
|
|
2492
|
+
title: I,
|
|
2493
|
+
icon: A,
|
|
2494
|
+
src: v
|
|
2474
2495
|
});
|
|
2475
|
-
},
|
|
2476
|
-
o.value = typeof a.menus == "function" ? await a.menus() || [] : a.menus ?? [],
|
|
2477
|
-
},
|
|
2478
|
-
|
|
2479
|
-
},
|
|
2480
|
-
|
|
2481
|
-
},
|
|
2482
|
-
|
|
2496
|
+
}, m = async () => {
|
|
2497
|
+
o.value = typeof a.menus == "function" ? await a.menus() || [] : a.menus ?? [], l.value = typeof a.favorites == "function" ? await a.favorites() || [] : a.favorites ?? [];
|
|
2498
|
+
}, p = (w) => {
|
|
2499
|
+
l.value = [w, ...l.value], a.addFavorite && a.addFavorite(w);
|
|
2500
|
+
}, d = (w) => {
|
|
2501
|
+
l.value = l.value.filter((V) => V.id !== w.id), a.removeFavorite && a.removeFavorite(w);
|
|
2502
|
+
}, b = (w) => !!l.value.find((V) => V === w || V.id === w.id), S = (w) => {
|
|
2503
|
+
b(w) ? d(w) : p(w);
|
|
2483
2504
|
};
|
|
2484
|
-
return
|
|
2505
|
+
return pt(m), {
|
|
2485
2506
|
menus: o,
|
|
2486
|
-
favorites:
|
|
2487
|
-
flatMenus:
|
|
2488
|
-
active:
|
|
2489
|
-
select:
|
|
2490
|
-
toggleFavorite:
|
|
2507
|
+
favorites: l,
|
|
2508
|
+
flatMenus: s,
|
|
2509
|
+
active: r,
|
|
2510
|
+
select: i,
|
|
2511
|
+
toggleFavorite: S
|
|
2491
2512
|
};
|
|
2492
2513
|
}
|
|
2493
|
-
function
|
|
2494
|
-
const
|
|
2495
|
-
() =>
|
|
2496
|
-
),
|
|
2497
|
-
|
|
2498
|
-
},
|
|
2499
|
-
|
|
2500
|
-
},
|
|
2501
|
-
|
|
2502
|
-
},
|
|
2503
|
-
const
|
|
2504
|
-
|
|
2505
|
-
},
|
|
2506
|
-
const { url:
|
|
2514
|
+
function ta(a, t, e, o, l) {
|
|
2515
|
+
const s = Le(), c = Ae(), r = {}, i = D([]), m = D(), { width: p } = wt(m), d = h(() => Math.floor(p.value / Jn)), b = h(
|
|
2516
|
+
() => i.value.slice(0, d.value).filter((C) => !C.dialog)
|
|
2517
|
+
), S = h(() => i.value.slice(d.value)), w = (C) => e.value.find((B) => B.url === C), V = (C) => s.fullPath === C.url, x = (C) => l.value.id === C ? l.value : i.value.find((B) => B.id === C), T = D(""), v = h(() => x(T.value)), I = (C) => {
|
|
2518
|
+
c.push(C.url).catch((B) => B);
|
|
2519
|
+
}, A = (C) => {
|
|
2520
|
+
T.value = C.id, s.fullPath !== C.url && I(C);
|
|
2521
|
+
}, U = () => {
|
|
2522
|
+
I(l.value);
|
|
2523
|
+
}, z = (C) => {
|
|
2524
|
+
const B = i.value.find((P) => P.url === C.url || P.id === C.id);
|
|
2525
|
+
B ? A(B) : (i.value.unshift(C), A(C));
|
|
2526
|
+
}, H = async (C) => {
|
|
2527
|
+
const { url: B = s.fullPath, icon: P, title: ze = "新建标签页" } = C || {}, Ce = r[B], Pe = xt(), De = St(B);
|
|
2507
2528
|
return {
|
|
2508
|
-
id:
|
|
2509
|
-
name:
|
|
2510
|
-
url:
|
|
2511
|
-
icon:
|
|
2512
|
-
title:
|
|
2529
|
+
id: Pe,
|
|
2530
|
+
name: De,
|
|
2531
|
+
url: B,
|
|
2532
|
+
icon: P,
|
|
2533
|
+
title: ze,
|
|
2513
2534
|
closable: !0,
|
|
2514
|
-
menu:
|
|
2515
|
-
...
|
|
2535
|
+
menu: C,
|
|
2536
|
+
...Ce ? await Ce() : {}
|
|
2516
2537
|
};
|
|
2517
|
-
},
|
|
2518
|
-
if (await
|
|
2538
|
+
}, X = async (C) => {
|
|
2539
|
+
if (await Re.confirm("是否关闭页签", "提示", {
|
|
2519
2540
|
type: "warning"
|
|
2520
|
-
}).catch((
|
|
2521
|
-
if (
|
|
2522
|
-
const
|
|
2523
|
-
|
|
2541
|
+
}).catch((P) => !1)) {
|
|
2542
|
+
if (i.value = i.value.filter((P) => P.id !== C.id), T.value === C.id) {
|
|
2543
|
+
const P = i.value[0];
|
|
2544
|
+
I(P || l.value);
|
|
2524
2545
|
}
|
|
2525
|
-
return
|
|
2546
|
+
return C;
|
|
2526
2547
|
}
|
|
2527
|
-
},
|
|
2528
|
-
const
|
|
2529
|
-
if (
|
|
2530
|
-
const
|
|
2531
|
-
|
|
2548
|
+
}, le = (C) => {
|
|
2549
|
+
const B = i.value.findIndex((P) => P.id === C.id);
|
|
2550
|
+
if (B >= 0) {
|
|
2551
|
+
const P = i.value[B];
|
|
2552
|
+
i.value.splice(B, 1, Object.assign(P, C));
|
|
2532
2553
|
}
|
|
2533
|
-
},
|
|
2534
|
-
if (!await
|
|
2554
|
+
}, _e = async () => {
|
|
2555
|
+
if (!await Re.confirm("是否关闭全部页签", "提示", {
|
|
2535
2556
|
type: "warning"
|
|
2536
|
-
}).catch((
|
|
2557
|
+
}).catch((P) => !1))
|
|
2537
2558
|
return;
|
|
2538
|
-
const
|
|
2539
|
-
return
|
|
2540
|
-
},
|
|
2541
|
-
if (!await
|
|
2559
|
+
const B = i.value;
|
|
2560
|
+
return i.value = [], A(l.value), B;
|
|
2561
|
+
}, K = async () => {
|
|
2562
|
+
if (!await Re.confirm("是否关闭其他页签", "提示", {
|
|
2542
2563
|
type: "warning"
|
|
2543
|
-
}).catch((
|
|
2564
|
+
}).catch((P) => !1))
|
|
2544
2565
|
return;
|
|
2545
|
-
const
|
|
2546
|
-
return
|
|
2547
|
-
},
|
|
2548
|
-
const
|
|
2549
|
-
|
|
2550
|
-
},
|
|
2551
|
-
await
|
|
2552
|
-
const
|
|
2553
|
-
if (
|
|
2554
|
-
|
|
2566
|
+
const B = i.value.filter((P) => P.id !== T.value);
|
|
2567
|
+
return i.value = i.value.filter((P) => P.id === T.value), B;
|
|
2568
|
+
}, G = (C) => {
|
|
2569
|
+
const B = i.value.filter((P) => P.id !== C.id);
|
|
2570
|
+
i.value = [C, ...B], A(C);
|
|
2571
|
+
}, ie = async () => {
|
|
2572
|
+
await me();
|
|
2573
|
+
const C = l.value.url === s.fullPath, B = w(s.fullPath);
|
|
2574
|
+
if (C)
|
|
2575
|
+
T.value = l.value.id;
|
|
2555
2576
|
else {
|
|
2556
|
-
const
|
|
2557
|
-
|
|
2577
|
+
const P = await H(B);
|
|
2578
|
+
z(P);
|
|
2558
2579
|
}
|
|
2559
|
-
await
|
|
2580
|
+
await me(), o.value = B || null;
|
|
2560
2581
|
};
|
|
2561
|
-
return
|
|
2562
|
-
tabRef:
|
|
2563
|
-
tabs:
|
|
2564
|
-
showTabs:
|
|
2565
|
-
currentTab:
|
|
2566
|
-
changeTab:
|
|
2567
|
-
removeTab:
|
|
2568
|
-
updateTab:
|
|
2569
|
-
addTab:
|
|
2570
|
-
home:
|
|
2571
|
-
tabValue:
|
|
2572
|
-
isCurrentTab:
|
|
2573
|
-
activeHome:
|
|
2574
|
-
activeTab:
|
|
2575
|
-
dropdownTabs:
|
|
2576
|
-
removeAllTabs:
|
|
2577
|
-
removeOtherTabs:
|
|
2578
|
-
moveToShow:
|
|
2582
|
+
return L(e, ie), L(s, ie, { immediate: !0 }), Se(Bt, r), {
|
|
2583
|
+
tabRef: m,
|
|
2584
|
+
tabs: i,
|
|
2585
|
+
showTabs: b,
|
|
2586
|
+
currentTab: v,
|
|
2587
|
+
changeTab: I,
|
|
2588
|
+
removeTab: X,
|
|
2589
|
+
updateTab: le,
|
|
2590
|
+
addTab: z,
|
|
2591
|
+
home: l,
|
|
2592
|
+
tabValue: T,
|
|
2593
|
+
isCurrentTab: V,
|
|
2594
|
+
activeHome: U,
|
|
2595
|
+
activeTab: A,
|
|
2596
|
+
dropdownTabs: S,
|
|
2597
|
+
removeAllTabs: _e,
|
|
2598
|
+
removeOtherTabs: K,
|
|
2599
|
+
moveToShow: G
|
|
2579
2600
|
};
|
|
2580
2601
|
}
|
|
2581
|
-
function
|
|
2582
|
-
const t = /* @__PURE__ */ new Map(), e =
|
|
2583
|
-
const
|
|
2584
|
-
if (t.has(
|
|
2585
|
-
return t.get(
|
|
2602
|
+
function oa(a) {
|
|
2603
|
+
const t = /* @__PURE__ */ new Map(), e = D([]), o = He({}), l = {}, { updateTab: s, isCurrentTab: c, activeHome: r, tabs: i } = a, m = (v, I) => {
|
|
2604
|
+
const A = I.fullPath;
|
|
2605
|
+
if (t.has(A))
|
|
2606
|
+
return t.get(A);
|
|
2586
2607
|
{
|
|
2587
|
-
const
|
|
2588
|
-
name:
|
|
2608
|
+
const U = St(A), z = {
|
|
2609
|
+
name: U,
|
|
2589
2610
|
setup() {
|
|
2590
|
-
const
|
|
2591
|
-
return
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
), () =>
|
|
2595
|
-
|
|
2611
|
+
const H = h(() => o[A] || document.body), X = h(() => !o[A]), le = h(() => !e.value.includes(U));
|
|
2612
|
+
return Se(
|
|
2613
|
+
Ao,
|
|
2614
|
+
pe({ ...I })
|
|
2615
|
+
), () => le.value ? te(
|
|
2616
|
+
mt,
|
|
2596
2617
|
{
|
|
2597
|
-
to:
|
|
2598
|
-
disabled:
|
|
2618
|
+
to: H.value,
|
|
2619
|
+
disabled: X.value
|
|
2599
2620
|
},
|
|
2600
|
-
[
|
|
2621
|
+
[te(v)]
|
|
2601
2622
|
) : null;
|
|
2602
2623
|
}
|
|
2603
2624
|
};
|
|
2604
|
-
return t.set(
|
|
2625
|
+
return t.set(A, z), z;
|
|
2605
2626
|
}
|
|
2606
|
-
},
|
|
2607
|
-
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2610
|
-
},
|
|
2611
|
-
|
|
2612
|
-
|
|
2627
|
+
}, p = (v) => {
|
|
2628
|
+
v.dialog = void 0, delete o[v.url];
|
|
2629
|
+
const I = l[v.id];
|
|
2630
|
+
I && (I.destroy(), delete l[v.id], s(v));
|
|
2631
|
+
}, d = (v = []) => {
|
|
2632
|
+
v.forEach((I) => {
|
|
2633
|
+
p(I);
|
|
2613
2634
|
});
|
|
2614
|
-
},
|
|
2615
|
-
|
|
2616
|
-
...
|
|
2635
|
+
}, b = async (v) => {
|
|
2636
|
+
v.dialog = {
|
|
2637
|
+
...v.dialog,
|
|
2617
2638
|
onMinimized: () => {
|
|
2618
|
-
|
|
2639
|
+
p(v);
|
|
2619
2640
|
},
|
|
2620
2641
|
onClose: async () => {
|
|
2621
|
-
|
|
2642
|
+
p(v), i.value = i.value.filter((A) => A.id !== v.id);
|
|
2622
2643
|
}
|
|
2623
|
-
},
|
|
2624
|
-
const
|
|
2625
|
-
title:
|
|
2626
|
-
icon:
|
|
2644
|
+
}, s(v);
|
|
2645
|
+
const I = Ge({
|
|
2646
|
+
title: v.title,
|
|
2647
|
+
icon: v.icon,
|
|
2627
2648
|
modal: !1,
|
|
2628
2649
|
resizable: !0,
|
|
2629
2650
|
draggable: !0,
|
|
2630
|
-
...
|
|
2631
|
-
onOpen(
|
|
2632
|
-
o[
|
|
2651
|
+
...v.dialog,
|
|
2652
|
+
onOpen(A) {
|
|
2653
|
+
o[v.url] = A.refs.panelRef?.bodyRef?.$el;
|
|
2633
2654
|
}
|
|
2634
2655
|
});
|
|
2635
|
-
return await
|
|
2636
|
-
},
|
|
2637
|
-
e.value = [
|
|
2638
|
-
}, w = async (
|
|
2639
|
-
e.value =
|
|
2640
|
-
},
|
|
2641
|
-
if (
|
|
2642
|
-
const
|
|
2643
|
-
if (
|
|
2644
|
-
const { clientX:
|
|
2645
|
-
|
|
2646
|
-
left:
|
|
2647
|
-
top:
|
|
2648
|
-
},
|
|
2656
|
+
return await me(), c(v) && r(), l[v.id] = I, I;
|
|
2657
|
+
}, S = async (v) => {
|
|
2658
|
+
e.value = [v.name], await me(), e.value = [];
|
|
2659
|
+
}, w = async (v) => {
|
|
2660
|
+
e.value = v.map((I) => I.name), await me(), e.value = [];
|
|
2661
|
+
}, V = (v) => (v.preventDefault(), !1), x = (v) => {
|
|
2662
|
+
if (v.dataTransfer) {
|
|
2663
|
+
const I = v.dataTransfer.getData("tab"), A = i.value.find((U) => U.id === I);
|
|
2664
|
+
if (A) {
|
|
2665
|
+
const { clientX: U, clientY: z } = v;
|
|
2666
|
+
A.dialog = {
|
|
2667
|
+
left: U,
|
|
2668
|
+
top: z
|
|
2669
|
+
}, b(A);
|
|
2649
2670
|
}
|
|
2650
2671
|
}
|
|
2651
|
-
},
|
|
2652
|
-
return
|
|
2653
|
-
createView:
|
|
2654
|
-
openDialog:
|
|
2655
|
-
refresh:
|
|
2672
|
+
}, T = (v) => !!o[v];
|
|
2673
|
+
return Ie(document, "dragover", V), Ie(document, "drop", x), {
|
|
2674
|
+
createView: m,
|
|
2675
|
+
openDialog: b,
|
|
2676
|
+
refresh: S,
|
|
2656
2677
|
exclude: e,
|
|
2657
2678
|
cleanCache: w,
|
|
2658
|
-
hasDialog:
|
|
2659
|
-
closeDialog:
|
|
2660
|
-
closeDialogs:
|
|
2679
|
+
hasDialog: T,
|
|
2680
|
+
closeDialog: p,
|
|
2681
|
+
closeDialogs: d
|
|
2661
2682
|
};
|
|
2662
2683
|
}
|
|
2663
|
-
const
|
|
2684
|
+
const na = /* @__PURE__ */ M({
|
|
2664
2685
|
name: "XMask",
|
|
2665
2686
|
__name: "Mask",
|
|
2666
|
-
props:
|
|
2687
|
+
props: Gn,
|
|
2667
2688
|
emits: ["select", "actionClick", "actionCommand"],
|
|
2668
2689
|
setup(a, { emit: t }) {
|
|
2669
|
-
const e = a, o =
|
|
2670
|
-
tabRef:
|
|
2671
|
-
showTabs:
|
|
2672
|
-
currentTab:
|
|
2690
|
+
const e = a, o = t, l = qn(e), { collapsed: s, keyword: c, favorite: r } = Yn(), { menus: i, favorites: m, flatMenus: p, active: d, select: b, toggleFavorite: S } = ea(e, o), {
|
|
2691
|
+
tabRef: w,
|
|
2692
|
+
showTabs: V,
|
|
2693
|
+
currentTab: x,
|
|
2673
2694
|
changeTab: T,
|
|
2674
|
-
removeTab:
|
|
2675
|
-
tabs:
|
|
2676
|
-
updateTab:
|
|
2677
|
-
isCurrentTab:
|
|
2678
|
-
activeHome:
|
|
2679
|
-
removeAllTabs:
|
|
2680
|
-
removeOtherTabs:
|
|
2681
|
-
dropdownTabs:
|
|
2682
|
-
moveToShow:
|
|
2683
|
-
} =
|
|
2684
|
-
tabs:
|
|
2685
|
-
updateTab:
|
|
2686
|
-
isCurrentTab:
|
|
2687
|
-
activeHome:
|
|
2688
|
-
}),
|
|
2689
|
-
await
|
|
2690
|
-
},
|
|
2691
|
-
const
|
|
2692
|
-
|
|
2693
|
-
},
|
|
2694
|
-
const
|
|
2695
|
-
|
|
2696
|
-
},
|
|
2697
|
-
|
|
2698
|
-
},
|
|
2699
|
-
|
|
2695
|
+
removeTab: v,
|
|
2696
|
+
tabs: I,
|
|
2697
|
+
updateTab: A,
|
|
2698
|
+
isCurrentTab: U,
|
|
2699
|
+
activeHome: z,
|
|
2700
|
+
removeAllTabs: H,
|
|
2701
|
+
removeOtherTabs: X,
|
|
2702
|
+
dropdownTabs: le,
|
|
2703
|
+
moveToShow: _e
|
|
2704
|
+
} = ta(e, o, p, d, l), { createView: K, openDialog: G, refresh: ie, exclude: C, cleanCache: B, closeDialogs: P } = oa({
|
|
2705
|
+
tabs: I,
|
|
2706
|
+
updateTab: A,
|
|
2707
|
+
isCurrentTab: U,
|
|
2708
|
+
activeHome: z
|
|
2709
|
+
}), ze = async (O) => {
|
|
2710
|
+
await v(O) && await B([O]);
|
|
2711
|
+
}, Ce = async () => {
|
|
2712
|
+
const O = await H();
|
|
2713
|
+
O && (P(O), await B(O));
|
|
2714
|
+
}, Pe = async () => {
|
|
2715
|
+
const O = await X();
|
|
2716
|
+
O && (P(O), await B(O));
|
|
2717
|
+
}, De = (O) => {
|
|
2718
|
+
o("actionClick", O);
|
|
2719
|
+
}, Ot = (O, q) => {
|
|
2720
|
+
o("actionCommand", O, q);
|
|
2700
2721
|
};
|
|
2701
|
-
return
|
|
2702
|
-
tabs:
|
|
2703
|
-
flatMenus:
|
|
2704
|
-
favorites:
|
|
2705
|
-
updateTab:
|
|
2706
|
-
active:
|
|
2707
|
-
currentTab:
|
|
2708
|
-
}), (
|
|
2709
|
-
default:
|
|
2710
|
-
e.disabled ? (
|
|
2722
|
+
return Se(It, {
|
|
2723
|
+
tabs: I,
|
|
2724
|
+
flatMenus: p,
|
|
2725
|
+
favorites: m,
|
|
2726
|
+
updateTab: A,
|
|
2727
|
+
active: d,
|
|
2728
|
+
currentTab: x
|
|
2729
|
+
}), (O, q) => (u(), g(n($), { class: "x-mask" }, {
|
|
2730
|
+
default: f(() => [
|
|
2731
|
+
e.disabled ? (u(), g(rt, {
|
|
2711
2732
|
key: 1,
|
|
2712
|
-
createView: n(
|
|
2713
|
-
exclude: n(
|
|
2733
|
+
createView: n(K),
|
|
2734
|
+
exclude: n(C)
|
|
2714
2735
|
}, {
|
|
2715
|
-
default:
|
|
2716
|
-
|
|
2736
|
+
default: f(() => [
|
|
2737
|
+
O.$slots.default ? _(O.$slots, "default", { key: 0 }) : y("", !0)
|
|
2717
2738
|
]),
|
|
2718
2739
|
_: 3
|
|
2719
|
-
}, 8, ["createView", "exclude"])) : (
|
|
2720
|
-
k(
|
|
2721
|
-
brand:
|
|
2722
|
-
k(
|
|
2740
|
+
}, 8, ["createView", "exclude"])) : (u(), E(Z, { key: 0 }, [
|
|
2741
|
+
k(Pn, { collapsed: n(s) }, {
|
|
2742
|
+
brand: f(() => [
|
|
2743
|
+
k(On, {
|
|
2723
2744
|
logo: e.logo,
|
|
2724
2745
|
title: e.title,
|
|
2725
|
-
url: n(
|
|
2746
|
+
url: n(l).url,
|
|
2726
2747
|
collapsed: n(s)
|
|
2727
2748
|
}, null, 8, ["logo", "title", "url", "collapsed"])
|
|
2728
2749
|
]),
|
|
2729
|
-
default:
|
|
2730
|
-
k(
|
|
2750
|
+
default: f(() => [
|
|
2751
|
+
k(Dn, {
|
|
2731
2752
|
collasped: n(s),
|
|
2732
|
-
"onUpdate:collasped":
|
|
2733
|
-
favorite: n(
|
|
2734
|
-
"onUpdate:favorite":
|
|
2735
|
-
keyword: n(
|
|
2736
|
-
"onUpdate:keyword":
|
|
2753
|
+
"onUpdate:collasped": q[0] || (q[0] = (ke) => $e(s) ? s.value = ke : null),
|
|
2754
|
+
favorite: n(r),
|
|
2755
|
+
"onUpdate:favorite": q[1] || (q[1] = (ke) => $e(r) ? r.value = ke : null),
|
|
2756
|
+
keyword: n(c),
|
|
2757
|
+
"onUpdate:keyword": q[2] || (q[2] = (ke) => $e(c) ? c.value = ke : null)
|
|
2737
2758
|
}, null, 8, ["collasped", "favorite", "keyword"]),
|
|
2738
|
-
k(
|
|
2759
|
+
k(jn, {
|
|
2739
2760
|
collapse: n(s),
|
|
2740
|
-
keyword: n(
|
|
2741
|
-
favorite: n(
|
|
2742
|
-
favorites: n(
|
|
2743
|
-
flatMenus: n(
|
|
2744
|
-
menus: n(
|
|
2745
|
-
active: n(
|
|
2746
|
-
onSelect: n(
|
|
2761
|
+
keyword: n(c),
|
|
2762
|
+
favorite: n(r),
|
|
2763
|
+
favorites: n(m),
|
|
2764
|
+
flatMenus: n(p),
|
|
2765
|
+
menus: n(i),
|
|
2766
|
+
active: n(d),
|
|
2767
|
+
onSelect: n(b)
|
|
2747
2768
|
}, null, 8, ["collapse", "keyword", "favorite", "favorites", "flatMenus", "menus", "active", "onSelect"])
|
|
2748
2769
|
]),
|
|
2749
2770
|
_: 1
|
|
2750
2771
|
}, 8, ["collapsed"]),
|
|
2751
|
-
k(n(
|
|
2772
|
+
k(n($), {
|
|
2752
2773
|
class: "x-mask__main",
|
|
2753
2774
|
grow: "",
|
|
2754
2775
|
shrink: "",
|
|
2755
2776
|
flex: "",
|
|
2756
2777
|
direction: "column"
|
|
2757
2778
|
}, {
|
|
2758
|
-
default:
|
|
2759
|
-
k(n(
|
|
2779
|
+
default: f(() => [
|
|
2780
|
+
k(n($), {
|
|
2760
2781
|
class: "x-mask-topbar",
|
|
2761
2782
|
justify: "space-between",
|
|
2762
2783
|
align: "center"
|
|
2763
2784
|
}, {
|
|
2764
|
-
default:
|
|
2765
|
-
k(
|
|
2785
|
+
default: f(() => [
|
|
2786
|
+
k(Wn, {
|
|
2766
2787
|
ref_key: "tabRef",
|
|
2767
|
-
ref:
|
|
2768
|
-
favorites: n(
|
|
2769
|
-
tabs: n(
|
|
2770
|
-
home: n(
|
|
2771
|
-
value: n(
|
|
2788
|
+
ref: w,
|
|
2789
|
+
favorites: n(m),
|
|
2790
|
+
tabs: n(V),
|
|
2791
|
+
home: n(l),
|
|
2792
|
+
value: n(x)?.id,
|
|
2772
2793
|
onClick: n(T),
|
|
2773
2794
|
onToggleFavorite: n(S),
|
|
2774
|
-
onRemove:
|
|
2775
|
-
onDialog: n(
|
|
2776
|
-
onRefresh: n(
|
|
2795
|
+
onRemove: ze,
|
|
2796
|
+
onDialog: n(G),
|
|
2797
|
+
onRefresh: n(ie)
|
|
2777
2798
|
}, null, 8, ["favorites", "tabs", "home", "value", "onClick", "onToggleFavorite", "onDialog", "onRefresh"]),
|
|
2778
|
-
k(
|
|
2779
|
-
tabs: n(
|
|
2799
|
+
k(Qn, {
|
|
2800
|
+
tabs: n(le),
|
|
2780
2801
|
actions: e.actions,
|
|
2781
2802
|
theme: e.theme,
|
|
2782
|
-
onCloseOtherTabs:
|
|
2783
|
-
onCloseAllTabs:
|
|
2784
|
-
onCloseTab:
|
|
2785
|
-
onClickTab: n(
|
|
2786
|
-
onActionClick:
|
|
2787
|
-
onActionCommand:
|
|
2803
|
+
onCloseOtherTabs: Pe,
|
|
2804
|
+
onCloseAllTabs: Ce,
|
|
2805
|
+
onCloseTab: ze,
|
|
2806
|
+
onClickTab: n(_e),
|
|
2807
|
+
onActionClick: De,
|
|
2808
|
+
onActionCommand: Ot
|
|
2788
2809
|
}, {
|
|
2789
|
-
default:
|
|
2790
|
-
k(
|
|
2810
|
+
default: f(() => [
|
|
2811
|
+
k(Zn, {
|
|
2791
2812
|
avatar: e.avatar
|
|
2792
2813
|
}, ye({ _: 2 }, [
|
|
2793
|
-
|
|
2814
|
+
O.$slots.user ? {
|
|
2794
2815
|
name: "default",
|
|
2795
|
-
fn:
|
|
2796
|
-
|
|
2816
|
+
fn: f(() => [
|
|
2817
|
+
_(O.$slots, "user")
|
|
2797
2818
|
]),
|
|
2798
2819
|
key: "0"
|
|
2799
2820
|
} : void 0
|
|
@@ -2804,12 +2825,12 @@ const Jn = /* @__PURE__ */ E({
|
|
|
2804
2825
|
]),
|
|
2805
2826
|
_: 3
|
|
2806
2827
|
}),
|
|
2807
|
-
k(
|
|
2808
|
-
createView: n(
|
|
2809
|
-
exclude: n(
|
|
2828
|
+
k(rt, {
|
|
2829
|
+
createView: n(K),
|
|
2830
|
+
exclude: n(C)
|
|
2810
2831
|
}, {
|
|
2811
|
-
default:
|
|
2812
|
-
|
|
2832
|
+
default: f(() => [
|
|
2833
|
+
O.$slots.default ? _(O.$slots, "default", { key: 0 }) : y("", !0)
|
|
2813
2834
|
]),
|
|
2814
2835
|
_: 3
|
|
2815
2836
|
}, 8, ["createView", "exclude"])
|
|
@@ -2822,33 +2843,33 @@ const Jn = /* @__PURE__ */ E({
|
|
|
2822
2843
|
}));
|
|
2823
2844
|
}
|
|
2824
2845
|
});
|
|
2825
|
-
function
|
|
2826
|
-
const t =
|
|
2846
|
+
function Ra(a = {}) {
|
|
2847
|
+
const t = Le(), e = we(Bt, null), o = we(It, null);
|
|
2827
2848
|
if (e) {
|
|
2828
|
-
const
|
|
2829
|
-
e[t.fullPath] =
|
|
2849
|
+
const s = typeof a == "function" ? a : async () => a;
|
|
2850
|
+
e[t.fullPath] = s;
|
|
2830
2851
|
}
|
|
2831
2852
|
return {
|
|
2832
|
-
tab: h(() => o ? o.tabs.value.find((
|
|
2853
|
+
tab: h(() => o ? o.tabs.value.find((s) => s.url === t.fullPath) : null),
|
|
2833
2854
|
mask: o
|
|
2834
2855
|
};
|
|
2835
2856
|
}
|
|
2836
|
-
const
|
|
2857
|
+
const aa = /* @__PURE__ */ M({
|
|
2837
2858
|
__name: "SelectEditor",
|
|
2838
2859
|
props: {
|
|
2839
2860
|
options: { default: () => [] }
|
|
2840
2861
|
},
|
|
2841
2862
|
setup(a) {
|
|
2842
2863
|
const t = a;
|
|
2843
|
-
return (e, o) => (
|
|
2844
|
-
default:
|
|
2845
|
-
(
|
|
2846
|
-
key: `item_${
|
|
2847
|
-
},
|
|
2864
|
+
return (e, o) => (u(), g(n(no), ce(ge(e.$attrs)), {
|
|
2865
|
+
default: f(() => [
|
|
2866
|
+
(u(!0), E(Z, null, se(t.options, (l, s) => (u(), g(n(ao), j({
|
|
2867
|
+
key: `item_${s}_${l.value}`
|
|
2868
|
+
}, l), ye({ _: 2 }, [
|
|
2848
2869
|
e.$slots.option ? {
|
|
2849
2870
|
name: "default",
|
|
2850
|
-
fn:
|
|
2851
|
-
|
|
2871
|
+
fn: f(() => [
|
|
2872
|
+
_(e.$slots, "option", { option: l })
|
|
2852
2873
|
]),
|
|
2853
2874
|
key: "0"
|
|
2854
2875
|
} : void 0
|
|
@@ -2857,7 +2878,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2857
2878
|
_: 3
|
|
2858
2879
|
}, 16));
|
|
2859
2880
|
}
|
|
2860
|
-
}),
|
|
2881
|
+
}), sa = /* @__PURE__ */ M({
|
|
2861
2882
|
__name: "CheckboxEditor",
|
|
2862
2883
|
props: {
|
|
2863
2884
|
options: { default: () => [] },
|
|
@@ -2865,16 +2886,16 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2865
2886
|
},
|
|
2866
2887
|
setup(a) {
|
|
2867
2888
|
const t = a, e = h(
|
|
2868
|
-
() =>
|
|
2889
|
+
() => be(t.button ? so : lo)
|
|
2869
2890
|
);
|
|
2870
|
-
return (o,
|
|
2871
|
-
default:
|
|
2872
|
-
(
|
|
2873
|
-
key: `item_${
|
|
2874
|
-
label:
|
|
2891
|
+
return (o, l) => (u(), g(n(io), ce(ge(o.$attrs)), {
|
|
2892
|
+
default: f(() => [
|
|
2893
|
+
(u(!0), E(Z, null, se(t.options, (s, c) => (u(), g(W(e.value), {
|
|
2894
|
+
key: `item_${c}_${s.value}`,
|
|
2895
|
+
label: s.value
|
|
2875
2896
|
}, {
|
|
2876
|
-
default:
|
|
2877
|
-
N(
|
|
2897
|
+
default: f(() => [
|
|
2898
|
+
N(F(s.label), 1)
|
|
2878
2899
|
]),
|
|
2879
2900
|
_: 2
|
|
2880
2901
|
}, 1032, ["label"]))), 128))
|
|
@@ -2882,7 +2903,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2882
2903
|
_: 1
|
|
2883
2904
|
}, 16));
|
|
2884
2905
|
}
|
|
2885
|
-
}),
|
|
2906
|
+
}), la = /* @__PURE__ */ M({
|
|
2886
2907
|
__name: "RadioEditor",
|
|
2887
2908
|
props: {
|
|
2888
2909
|
options: { default: () => [] },
|
|
@@ -2890,16 +2911,16 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2890
2911
|
},
|
|
2891
2912
|
setup(a) {
|
|
2892
2913
|
const t = a, e = h(
|
|
2893
|
-
() =>
|
|
2914
|
+
() => be(t.button ? ro : co)
|
|
2894
2915
|
);
|
|
2895
|
-
return (o,
|
|
2896
|
-
default:
|
|
2897
|
-
(
|
|
2898
|
-
key: `item_${
|
|
2899
|
-
label:
|
|
2916
|
+
return (o, l) => (u(), g(n(uo), ce(ge(o.$attrs)), {
|
|
2917
|
+
default: f(() => [
|
|
2918
|
+
(u(!0), E(Z, null, se(t.options, (s, c) => (u(), g(W(e.value), {
|
|
2919
|
+
key: `item_${c}_${s.value}`,
|
|
2920
|
+
label: s.value
|
|
2900
2921
|
}, {
|
|
2901
|
-
default:
|
|
2902
|
-
N(
|
|
2922
|
+
default: f(() => [
|
|
2923
|
+
N(F(s.label), 1)
|
|
2903
2924
|
]),
|
|
2904
2925
|
_: 2
|
|
2905
2926
|
}, 1032, ["label"]))), 128))
|
|
@@ -2907,7 +2928,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2907
2928
|
_: 1
|
|
2908
2929
|
}, 16));
|
|
2909
2930
|
}
|
|
2910
|
-
}),
|
|
2931
|
+
}), Vt = {
|
|
2911
2932
|
none: {
|
|
2912
2933
|
component: "div",
|
|
2913
2934
|
props: {
|
|
@@ -2915,14 +2936,14 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2915
2936
|
}
|
|
2916
2937
|
},
|
|
2917
2938
|
text: {
|
|
2918
|
-
component:
|
|
2939
|
+
component: je,
|
|
2919
2940
|
props: {
|
|
2920
2941
|
clearable: !0
|
|
2921
2942
|
},
|
|
2922
2943
|
defaultValue: ""
|
|
2923
2944
|
},
|
|
2924
2945
|
textarea: {
|
|
2925
|
-
component:
|
|
2946
|
+
component: je,
|
|
2926
2947
|
props: {
|
|
2927
2948
|
type: "textarea",
|
|
2928
2949
|
rows: 2
|
|
@@ -2930,55 +2951,55 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2930
2951
|
defaultValue: ""
|
|
2931
2952
|
},
|
|
2932
2953
|
select: {
|
|
2933
|
-
component:
|
|
2954
|
+
component: aa,
|
|
2934
2955
|
props: {
|
|
2935
2956
|
clearable: !0
|
|
2936
2957
|
}
|
|
2937
2958
|
},
|
|
2938
2959
|
checkbox: {
|
|
2939
|
-
component:
|
|
2960
|
+
component: sa,
|
|
2940
2961
|
props: {},
|
|
2941
2962
|
defaultValue: []
|
|
2942
2963
|
},
|
|
2943
2964
|
radio: {
|
|
2944
|
-
component:
|
|
2965
|
+
component: la,
|
|
2945
2966
|
props: {}
|
|
2946
2967
|
},
|
|
2947
2968
|
number: {
|
|
2948
|
-
component:
|
|
2969
|
+
component: po,
|
|
2949
2970
|
props: {}
|
|
2950
2971
|
},
|
|
2951
2972
|
date: {
|
|
2952
|
-
component:
|
|
2973
|
+
component: tt,
|
|
2953
2974
|
props: {}
|
|
2954
2975
|
},
|
|
2955
2976
|
time: {
|
|
2956
|
-
component:
|
|
2977
|
+
component: mo,
|
|
2957
2978
|
props: {}
|
|
2958
2979
|
},
|
|
2959
2980
|
datetime: {
|
|
2960
|
-
component:
|
|
2981
|
+
component: tt,
|
|
2961
2982
|
props: {
|
|
2962
2983
|
type: "datetime"
|
|
2963
2984
|
}
|
|
2964
2985
|
},
|
|
2965
2986
|
switch: {
|
|
2966
|
-
component:
|
|
2987
|
+
component: We,
|
|
2967
2988
|
props: {}
|
|
2968
2989
|
},
|
|
2969
2990
|
rate: {
|
|
2970
|
-
component:
|
|
2991
|
+
component: fo,
|
|
2971
2992
|
props: {}
|
|
2972
2993
|
},
|
|
2973
2994
|
slider: {
|
|
2974
|
-
component:
|
|
2995
|
+
component: go,
|
|
2975
2996
|
props: {}
|
|
2976
2997
|
},
|
|
2977
2998
|
cascader: {
|
|
2978
|
-
component:
|
|
2999
|
+
component: yo,
|
|
2979
3000
|
props: {}
|
|
2980
3001
|
}
|
|
2981
|
-
},
|
|
3002
|
+
}, ia = {
|
|
2982
3003
|
/**
|
|
2983
3004
|
* 字段名称
|
|
2984
3005
|
*/
|
|
@@ -3010,7 +3031,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
3010
3031
|
modelValue: {
|
|
3011
3032
|
type: [String, Number, Boolean, Object, Array],
|
|
3012
3033
|
default(a) {
|
|
3013
|
-
return
|
|
3034
|
+
return Vt[a.editor]?.defaultValue;
|
|
3014
3035
|
}
|
|
3015
3036
|
},
|
|
3016
3037
|
/**
|
|
@@ -3074,19 +3095,19 @@ const Gn = /* @__PURE__ */ E({
|
|
|
3074
3095
|
type: [String, Array]
|
|
3075
3096
|
}
|
|
3076
3097
|
};
|
|
3077
|
-
async function
|
|
3098
|
+
async function ra(a, t) {
|
|
3078
3099
|
const e = a.options;
|
|
3079
3100
|
return e ? typeof e == "function" ? await e(t) || [] : e : [];
|
|
3080
3101
|
}
|
|
3081
|
-
function
|
|
3082
|
-
const
|
|
3083
|
-
return
|
|
3084
|
-
|
|
3085
|
-
async (
|
|
3102
|
+
function ca(a, t, e, o, l) {
|
|
3103
|
+
const s = D([]), c = h(() => !o || !l ? {} : Ho(a.cascader).reduce((m, p) => (m[p] = l[p], m), {}));
|
|
3104
|
+
return L(
|
|
3105
|
+
c,
|
|
3106
|
+
async (i) => {
|
|
3086
3107
|
if (e.value) {
|
|
3087
|
-
|
|
3088
|
-
const
|
|
3089
|
-
|
|
3108
|
+
s.value = await ra(a, i);
|
|
3109
|
+
const m = o?.exposed?.reset;
|
|
3110
|
+
m && a.name && m(a.name);
|
|
3090
3111
|
}
|
|
3091
3112
|
},
|
|
3092
3113
|
{
|
|
@@ -3095,81 +3116,84 @@ function oa(a, t, e, o, s) {
|
|
|
3095
3116
|
), {
|
|
3096
3117
|
editor: h(() => {
|
|
3097
3118
|
const {
|
|
3098
|
-
editor:
|
|
3099
|
-
placeholder:
|
|
3100
|
-
label:
|
|
3101
|
-
disabled:
|
|
3102
|
-
readonly:
|
|
3103
|
-
} = a,
|
|
3119
|
+
editor: i = "text",
|
|
3120
|
+
placeholder: m,
|
|
3121
|
+
label: p = "...",
|
|
3122
|
+
disabled: d,
|
|
3123
|
+
readonly: b
|
|
3124
|
+
} = a, S = {
|
|
3104
3125
|
...a.props,
|
|
3105
|
-
placeholder:
|
|
3106
|
-
disabled:
|
|
3107
|
-
readonly:
|
|
3108
|
-
options:
|
|
3126
|
+
placeholder: m || (m === null ? void 0 : `请输入${p}`),
|
|
3127
|
+
disabled: d,
|
|
3128
|
+
readonly: b,
|
|
3129
|
+
options: s.value,
|
|
3109
3130
|
onFocus: () => t("focus"),
|
|
3110
3131
|
onBlur: () => t("blur"),
|
|
3111
|
-
onChange: (
|
|
3112
|
-
}, w = typeof
|
|
3113
|
-
component:
|
|
3132
|
+
onChange: (V) => t("change", V)
|
|
3133
|
+
}, w = typeof i == "string" ? Vt[i] : {
|
|
3134
|
+
component: i,
|
|
3114
3135
|
props: {}
|
|
3115
3136
|
};
|
|
3116
|
-
return
|
|
3117
|
-
props:
|
|
3137
|
+
return Wo({}, w, {
|
|
3138
|
+
props: S
|
|
3118
3139
|
});
|
|
3119
3140
|
})
|
|
3120
3141
|
};
|
|
3121
3142
|
}
|
|
3122
|
-
const
|
|
3143
|
+
const ua = { class: "x-field__editor_wrap" }, Pt = /* @__PURE__ */ M({
|
|
3123
3144
|
name: "XField",
|
|
3124
3145
|
__name: "Field",
|
|
3125
|
-
props:
|
|
3146
|
+
props: ia,
|
|
3126
3147
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
3127
3148
|
setup(a, { expose: t, emit: e }) {
|
|
3128
|
-
const o = a, s =
|
|
3149
|
+
const o = a, l = e, s = we(Dt, null), c = we(ho, null), r = we(Rt, null), i = h(() => !s?.proxy || !r ? o.visible : typeof o.visible == "function" ? o.visible(r) : Qe(o.visible) ? Object.entries(o.visible).every(([H, X]) => r[H] === X) : o.visible), m = () => s?.proxy && r && o.name ? r[o.name] ?? o.modelValue : o.modelValue, p = D(m()), { editor: d } = ca(
|
|
3129
3150
|
o,
|
|
3130
|
-
|
|
3131
|
-
|
|
3151
|
+
l,
|
|
3152
|
+
i,
|
|
3132
3153
|
s,
|
|
3133
|
-
|
|
3134
|
-
),
|
|
3135
|
-
() => o.size ||
|
|
3136
|
-
),
|
|
3154
|
+
r
|
|
3155
|
+
), b = D(), S = D(), w = h(
|
|
3156
|
+
() => o.size || c?.size || "default"
|
|
3157
|
+
), V = h(() => Object.assign(
|
|
3158
|
+
{},
|
|
3159
|
+
typeof o.tooltipMessage == "boolean" ? {} : o.tooltipMessage
|
|
3160
|
+
)), x = h(() => ({
|
|
3137
3161
|
[`is-tooltip-${o.tooltipPosition}`]: !!o.tooltipPosition
|
|
3138
|
-
})),
|
|
3139
|
-
const
|
|
3162
|
+
})), T = h(() => {
|
|
3163
|
+
const z = s?.proxy;
|
|
3140
3164
|
return {
|
|
3141
|
-
width: o.width ?
|
|
3165
|
+
width: o.width ? oe(o.width) : z && z.inline && z.inlineColumns ? `${100 / z.inlineColumns}%` : null
|
|
3142
3166
|
};
|
|
3143
|
-
}),
|
|
3167
|
+
}), v = h(() => ({
|
|
3144
3168
|
right: typeof o.tooltipPosition == "number" ? `${o.tooltipPosition}px` : void 0
|
|
3145
|
-
})),
|
|
3146
|
-
...
|
|
3147
|
-
modelValue:
|
|
3148
|
-
"onUpdate:modelValue": (
|
|
3149
|
-
|
|
3169
|
+
})), I = h(() => ({
|
|
3170
|
+
...d.value.props,
|
|
3171
|
+
modelValue: p.value,
|
|
3172
|
+
"onUpdate:modelValue": (z) => {
|
|
3173
|
+
p.value = z;
|
|
3150
3174
|
}
|
|
3151
3175
|
}));
|
|
3152
|
-
return
|
|
3153
|
-
|
|
3154
|
-
}),
|
|
3155
|
-
() => !s?.proxy || !o.name || !
|
|
3156
|
-
(
|
|
3157
|
-
|
|
3176
|
+
return L(p, (z, H) => {
|
|
3177
|
+
i.value && !Ke(z, H) && (l("update:modelValue", z), s?.proxy && r && o.name && ot(r, o.name, z));
|
|
3178
|
+
}), L(
|
|
3179
|
+
() => !s?.proxy || !o.name || !r ? o.modelValue : r[o.name] ?? o.modelValue,
|
|
3180
|
+
(z) => {
|
|
3181
|
+
i.value && (p.value = z);
|
|
3158
3182
|
},
|
|
3159
3183
|
{
|
|
3160
3184
|
immediate: !0
|
|
3161
3185
|
}
|
|
3162
|
-
),
|
|
3163
|
-
|
|
3164
|
-
(
|
|
3165
|
-
s?.proxy &&
|
|
3186
|
+
), L(
|
|
3187
|
+
i,
|
|
3188
|
+
(z) => {
|
|
3189
|
+
s?.proxy && r && o.name && (z ? (p.value = m(), ot(r, o.name, p.value)) : (p.value = void 0, delete r[o.name]));
|
|
3166
3190
|
},
|
|
3167
3191
|
{
|
|
3168
3192
|
immediate: !0
|
|
3169
3193
|
}
|
|
3170
3194
|
), t({
|
|
3171
|
-
fieldValue:
|
|
3172
|
-
itemRef:
|
|
3195
|
+
fieldValue: p,
|
|
3196
|
+
itemRef: b,
|
|
3173
3197
|
editorRef: S,
|
|
3174
3198
|
focus: () => {
|
|
3175
3199
|
S.value?.focus && S.value.focus();
|
|
@@ -3177,68 +3201,71 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3177
3201
|
blur: () => {
|
|
3178
3202
|
S.value?.foucs && S.value.blur();
|
|
3179
3203
|
}
|
|
3180
|
-
}), (
|
|
3204
|
+
}), (z, H) => i.value ? (u(), g(n(vo), j({
|
|
3181
3205
|
key: 0,
|
|
3182
|
-
class: ["x-field",
|
|
3206
|
+
class: ["x-field", x.value],
|
|
3183
3207
|
ref_key: "itemRef",
|
|
3184
|
-
ref:
|
|
3208
|
+
ref: b,
|
|
3185
3209
|
prop: o.name,
|
|
3186
|
-
label:
|
|
3187
|
-
size:
|
|
3188
|
-
style:
|
|
3189
|
-
},
|
|
3190
|
-
error:
|
|
3191
|
-
z
|
|
3192
|
-
o.tooltipMessage ? (
|
|
3210
|
+
label: z.label,
|
|
3211
|
+
size: w.value,
|
|
3212
|
+
style: T.value
|
|
3213
|
+
}, z.$attrs), ye({
|
|
3214
|
+
error: f(({ error: X }) => [
|
|
3215
|
+
_(z.$slots, "error", { error: X }, () => [
|
|
3216
|
+
o.tooltipMessage ? (u(), E("div", {
|
|
3193
3217
|
key: 0,
|
|
3194
3218
|
class: "x-field__info",
|
|
3195
|
-
style:
|
|
3219
|
+
style: ue(v.value)
|
|
3196
3220
|
}, [
|
|
3197
|
-
k(n(
|
|
3198
|
-
default:
|
|
3199
|
-
k(n(
|
|
3221
|
+
k(n(ft), j({ content: X }, V.value), {
|
|
3222
|
+
default: f(() => [
|
|
3223
|
+
k(n(ae), {
|
|
3200
3224
|
class: "x-field__trigger",
|
|
3201
|
-
icon: n(
|
|
3202
|
-
size:
|
|
3225
|
+
icon: n(Io),
|
|
3226
|
+
size: w.value
|
|
3203
3227
|
}, null, 8, ["icon", "size"])
|
|
3204
3228
|
]),
|
|
3205
3229
|
_: 2
|
|
3206
3230
|
}, 1040, ["content"])
|
|
3207
|
-
], 4)) :
|
|
3231
|
+
], 4)) : y("", !0)
|
|
3208
3232
|
])
|
|
3209
3233
|
]),
|
|
3210
|
-
default:
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3234
|
+
default: f(() => [
|
|
3235
|
+
R("div", ua, [
|
|
3236
|
+
_(z.$slots, "editor", { editor: I.value }, () => [
|
|
3237
|
+
n(d).component ? (u(), g(W(n(d).component), j({
|
|
3238
|
+
key: 0,
|
|
3239
|
+
class: "x-field__editor",
|
|
3240
|
+
ref_key: "editorRef",
|
|
3241
|
+
ref: S,
|
|
3242
|
+
modelValue: p.value,
|
|
3243
|
+
"onUpdate:modelValue": H[0] || (H[0] = (X) => p.value = X)
|
|
3244
|
+
}, n(d).props), ye({ _: 2 }, [
|
|
3245
|
+
z.$slots.option ? {
|
|
3246
|
+
name: "option",
|
|
3247
|
+
fn: f(({ option: X }) => [
|
|
3248
|
+
_(z.$slots, "option", { option: X })
|
|
3249
|
+
]),
|
|
3250
|
+
key: "0"
|
|
3251
|
+
} : void 0
|
|
3252
|
+
]), 1040, ["modelValue"])) : y("", !0)
|
|
3253
|
+
])
|
|
3254
|
+
]),
|
|
3255
|
+
_(z.$slots, "default")
|
|
3229
3256
|
]),
|
|
3230
3257
|
_: 2
|
|
3231
3258
|
}, [
|
|
3232
|
-
|
|
3259
|
+
z.$slots.label ? {
|
|
3233
3260
|
name: "label",
|
|
3234
|
-
fn:
|
|
3235
|
-
z
|
|
3261
|
+
fn: f(() => [
|
|
3262
|
+
_(z.$slots, "label")
|
|
3236
3263
|
]),
|
|
3237
3264
|
key: "0"
|
|
3238
3265
|
} : void 0
|
|
3239
|
-
]), 1040, ["prop", "label", "size", "class", "style"])) :
|
|
3266
|
+
]), 1040, ["prop", "label", "size", "class", "style"])) : y("", !0);
|
|
3240
3267
|
}
|
|
3241
|
-
}),
|
|
3268
|
+
}), da = {
|
|
3242
3269
|
/**
|
|
3243
3270
|
* 表单模型
|
|
3244
3271
|
*/
|
|
@@ -3287,142 +3314,512 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3287
3314
|
submitMethod: {
|
|
3288
3315
|
type: Function
|
|
3289
3316
|
}
|
|
3290
|
-
},
|
|
3317
|
+
}, Dt = Symbol("formInstanceKey"), Rt = Symbol("formModelKey"), Ft = /* @__PURE__ */ M({
|
|
3291
3318
|
name: "XForm",
|
|
3292
3319
|
__name: "Form",
|
|
3293
|
-
props:
|
|
3320
|
+
props: da,
|
|
3294
3321
|
emits: ["change", "submit", "reset"],
|
|
3295
3322
|
setup(a, { expose: t, emit: e }) {
|
|
3296
|
-
const o = a, s =
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
}),
|
|
3323
|
+
const o = a, l = e, s = ve(), c = D(), r = He(o.model || {}), i = D(!1);
|
|
3324
|
+
Se(Dt, s), Se(Rt, r), L(r, () => {
|
|
3325
|
+
l("change", pe(r));
|
|
3326
|
+
}), L(
|
|
3300
3327
|
() => o.model,
|
|
3301
|
-
(
|
|
3302
|
-
Object.assign(
|
|
3328
|
+
(d) => {
|
|
3329
|
+
Object.assign(r, d);
|
|
3303
3330
|
},
|
|
3304
3331
|
{ deep: !0 }
|
|
3305
3332
|
);
|
|
3306
|
-
const
|
|
3307
|
-
await
|
|
3308
|
-
},
|
|
3309
|
-
|
|
3333
|
+
const m = async () => {
|
|
3334
|
+
await c.value.validate().catch((b) => b) && o.model && (l("submit", pe(r)), o.submitMethod && (i.value = !0, await o.submitMethod(pe(r)), i.value = !1));
|
|
3335
|
+
}, p = (d) => {
|
|
3336
|
+
c.value.resetFields(d), l("reset");
|
|
3310
3337
|
};
|
|
3311
3338
|
return t({
|
|
3312
|
-
formRef:
|
|
3313
|
-
model:
|
|
3314
|
-
submit:
|
|
3315
|
-
reset:
|
|
3316
|
-
}), (
|
|
3339
|
+
formRef: c,
|
|
3340
|
+
model: r,
|
|
3341
|
+
submit: m,
|
|
3342
|
+
reset: p
|
|
3343
|
+
}), (d, b) => (u(), g(n(bo), j({
|
|
3317
3344
|
ref_key: "formRef",
|
|
3318
|
-
ref:
|
|
3345
|
+
ref: c,
|
|
3319
3346
|
class: "x-form",
|
|
3320
3347
|
inline: o.inline,
|
|
3321
|
-
model:
|
|
3322
|
-
},
|
|
3323
|
-
default:
|
|
3324
|
-
|
|
3325
|
-
o.footer ? (
|
|
3348
|
+
model: r
|
|
3349
|
+
}, d.$attrs), {
|
|
3350
|
+
default: f(() => [
|
|
3351
|
+
_(d.$slots, "default"),
|
|
3352
|
+
o.footer ? (u(), g(n(Pt), {
|
|
3326
3353
|
key: 0,
|
|
3327
3354
|
editor: "none",
|
|
3328
3355
|
class: "x-form__footer",
|
|
3329
3356
|
label: " "
|
|
3330
3357
|
}, {
|
|
3331
|
-
editor:
|
|
3332
|
-
|
|
3358
|
+
editor: f(() => [
|
|
3359
|
+
_(d.$slots, "footer", {}, () => [
|
|
3360
|
+
o.submitText ? (u(), g(n(de), {
|
|
3361
|
+
key: 0,
|
|
3362
|
+
loading: i.value,
|
|
3363
|
+
type: "primary",
|
|
3364
|
+
onClick: m
|
|
3365
|
+
}, {
|
|
3366
|
+
default: f(() => [
|
|
3367
|
+
N(F(o.submitText), 1)
|
|
3368
|
+
]),
|
|
3369
|
+
_: 1
|
|
3370
|
+
}, 8, ["loading"])) : y("", !0),
|
|
3371
|
+
o.resetText ? (u(), g(n(de), {
|
|
3372
|
+
key: 1,
|
|
3373
|
+
type: "default",
|
|
3374
|
+
onClick: b[0] || (b[0] = () => p())
|
|
3375
|
+
}, {
|
|
3376
|
+
default: f(() => [
|
|
3377
|
+
N(F(o.resetText), 1)
|
|
3378
|
+
]),
|
|
3379
|
+
_: 1
|
|
3380
|
+
})) : y("", !0),
|
|
3381
|
+
_(d.$slots, "action")
|
|
3382
|
+
])
|
|
3383
|
+
]),
|
|
3384
|
+
_: 3
|
|
3385
|
+
})) : y("", !0)
|
|
3386
|
+
]),
|
|
3387
|
+
_: 3
|
|
3388
|
+
}, 16, ["inline", "model"]));
|
|
3389
|
+
}
|
|
3390
|
+
}), pa = {
|
|
3391
|
+
modelValue: {
|
|
3392
|
+
type: Boolean,
|
|
3393
|
+
default: !0
|
|
3394
|
+
},
|
|
3395
|
+
size: {
|
|
3396
|
+
type: String
|
|
3397
|
+
},
|
|
3398
|
+
formProps: {
|
|
3399
|
+
type: Object
|
|
3400
|
+
},
|
|
3401
|
+
submit: {
|
|
3402
|
+
type: [Boolean, String],
|
|
3403
|
+
default: "确定"
|
|
3404
|
+
},
|
|
3405
|
+
cancel: {
|
|
3406
|
+
type: [Boolean, String],
|
|
3407
|
+
default: "取消"
|
|
3408
|
+
},
|
|
3409
|
+
/**
|
|
3410
|
+
* 表单模型
|
|
3411
|
+
*/
|
|
3412
|
+
model: {
|
|
3413
|
+
type: Object,
|
|
3414
|
+
default() {
|
|
3415
|
+
return /* @__PURE__ */ Object.create(null);
|
|
3416
|
+
}
|
|
3417
|
+
},
|
|
3418
|
+
rules: {
|
|
3419
|
+
type: Object
|
|
3420
|
+
},
|
|
3421
|
+
/**
|
|
3422
|
+
* 表单提交处理方法, return true 关闭弹窗
|
|
3423
|
+
*/
|
|
3424
|
+
submitMethod: {
|
|
3425
|
+
type: Function
|
|
3426
|
+
}
|
|
3427
|
+
}, ma = /* @__PURE__ */ M({
|
|
3428
|
+
name: "XDialogForm",
|
|
3429
|
+
__name: "DialogForm",
|
|
3430
|
+
props: pa,
|
|
3431
|
+
emits: ["update:modelValue", "submit", "close"],
|
|
3432
|
+
setup(a, { expose: t, emit: e }) {
|
|
3433
|
+
const o = a, l = e, s = D(), c = D(), r = h(() => c.value?.$vtjEl), i = () => {
|
|
3434
|
+
s.value?.submit();
|
|
3435
|
+
}, m = () => {
|
|
3436
|
+
l("update:modelValue", !1), l("close");
|
|
3437
|
+
}, p = async (d) => {
|
|
3438
|
+
l("submit", d), o.submitMethod ? await o.submitMethod(d) && m() : m();
|
|
3439
|
+
};
|
|
3440
|
+
return t({
|
|
3441
|
+
$vtjEl: r,
|
|
3442
|
+
formRef: s,
|
|
3443
|
+
dialogRef: c
|
|
3444
|
+
}), (d, b) => (u(), g(n(Je), j({
|
|
3445
|
+
ref_key: "dialogRef",
|
|
3446
|
+
ref: c,
|
|
3447
|
+
"model-value": o.modelValue,
|
|
3448
|
+
submit: o.submit,
|
|
3449
|
+
cancel: o.cancel,
|
|
3450
|
+
size: o.size,
|
|
3451
|
+
onSubmit: i,
|
|
3452
|
+
onClose: m,
|
|
3453
|
+
minimizable: !1,
|
|
3454
|
+
maximizable: !1
|
|
3455
|
+
}, d.$attrs), ye({
|
|
3456
|
+
default: f(() => [
|
|
3457
|
+
k(n(Ft), j({
|
|
3458
|
+
ref_key: "formRef",
|
|
3459
|
+
ref: s,
|
|
3460
|
+
footer: !1,
|
|
3461
|
+
"label-width": "80px",
|
|
3462
|
+
size: o.size,
|
|
3463
|
+
model: o.model,
|
|
3464
|
+
rules: o.rules,
|
|
3465
|
+
"submit-method": p
|
|
3466
|
+
}, o.formProps), {
|
|
3467
|
+
default: f(() => [
|
|
3468
|
+
_(d.$slots, "default")
|
|
3469
|
+
]),
|
|
3470
|
+
_: 3
|
|
3471
|
+
}, 16, ["size", "model", "rules"])
|
|
3472
|
+
]),
|
|
3473
|
+
_: 2
|
|
3474
|
+
}, [
|
|
3475
|
+
d.$slots.extra ? {
|
|
3476
|
+
name: "extra",
|
|
3477
|
+
fn: f(() => [
|
|
3478
|
+
_(d.$slots, "extra")
|
|
3479
|
+
]),
|
|
3480
|
+
key: "0"
|
|
3481
|
+
} : void 0,
|
|
3482
|
+
d.$slots.handle ? {
|
|
3483
|
+
name: "handle",
|
|
3484
|
+
fn: f(() => [
|
|
3485
|
+
_(d.$slots, "handle")
|
|
3486
|
+
]),
|
|
3487
|
+
key: "1"
|
|
3488
|
+
} : void 0,
|
|
3489
|
+
d.$slots.footer ? {
|
|
3490
|
+
name: "footer",
|
|
3491
|
+
fn: f(() => [
|
|
3492
|
+
_(d.$slots, "footer")
|
|
3493
|
+
]),
|
|
3494
|
+
key: "2"
|
|
3495
|
+
} : void 0
|
|
3496
|
+
]), 1040, ["model-value", "submit", "cancel", "size"]));
|
|
3497
|
+
}
|
|
3498
|
+
}), fa = {
|
|
3499
|
+
items: {
|
|
3500
|
+
type: Array,
|
|
3501
|
+
default() {
|
|
3502
|
+
return [];
|
|
3503
|
+
}
|
|
3504
|
+
},
|
|
3505
|
+
border: {
|
|
3506
|
+
type: Boolean
|
|
3507
|
+
}
|
|
3508
|
+
}, ga = /* @__PURE__ */ M({
|
|
3509
|
+
name: "XTabs",
|
|
3510
|
+
__name: "Tabs",
|
|
3511
|
+
props: fa,
|
|
3512
|
+
setup(a) {
|
|
3513
|
+
const t = a, e = (l) => {
|
|
3514
|
+
const { label: s, name: c, value: r, disabled: i, closable: m, lazy: p } = l;
|
|
3515
|
+
return {
|
|
3516
|
+
label: s,
|
|
3517
|
+
name: r ?? c,
|
|
3518
|
+
disabled: i,
|
|
3519
|
+
closable: m,
|
|
3520
|
+
lazy: p
|
|
3521
|
+
};
|
|
3522
|
+
}, o = h(() => ({
|
|
3523
|
+
"is-no-border": !t.border
|
|
3524
|
+
}));
|
|
3525
|
+
return (l, s) => (u(), g(n(gt), j({
|
|
3526
|
+
class: ["x-tabs", o.value]
|
|
3527
|
+
}, l.$attrs), {
|
|
3528
|
+
default: f(() => [
|
|
3529
|
+
(u(!0), E(Z, null, se(t.items, (c) => (u(), g(n(Ne), j({
|
|
3530
|
+
key: c.value ?? c.name
|
|
3531
|
+
}, e(c)), {
|
|
3532
|
+
label: f(() => [
|
|
3533
|
+
_(l.$slots, "label", ce(ge(c)), () => [
|
|
3534
|
+
c.icon ? (u(), g(W(n(he)(c.icon)), {
|
|
3535
|
+
key: 0,
|
|
3536
|
+
class: "x-tabs__icon"
|
|
3537
|
+
})) : y("", !0),
|
|
3538
|
+
N(" " + F(c.label), 1)
|
|
3539
|
+
])
|
|
3540
|
+
]),
|
|
3541
|
+
default: f(() => [
|
|
3542
|
+
_(l.$slots, "default", ce(ge(c)), () => [
|
|
3543
|
+
c.component ? (u(), g(W(c.component), ce(j({ key: 0 }, c.props)), null, 16)) : y("", !0)
|
|
3544
|
+
])
|
|
3545
|
+
]),
|
|
3546
|
+
_: 2
|
|
3547
|
+
}, 1040))), 128))
|
|
3548
|
+
]),
|
|
3549
|
+
_: 3
|
|
3550
|
+
}, 16, ["class"]));
|
|
3551
|
+
}
|
|
3552
|
+
}), ya = {
|
|
3553
|
+
direction: {
|
|
3554
|
+
type: String,
|
|
3555
|
+
default: "column"
|
|
3556
|
+
},
|
|
3557
|
+
imageSrc: {
|
|
3558
|
+
type: String
|
|
3559
|
+
},
|
|
3560
|
+
imageWidth: {
|
|
3561
|
+
type: [Number, String]
|
|
3562
|
+
},
|
|
3563
|
+
imageHeight: {
|
|
3564
|
+
type: [Number, String]
|
|
3565
|
+
},
|
|
3566
|
+
icon: {
|
|
3567
|
+
type: [String, Object]
|
|
3568
|
+
},
|
|
3569
|
+
title: {
|
|
3570
|
+
type: String
|
|
3571
|
+
},
|
|
3572
|
+
description: {
|
|
3573
|
+
type: String
|
|
3574
|
+
},
|
|
3575
|
+
actions: {
|
|
3576
|
+
type: Array
|
|
3577
|
+
},
|
|
3578
|
+
actionBarProps: {
|
|
3579
|
+
type: Object
|
|
3580
|
+
},
|
|
3581
|
+
split: {
|
|
3582
|
+
type: Boolean
|
|
3583
|
+
},
|
|
3584
|
+
onImageClick: {
|
|
3585
|
+
type: Function
|
|
3586
|
+
},
|
|
3587
|
+
onTitleClick: {
|
|
3588
|
+
type: Function
|
|
3589
|
+
}
|
|
3590
|
+
}, ha = { class: "x-data-item__title" }, va = {
|
|
3591
|
+
key: 1,
|
|
3592
|
+
class: "x-data-item__section x-data-item__desc"
|
|
3593
|
+
}, ba = {
|
|
3594
|
+
key: 2,
|
|
3595
|
+
class: "x-data-item__section x-data-item__extra"
|
|
3596
|
+
}, _a = {
|
|
3597
|
+
key: 3,
|
|
3598
|
+
class: "x-data-item__section x-data-item__actions"
|
|
3599
|
+
}, ka = /* @__PURE__ */ M({
|
|
3600
|
+
name: "XDataItem",
|
|
3601
|
+
__name: "DataItem",
|
|
3602
|
+
props: ya,
|
|
3603
|
+
emits: ["imageClick", "titleClick", "actionClick", "actionCommand"],
|
|
3604
|
+
setup(a, { emit: t }) {
|
|
3605
|
+
const e = a, o = t, l = h(() => {
|
|
3606
|
+
const { imageWidth: d, imageHeight: b } = e;
|
|
3607
|
+
return {
|
|
3608
|
+
width: d ? oe(d) : void 0,
|
|
3609
|
+
height: b ? oe(b) : void 0
|
|
3610
|
+
};
|
|
3611
|
+
}), s = h(() => ({
|
|
3612
|
+
[`is-image-${e.direction}`]: !!e.direction,
|
|
3613
|
+
"is-split": !!e.split
|
|
3614
|
+
})), c = h(() => ({
|
|
3615
|
+
size: "small",
|
|
3616
|
+
mode: "text",
|
|
3617
|
+
justify: "flex-end",
|
|
3618
|
+
type: "info",
|
|
3619
|
+
items: e.actions,
|
|
3620
|
+
...e.actionBarProps
|
|
3621
|
+
})), r = () => o("imageClick"), i = () => o("titleClick"), m = (d) => o("actionClick", d), p = (d, b) => o("actionCommand", d, b);
|
|
3622
|
+
return (d, b) => (u(), g(n($), {
|
|
3623
|
+
class: Q(["x-data-item", s.value]),
|
|
3624
|
+
direction: e.direction
|
|
3625
|
+
}, {
|
|
3626
|
+
default: f(() => [
|
|
3627
|
+
e.imageSrc || d.$slots.image ? (u(), g(n($), {
|
|
3628
|
+
key: 0,
|
|
3629
|
+
class: "x-data-item__img",
|
|
3630
|
+
onClick: e.onImageClick ? r : void 0
|
|
3631
|
+
}, {
|
|
3632
|
+
default: f(() => [
|
|
3633
|
+
_(d.$slots, "image", {}, () => [
|
|
3634
|
+
e.imageSrc ? (u(), g(n(_o), {
|
|
3635
|
+
key: 0,
|
|
3636
|
+
style: ue(l.value),
|
|
3637
|
+
src: e.imageSrc
|
|
3638
|
+
}, null, 8, ["style", "src"])) : y("", !0)
|
|
3639
|
+
])
|
|
3640
|
+
]),
|
|
3641
|
+
_: 3
|
|
3642
|
+
}, 8, ["onClick"])) : y("", !0),
|
|
3643
|
+
k(n($), {
|
|
3644
|
+
class: "x-data-item__content",
|
|
3645
|
+
direction: "column",
|
|
3646
|
+
grow: "",
|
|
3647
|
+
shrink: ""
|
|
3648
|
+
}, {
|
|
3649
|
+
default: f(() => [
|
|
3650
|
+
e.title || d.$slots.title ? (u(), g(n($), {
|
|
3333
3651
|
key: 0,
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
onClick:
|
|
3337
|
-
}, {
|
|
3338
|
-
default: p(() => [
|
|
3339
|
-
N(j(o.submitText), 1)
|
|
3340
|
-
]),
|
|
3341
|
-
_: 1
|
|
3342
|
-
}, 8, ["loading"])) : v("", !0),
|
|
3343
|
-
o.resetText ? (c(), m(n(le), {
|
|
3344
|
-
key: 1,
|
|
3345
|
-
type: "default",
|
|
3346
|
-
onClick: g[0] || (g[0] = () => d())
|
|
3652
|
+
class: "x-data-item__section x-data-item__wrapper",
|
|
3653
|
+
align: "center",
|
|
3654
|
+
onClick: e.onTitleClick ? i : void 0
|
|
3347
3655
|
}, {
|
|
3348
|
-
default:
|
|
3349
|
-
|
|
3656
|
+
default: f(() => [
|
|
3657
|
+
e.icon ? (u(), g(W(n(he)(e.icon)), {
|
|
3658
|
+
key: 0,
|
|
3659
|
+
class: "x-data-item__icon"
|
|
3660
|
+
})) : y("", !0),
|
|
3661
|
+
R("span", ha, [
|
|
3662
|
+
_(d.$slots, "title", {}, () => [
|
|
3663
|
+
N(F(e.title), 1)
|
|
3664
|
+
])
|
|
3665
|
+
])
|
|
3350
3666
|
]),
|
|
3351
|
-
_:
|
|
3352
|
-
})) :
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3667
|
+
_: 3
|
|
3668
|
+
}, 8, ["onClick"])) : y("", !0),
|
|
3669
|
+
e.description || d.$slots.description ? (u(), E("div", va, [
|
|
3670
|
+
_(d.$slots, "description", {}, () => [
|
|
3671
|
+
N(F(e.description), 1)
|
|
3672
|
+
])
|
|
3673
|
+
])) : y("", !0),
|
|
3674
|
+
d.$slots.default ? (u(), E("div", ba, [
|
|
3675
|
+
_(d.$slots, "default")
|
|
3676
|
+
])) : y("", !0),
|
|
3677
|
+
e.actions || e.actionBarProps || d.$slots.actions ? (u(), E("div", _a, [
|
|
3678
|
+
_(d.$slots, "actions", {}, () => [
|
|
3679
|
+
k(n(Ve), j(c.value, {
|
|
3680
|
+
onClick: m,
|
|
3681
|
+
onCommand: p
|
|
3682
|
+
}), null, 16)
|
|
3683
|
+
])
|
|
3684
|
+
])) : y("", !0)
|
|
3356
3685
|
]),
|
|
3357
3686
|
_: 3
|
|
3358
|
-
})
|
|
3687
|
+
})
|
|
3359
3688
|
]),
|
|
3360
3689
|
_: 3
|
|
3361
|
-
},
|
|
3690
|
+
}, 8, ["direction", "class"]));
|
|
3691
|
+
}
|
|
3692
|
+
}), wa = {
|
|
3693
|
+
option: {
|
|
3694
|
+
type: Object
|
|
3695
|
+
},
|
|
3696
|
+
width: {
|
|
3697
|
+
type: [Number, String],
|
|
3698
|
+
default: "100%"
|
|
3699
|
+
},
|
|
3700
|
+
height: {
|
|
3701
|
+
type: [Number, String],
|
|
3702
|
+
default: "400px"
|
|
3703
|
+
}
|
|
3704
|
+
};
|
|
3705
|
+
function xa(a, t) {
|
|
3706
|
+
const e = D();
|
|
3707
|
+
return ut(() => {
|
|
3708
|
+
const o = n(a);
|
|
3709
|
+
o && (e.value || (e.value = be(nt.init(o))), e.value.setOption(t.option || {}));
|
|
3710
|
+
}), dt(() => {
|
|
3711
|
+
e.value && e.value.dispose();
|
|
3712
|
+
}), L(
|
|
3713
|
+
() => t.option,
|
|
3714
|
+
(o) => {
|
|
3715
|
+
e.value && e.value.setOption(o || {});
|
|
3716
|
+
},
|
|
3717
|
+
{ deep: !0 }
|
|
3718
|
+
), No(
|
|
3719
|
+
a,
|
|
3720
|
+
Lo(() => {
|
|
3721
|
+
e.value && e.value.resize();
|
|
3722
|
+
}, 150)
|
|
3723
|
+
), {
|
|
3724
|
+
echartsInstance: e,
|
|
3725
|
+
echarts: nt
|
|
3726
|
+
};
|
|
3727
|
+
}
|
|
3728
|
+
const Sa = /* @__PURE__ */ M({
|
|
3729
|
+
name: "XChart",
|
|
3730
|
+
__name: "Chart",
|
|
3731
|
+
props: wa,
|
|
3732
|
+
setup(a, { expose: t }) {
|
|
3733
|
+
const e = a, o = D(), { echartsInstance: l, echarts: s } = xa(o, e), c = h(() => ({
|
|
3734
|
+
width: oe(e.width),
|
|
3735
|
+
height: oe(e.height)
|
|
3736
|
+
}));
|
|
3737
|
+
return t({
|
|
3738
|
+
chartRef: o,
|
|
3739
|
+
echartsInstance: l,
|
|
3740
|
+
echarts: s
|
|
3741
|
+
}), (r, i) => (u(), E("div", {
|
|
3742
|
+
ref_key: "chartRef",
|
|
3743
|
+
ref: o,
|
|
3744
|
+
style: ue(c.value)
|
|
3745
|
+
}, null, 4));
|
|
3362
3746
|
}
|
|
3363
|
-
}),
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3747
|
+
}), za = [
|
|
3748
|
+
en,
|
|
3749
|
+
ae,
|
|
3750
|
+
ne,
|
|
3751
|
+
pn,
|
|
3752
|
+
Y,
|
|
3753
|
+
Ve,
|
|
3754
|
+
$,
|
|
3755
|
+
Et,
|
|
3756
|
+
Mt,
|
|
3757
|
+
Je,
|
|
3758
|
+
na,
|
|
3759
|
+
Pt,
|
|
3760
|
+
Ft,
|
|
3761
|
+
ma,
|
|
3762
|
+
ga,
|
|
3763
|
+
ka,
|
|
3764
|
+
Sa
|
|
3765
|
+
], Fa = "0.6.23", Ca = Ko(za), Oa = Ca.install;
|
|
3377
3766
|
export {
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3767
|
+
lt as Draggable,
|
|
3768
|
+
at as INSTALLED_KEY,
|
|
3769
|
+
It as MASK_KEY,
|
|
3770
|
+
Da as NOOP,
|
|
3771
|
+
it as Resizable,
|
|
3772
|
+
Bt as TAB_CREATORS_KEY,
|
|
3773
|
+
Jn as TAB_ITEM_WIDTH,
|
|
3774
|
+
Y as XAction,
|
|
3775
|
+
Ve as XActionBar,
|
|
3776
|
+
Sa as XChart,
|
|
3777
|
+
$ as XContainer,
|
|
3778
|
+
ka as XDataItem,
|
|
3779
|
+
Je as XDialog,
|
|
3780
|
+
ma as XDialogForm,
|
|
3781
|
+
Pt as XField,
|
|
3782
|
+
Ft as XForm,
|
|
3783
|
+
Et as XHeader,
|
|
3784
|
+
ae as XIcon,
|
|
3785
|
+
na as XMask,
|
|
3786
|
+
ne as XMenu,
|
|
3787
|
+
Mt as XPanel,
|
|
3788
|
+
pn as XSimpleMask,
|
|
3789
|
+
en as XStartup,
|
|
3790
|
+
ga as XTabs,
|
|
3791
|
+
bn as actionBarProps,
|
|
3792
|
+
Tt as actionProps,
|
|
3793
|
+
Vt as builtinFieldEditors,
|
|
3794
|
+
wa as chartProps,
|
|
3795
|
+
za as components,
|
|
3796
|
+
_n as containerProps,
|
|
3797
|
+
Ge as createDialog,
|
|
3798
|
+
ya as dataItemProps,
|
|
3799
|
+
Oa as default,
|
|
3800
|
+
Ra as defineTab,
|
|
3801
|
+
pa as dialogFormProps,
|
|
3802
|
+
Cn as dialogProps,
|
|
3803
|
+
ia as fieldProps,
|
|
3804
|
+
Dt as formInstanceKey,
|
|
3805
|
+
Rt as formModelKey,
|
|
3806
|
+
da as formProps,
|
|
3807
|
+
oe as getSizeValue,
|
|
3808
|
+
kn as headerProps,
|
|
3809
|
+
on as iconProps,
|
|
3810
|
+
tn as iconSizeMap,
|
|
3811
|
+
Oa as install,
|
|
3812
|
+
Ko as makeInstaller,
|
|
3813
|
+
Gn as maskProps,
|
|
3814
|
+
Va as omit,
|
|
3815
|
+
Sn as panelProps,
|
|
3816
|
+
Te as parseSize,
|
|
3817
|
+
Pa as pick,
|
|
3818
|
+
fa as tabsProps,
|
|
3819
|
+
Ze as useDisabled,
|
|
3820
|
+
he as useIcon,
|
|
3821
|
+
yn as useIconProps,
|
|
3822
|
+
zn as vDraggable,
|
|
3823
|
+
$t as vResizable,
|
|
3824
|
+
Fa as version
|
|
3428
3825
|
};
|