@sugarat/easypicker2-client 2.5.0 → 2.6.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{data-analysis-13490516.js → data-analysis-632af70e.js} +2 -2
- package/dist/assets/{data-analysis-13490516.js.map → data-analysis-632af70e.js.map} +1 -1
- package/dist/assets/{data-analysis-legacy.f8612e65.js → data-analysis-legacy.297ff95d.js} +2 -2
- package/dist/assets/{data-board-229a3bf5.js → data-board-4290cade.js} +2 -2
- package/dist/assets/{data-board-229a3bf5.js.map → data-board-4290cade.js.map} +1 -1
- package/dist/assets/{data-board-legacy.a60c4519.js → data-board-legacy.b3bf2f61.js} +2 -2
- package/dist/assets/{el-date-picker-5a3e3d86.js → el-date-picker-b3398f8f.js} +2 -2
- package/dist/assets/{el-date-picker-5a3e3d86.js.map → el-date-picker-b3398f8f.js.map} +1 -1
- package/dist/assets/{el-date-picker-legacy.6d67764b.js → el-date-picker-legacy.fd044c30.js} +2 -2
- package/dist/assets/{el-dialog-463960e0.js → el-dialog-c11c4af2.js} +2 -2
- package/dist/assets/{el-dialog-463960e0.js.map → el-dialog-c11c4af2.js.map} +1 -1
- package/dist/assets/{el-dialog-legacy.0bcf48a4.js → el-dialog-legacy.d2229175.js} +2 -2
- package/dist/assets/{el-dropdown-item-7c33f4fa.js → el-dropdown-item-3eb29c67.js} +2 -2
- package/dist/assets/{el-dropdown-item-7c33f4fa.js.map → el-dropdown-item-3eb29c67.js.map} +1 -1
- package/dist/assets/{el-dropdown-item-legacy.8625546e.js → el-dropdown-item-legacy.60575f42.js} +2 -2
- package/dist/assets/{el-form-item-f40006bf.js → el-form-item-fb230be3.js} +2 -2
- package/dist/assets/{el-form-item-f40006bf.js.map → el-form-item-fb230be3.js.map} +1 -1
- package/dist/assets/{el-form-item-legacy.d28db5d0.js → el-form-item-legacy.237ed4b6.js} +2 -2
- package/dist/assets/{el-loading-5d91bb6c.js → el-loading-e9365e7e.js} +2 -2
- package/dist/assets/{el-loading-5d91bb6c.js.map → el-loading-e9365e7e.js.map} +1 -1
- package/dist/assets/{el-loading-legacy.0f35210f.js → el-loading-legacy.8045609e.js} +2 -2
- package/dist/assets/{el-pagination-ffb99240.js → el-pagination-85149e11.js} +2 -2
- package/dist/assets/{el-pagination-ffb99240.js.map → el-pagination-85149e11.js.map} +1 -1
- package/dist/assets/{el-pagination-legacy.25b54e8d.js → el-pagination-legacy.02ed0149.js} +2 -2
- package/dist/assets/{el-progress-2fff98be.js → el-progress-b98becda.js} +2 -2
- package/dist/assets/{el-progress-2fff98be.js.map → el-progress-b98becda.js.map} +1 -1
- package/dist/assets/{el-progress-legacy.db8b5855.js → el-progress-legacy.1165db46.js} +2 -2
- package/dist/assets/{el-select-7d894fd0.js → el-select-2a16e5df.js} +2 -2
- package/dist/assets/{el-select-7d894fd0.js.map → el-select-2a16e5df.js.map} +1 -1
- package/dist/assets/{el-select-legacy.ad6ded5a.js → el-select-legacy.5ccdd9a4.js} +2 -2
- package/dist/assets/{el-switch-2eda0412.js → el-switch-abdd5a33.js} +2 -2
- package/dist/assets/{el-switch-2eda0412.js.map → el-switch-abdd5a33.js.map} +1 -1
- package/dist/assets/{el-switch-legacy.e17e7919.js → el-switch-legacy.96786863.js} +2 -2
- package/dist/assets/{el-tab-pane-b3156067.js → el-tab-pane-db271c8d.js} +2 -2
- package/dist/assets/{el-tab-pane-b3156067.js.map → el-tab-pane-db271c8d.js.map} +1 -1
- package/dist/assets/{el-tab-pane-legacy.2cf21031.js → el-tab-pane-legacy.143cbc33.js} +2 -2
- package/dist/assets/{el-table-column-22352e92.js → el-table-column-19feeab8.js} +2 -2
- package/dist/assets/{el-table-column-22352e92.js.map → el-table-column-19feeab8.js.map} +1 -1
- package/dist/assets/{el-table-column-legacy.fd665e2a.js → el-table-column-legacy.afba06f3.js} +2 -2
- package/dist/assets/{index-5f3a9ae0.css → index-0f83ff96.css} +1 -1
- package/dist/assets/{index-c61deab7.js → index-0fbe23b2.js} +2 -2
- package/dist/assets/index-0fbe23b2.js.map +1 -0
- package/dist/assets/{index-b3774417.js → index-14d600a5.js} +2 -2
- package/dist/assets/{index-b3774417.js.map → index-14d600a5.js.map} +1 -1
- package/dist/assets/index-1639ad54.js +15 -0
- package/dist/assets/index-1639ad54.js.map +1 -0
- package/dist/assets/{index-afb7d164.js → index-16b096cf.js} +2 -2
- package/dist/assets/{index-afb7d164.js.map → index-16b096cf.js.map} +1 -1
- package/dist/assets/{index-bc1a6d96.js → index-1bd2cd2e.js} +2 -2
- package/dist/assets/{index-bc1a6d96.js.map → index-1bd2cd2e.js.map} +1 -1
- package/dist/assets/{index-ca90e8da.js → index-2c76567d.js} +2 -2
- package/dist/assets/{index-ca90e8da.js.map → index-2c76567d.js.map} +1 -1
- package/dist/assets/{index-b0a4c236.js → index-43d1d27e.js} +2 -2
- package/dist/assets/{index-b0a4c236.js.map → index-43d1d27e.js.map} +1 -1
- package/dist/assets/{index-f47a54b0.js → index-488b0f9e.js} +2 -2
- package/dist/assets/{index-f47a54b0.js.map → index-488b0f9e.js.map} +1 -1
- package/dist/assets/{index-75b8c91c.js → index-4b1f55ea.js} +2 -2
- package/dist/assets/{index-75b8c91c.js.map → index-4b1f55ea.js.map} +1 -1
- package/dist/assets/{index-c840d3aa.js → index-51740dfd.js} +2 -2
- package/dist/assets/{index-c840d3aa.js.map → index-51740dfd.js.map} +1 -1
- package/dist/assets/{index-98964915.js → index-5281fad0.js} +2 -2
- package/dist/assets/{index-98964915.js.map → index-5281fad0.js.map} +1 -1
- package/dist/assets/{index-6d7ac779.js → index-68448dbd.js} +2 -2
- package/dist/assets/{index-6d7ac779.js.map → index-68448dbd.js.map} +1 -1
- package/dist/assets/{index-34bd5929.js → index-74330c06.js} +2 -2
- package/dist/assets/{index-34bd5929.js.map → index-74330c06.js.map} +1 -1
- package/dist/assets/{index-d32645f3.js → index-78a8b3c7.js} +2 -2
- package/dist/assets/{index-d32645f3.js.map → index-78a8b3c7.js.map} +1 -1
- package/dist/assets/{index-f6ffb548.js → index-9e6a9bcf.js} +2 -2
- package/dist/assets/{index-f6ffb548.js.map → index-9e6a9bcf.js.map} +1 -1
- package/dist/assets/{index-c3a1cd43.js → index-ac06071b.js} +2 -2
- package/dist/assets/{index-c3a1cd43.js.map → index-ac06071b.js.map} +1 -1
- package/dist/assets/{index-8eff6b5a.js → index-adc1b681.js} +2 -2
- package/dist/assets/{index-8eff6b5a.js.map → index-adc1b681.js.map} +1 -1
- package/dist/assets/{index-17fa8fb7.js → index-b8357360.js} +2 -2
- package/dist/assets/{index-17fa8fb7.js.map → index-b8357360.js.map} +1 -1
- package/dist/assets/{index-f298d979.js → index-d09329eb.js} +2 -2
- package/dist/assets/{index-f298d979.js.map → index-d09329eb.js.map} +1 -1
- package/dist/assets/{index-6f4c911e.js → index-f74b7eb6.js} +2 -2
- package/dist/assets/{index-6f4c911e.js.map → index-f74b7eb6.js.map} +1 -1
- package/dist/assets/{index-legacy.08663170.js → index-legacy.082ccf5b.js} +2 -2
- package/dist/assets/{index-legacy.5d174bde.js → index-legacy.12de1889.js} +2 -2
- package/dist/assets/{index-legacy.9dc57803.js → index-legacy.1796b3ef.js} +2 -2
- package/dist/assets/{index-legacy.1540c5bc.js → index-legacy.227978b5.js} +2 -2
- package/dist/assets/{index-legacy.e6994f0a.js → index-legacy.296716c3.js} +2 -2
- package/dist/assets/{index-legacy.e7464d3c.js → index-legacy.36482c14.js} +2 -2
- package/dist/assets/{index-legacy.9c4986d3.js → index-legacy.41d8801d.js} +2 -2
- package/dist/assets/{index-legacy.7dae3131.js → index-legacy.4b2923ee.js} +2 -2
- package/dist/assets/{index-legacy.1f2405e5.js → index-legacy.4c1d6eb3.js} +2 -2
- package/dist/assets/{index-legacy.bd5a4368.js → index-legacy.7a041259.js} +2 -2
- package/dist/assets/{index-legacy.45ec3501.js → index-legacy.820f4ba0.js} +2 -2
- package/dist/assets/{index-legacy.51740a44.js → index-legacy.8311ba4a.js} +2 -2
- package/dist/assets/index-legacy.9eb93981.js +18 -0
- package/dist/assets/{index-legacy.4f956884.js → index-legacy.a19ed25e.js} +2 -2
- package/dist/assets/{index-legacy.01d9320a.js → index-legacy.b8de0bf4.js} +2 -2
- package/dist/assets/{index-legacy.6c7021b3.js → index-legacy.e932a3d4.js} +2 -2
- package/dist/assets/{index-legacy.d32480a5.js → index-legacy.e96fb189.js} +2 -2
- package/dist/assets/{index-legacy.9f65dcb9.js → index-legacy.ec490514.js} +2 -2
- package/dist/assets/{index-legacy.189f20a8.js → index-legacy.ed2883a1.js} +2 -2
- package/dist/assets/{index-legacy.d9854cf5.js → index-legacy.f16524a6.js} +2 -2
- package/dist/assets/{isEqual-9c466456.js → isEqual-95d6c129.js} +2 -2
- package/dist/assets/{isEqual-9c466456.js.map → isEqual-95d6c129.js.map} +1 -1
- package/dist/assets/{isEqual-legacy.985bb619.js → isEqual-legacy.83836994.js} +2 -2
- package/dist/assets/{refresh-6ae903c0.js → refresh-be31af7a.js} +2 -2
- package/dist/assets/{refresh-6ae903c0.js.map → refresh-be31af7a.js.map} +1 -1
- package/dist/assets/{refresh-legacy.8092415a.js → refresh-legacy.600c5af4.js} +2 -2
- package/dist/assets/{tip-00ddf749.js → tip-822b05b7.js} +2 -2
- package/dist/assets/{tip-00ddf749.js.map → tip-822b05b7.js.map} +1 -1
- package/dist/assets/{tip-legacy.6e921091.js → tip-legacy.b6d754fd.js} +2 -2
- package/dist/assets/validator-5c60ab85.js +2 -0
- package/dist/assets/{validator-853854a1.js.map → validator-5c60ab85.js.map} +1 -1
- package/dist/assets/validator-legacy.86b93c0e.js +2 -0
- package/dist/index.html +3 -3
- package/package.json +5 -3
- package/dist/assets/index-62c7029f.js +0 -15
- package/dist/assets/index-62c7029f.js.map +0 -1
- package/dist/assets/index-c61deab7.js.map +0 -1
- package/dist/assets/index-legacy.978f90e1.js +0 -18
- package/dist/assets/validator-853854a1.js +0 -2
- package/dist/assets/validator-legacy.b34dfdfa.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-8eff6b5a.js","sources":["../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/popover/src/popover.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/popover/src/popover2.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/popover/src/directive.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/popover/index.mjs","../../node_modules/.pnpm/@element-plus+icons-vue@1.1.4_vue@3.3.4/node_modules/@element-plus/icons-vue/dist/es/bell.mjs","../../node_modules/.pnpm/@element-plus+icons-vue@1.1.4_vue@3.3.4/node_modules/@element-plus/icons-vue/dist/es/close.mjs","../../node_modules/.pnpm/@element-plus+icons-vue@1.1.4_vue@3.3.4/node_modules/@element-plus/icons-vue/dist/es/expand.mjs","../../src/components/MessageList/index.vue","../../src/components/MessagePanel/index.vue","../../src/pages/dashboard/index.vue"],"sourcesContent":["import '../../../utils/index.mjs';\nimport '../../tooltip/index.mjs';\nimport '../../dropdown/index.mjs';\nimport { buildProps } from '../../../utils/vue/props/runtime.mjs';\nimport { useTooltipTriggerProps, useTooltipContentProps } from '../../tooltip/src/tooltip.mjs';\nimport { dropdownProps } from '../../dropdown/src/dropdown.mjs';\nimport { isBoolean } from '@vueuse/core';\n\nconst popoverProps = buildProps({\n trigger: useTooltipTriggerProps.trigger,\n placement: dropdownProps.placement,\n disabled: useTooltipTriggerProps.disabled,\n visible: useTooltipContentProps.visible,\n transition: useTooltipContentProps.transition,\n popperOptions: dropdownProps.popperOptions,\n tabindex: dropdownProps.tabindex,\n content: useTooltipContentProps.content,\n popperStyle: useTooltipContentProps.popperStyle,\n popperClass: useTooltipContentProps.popperClass,\n enterable: {\n ...useTooltipContentProps.enterable,\n default: true\n },\n effect: {\n ...useTooltipContentProps.effect,\n default: \"light\"\n },\n teleported: useTooltipContentProps.teleported,\n title: String,\n width: {\n type: [String, Number],\n default: 150\n },\n offset: {\n type: Number,\n default: void 0\n },\n showAfter: {\n type: Number,\n default: 0\n },\n hideAfter: {\n type: Number,\n default: 200\n },\n autoClose: {\n type: Number,\n default: 0\n },\n showArrow: {\n type: Boolean,\n default: true\n },\n persistent: {\n type: Boolean,\n default: true\n },\n \"onUpdate:visible\": {\n type: Function\n }\n});\nconst popoverEmits = {\n \"update:visible\": (value) => isBoolean(value),\n \"before-enter\": () => true,\n \"before-leave\": () => true,\n \"after-enter\": () => true,\n \"after-leave\": () => true\n};\n\nexport { popoverEmits, popoverProps };\n//# sourceMappingURL=popover.mjs.map\n","import { defineComponent, computed, ref, unref, openBlock, createBlock, mergeProps, withCtx, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, renderSlot, createTextVNode } from 'vue';\nimport { ElTooltip } from '../../tooltip/index.mjs';\nimport '../../../utils/index.mjs';\nimport '../../../hooks/index.mjs';\nimport { popoverProps, popoverEmits } from './popover.mjs';\nimport _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';\nimport { useNamespace } from '../../../hooks/use-namespace/index.mjs';\nimport { addUnit } from '../../../utils/dom/style.mjs';\n\nconst __default__ = {\n name: \"ElPopover\"\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...__default__,\n props: popoverProps,\n emits: popoverEmits,\n setup(__props, { expose, emit }) {\n const props = __props;\n const updateEventKeyRaw = `onUpdate:visible`;\n const onUpdateVisible = computed(() => {\n return props[updateEventKeyRaw];\n });\n const ns = useNamespace(\"popover\");\n const tooltipRef = ref();\n const popperRef = computed(() => {\n var _a;\n return (_a = unref(tooltipRef)) == null ? void 0 : _a.popperRef;\n });\n const style = computed(() => {\n return [\n {\n width: addUnit(props.width)\n },\n props.popperStyle\n ];\n });\n const kls = computed(() => {\n return [ns.b(), props.popperClass, { [ns.m(\"plain\")]: !!props.content }];\n });\n const gpuAcceleration = computed(() => {\n return props.transition === \"el-fade-in-linear\";\n });\n const hide = () => {\n var _a;\n (_a = tooltipRef.value) == null ? void 0 : _a.hide();\n };\n const beforeEnter = () => {\n emit(\"before-enter\");\n };\n const beforeLeave = () => {\n emit(\"before-leave\");\n };\n const afterEnter = () => {\n emit(\"after-enter\");\n };\n const afterLeave = () => {\n emit(\"update:visible\", false);\n emit(\"after-leave\");\n };\n expose({\n popperRef,\n hide\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(ElTooltip), mergeProps({\n ref_key: \"tooltipRef\",\n ref: tooltipRef\n }, _ctx.$attrs, {\n trigger: _ctx.trigger,\n placement: _ctx.placement,\n disabled: _ctx.disabled,\n visible: _ctx.visible,\n transition: _ctx.transition,\n \"popper-options\": _ctx.popperOptions,\n tabindex: _ctx.tabindex,\n content: _ctx.content,\n offset: _ctx.offset,\n \"show-after\": _ctx.showAfter,\n \"hide-after\": _ctx.hideAfter,\n \"auto-close\": _ctx.autoClose,\n \"show-arrow\": _ctx.showArrow,\n \"aria-label\": _ctx.title,\n effect: _ctx.effect,\n enterable: _ctx.enterable,\n \"popper-class\": unref(kls),\n \"popper-style\": unref(style),\n teleported: _ctx.teleported,\n persistent: _ctx.persistent,\n \"gpu-acceleration\": unref(gpuAcceleration),\n \"onUpdate:visible\": unref(onUpdateVisible),\n onBeforeShow: beforeEnter,\n onBeforeHide: beforeLeave,\n onShow: afterEnter,\n onHide: afterLeave\n }), {\n content: withCtx(() => [\n _ctx.title ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n class: normalizeClass(unref(ns).e(\"title\")),\n role: \"title\"\n }, toDisplayString(_ctx.title), 3)) : createCommentVNode(\"v-if\", true),\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.content), 1)\n ])\n ]),\n default: withCtx(() => [\n _ctx.$slots.reference ? renderSlot(_ctx.$slots, \"reference\", { key: 0 }) : createCommentVNode(\"v-if\", true)\n ]),\n _: 3\n }, 16, [\"trigger\", \"placement\", \"disabled\", \"visible\", \"transition\", \"popper-options\", \"tabindex\", \"content\", \"offset\", \"show-after\", \"hide-after\", \"auto-close\", \"show-arrow\", \"aria-label\", \"effect\", \"enterable\", \"popper-class\", \"popper-style\", \"teleported\", \"persistent\", \"gpu-acceleration\", \"onUpdate:visible\"]);\n };\n }\n});\nvar Popover = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__file\", \"/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue\"]]);\n\nexport { Popover as default };\n//# sourceMappingURL=popover2.mjs.map\n","const attachEvents = (el, binding) => {\n const popperComponent = binding.arg || binding.value;\n const popover = popperComponent == null ? void 0 : popperComponent.popperRef;\n if (popover) {\n popover.triggerRef = el;\n }\n};\nvar PopoverDirective = {\n mounted(el, binding) {\n attachEvents(el, binding);\n },\n updated(el, binding) {\n attachEvents(el, binding);\n }\n};\nconst VPopover = \"popover\";\n\nexport { VPopover, PopoverDirective as default };\n//# sourceMappingURL=directive.mjs.map\n","import '../../utils/index.mjs';\nimport Popover from './src/popover2.mjs';\nimport PopoverDirective, { VPopover } from './src/directive.mjs';\nexport { popoverEmits, popoverProps } from './src/popover.mjs';\nimport { withInstallDirective, withInstall } from '../../utils/vue/install.mjs';\n\nconst ElPopoverDirective = withInstallDirective(PopoverDirective, VPopover);\nconst ElPopover = withInstall(Popover, {\n directive: ElPopoverDirective\n});\n\nexport { ElPopover, ElPopoverDirective, ElPopover as default };\n//# sourceMappingURL=index.mjs.map\n","import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';\nimport _export_sfc from './_virtual/plugin-vue_export-helper.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"Bell\"\n});\nconst _hoisted_1 = {\n viewBox: \"0 0 1024 1024\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64z\"\n}, null, -1);\nconst _hoisted_3 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M256 768h512V448a256 256 0 1 0-512 0v320zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320z\"\n}, null, -1);\nconst _hoisted_4 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32zm352 128h128a64 64 0 0 1-128 0z\"\n}, null, -1);\nconst _hoisted_5 = [\n _hoisted_2,\n _hoisted_3,\n _hoisted_4\n];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1, _hoisted_5);\n}\nvar bell = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render]]);\n\nexport { bell as default };\n","import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';\nimport _export_sfc from './_virtual/plugin-vue_export-helper.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"Close\"\n});\nconst _hoisted_1 = {\n viewBox: \"0 0 1024 1024\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z\"\n}, null, -1);\nconst _hoisted_3 = [\n _hoisted_2\n];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1, _hoisted_3);\n}\nvar close = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render]]);\n\nexport { close as default };\n","import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';\nimport _export_sfc from './_virtual/plugin-vue_export-helper.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"Expand\"\n});\nconst _hoisted_1 = {\n viewBox: \"0 0 1024 1024\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M128 192h768v128H128V192zm0 256h512v128H128V448zm0 256h768v128H128V704zm576-352 192 160-192 128V352z\"\n}, null, -1);\nconst _hoisted_3 = [\n _hoisted_2\n];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1, _hoisted_3);\n}\nvar expand = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render]]);\n\nexport { expand as default };\n","<script lang=\"ts\" setup>\nimport { ref, reactive, onMounted, watch, computed } from 'vue'\nimport { useStore } from 'vuex'\nimport { formatDate } from '@/utils/stringUtil'\nimport { SuperUserApi } from '@/apis'\n\nconst props = defineProps<{\n data: SuperUserApiTypes.MessageItem[]\n autoShow?: boolean\n}>()\n\nconst dialogMessage = reactive({\n show: false,\n title: '系统消息',\n text: '内容'\n})\nconst activeMessage = ref<SuperUserApiTypes.MessageItem>(null)\nconst handleViewDialogMessage = (v: SuperUserApiTypes.MessageItem) => {\n activeMessage.value = v\n dialogMessage.text = v.text\n // TODO: 魔法数字问题\n // TODO:支持更多的消息类型\n dialogMessage.title = v.type === 0 ? '【系统消息】' : '【私信】'\n dialogMessage.show = true\n}\n\nconst readMessage = () => {\n if (activeMessage.value.read) {\n dialogMessage.show = false\n return\n }\n SuperUserApi.readMessage(activeMessage.value.id).then(() => {\n activeMessage.value.read = true\n dialogMessage.show = false\n })\n}\n\nwatch(\n () => props.data.length,\n () => {\n if (!props.autoShow) {\n return\n }\n const showItem = props.data.find((v) => !v.read)\n if (showItem) {\n handleViewDialogMessage(showItem)\n }\n }\n)\n\n// TODO:换成自定义hook\nconst $store = useStore()\nconst isMobile = computed(() => $store.getters['public/isMobile'])\n</script>\n<template>\n <div v-if=\"!data.length\" class=\"empty\">暂无更多消息 ღ( ´・ᴗ・` )比心</div>\n <ul class=\"message-list\">\n <li\n v-for=\"d in data\"\n :key=\"d.id\"\n :class=\"{\n read: d.read\n }\"\n @click=\"handleViewDialogMessage(d)\"\n >\n <p class=\"text\">{{ d.text }}</p>\n <p class=\"date\">{{ formatDate(new Date(d.date)) }}</p>\n </li>\n </ul>\n <el-dialog\n center\n show-close\n append-to-body\n v-model=\"dialogMessage.show\"\n :close-on-click-modal=\"false\"\n :title=\"dialogMessage.title\"\n width=\"30%\"\n :fullscreen=\"isMobile\"\n >\n <div class=\"message-text\" v-html=\"dialogMessage.text\"></div>\n <template #footer>\n <p class=\"dialog-date\">\n 时间:{{ formatDate(new Date(activeMessage.date)) }}\n </p>\n <span>\n <el-button\n type=\"default\"\n @click=\"\n () => {\n dialogMessage.show = false\n }\n \"\n >\n 下次提醒\n </el-button>\n <el-button type=\"primary\" @click=\"readMessage\"> 确定 </el-button>\n </span>\n </template>\n </el-dialog>\n</template>\n\n<style lang=\"scss\" scoped>\n.message-list {\n list-style: none;\n max-height: 500px;\n overflow-y: scroll;\n li {\n border-bottom: 1px solid #ddd;\n padding: 10px;\n cursor: pointer;\n &.read {\n opacity: 0.5;\n &:hover {\n opacity: 0.9;\n }\n }\n &:last-child {\n border-bottom: none;\n }\n\n p.text {\n font-size: 16px;\n display: -webkit-box;\n overflow: hidden;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n p.date {\n font-size: 14px;\n margin-top: 4px;\n }\n }\n}\n.empty {\n text-align: center;\n padding: 10px;\n}\n\n.dialog-date {\n font-size: 14px;\n text-align: right;\n padding: 10px;\n color: grey;\n}\n</style>\n<style lang=\"scss\">\n.message-text {\n overflow-y: scroll;\n max-height: 500px;\n ul,\n ol {\n list-style: none;\n }\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { Bell } from '@element-plus/icons-vue'\nimport { computed, reactive, onMounted, ref } from 'vue'\nimport { useRoute } from 'vue-router'\nimport { SuperUserApi } from '@/apis'\nimport MessageList from '@/components/MessageList/index.vue'\n\nconst activeTab = ref<'all' | 'no'>('all')\nconst messageData = reactive<SuperUserApiTypes.MessageItem[]>([])\n\nconst noReadMessage = computed(() => messageData.filter((v) => !v.read))\nconst route = useRoute()\nonMounted(() => {\n if (route.name !== 'config') {\n SuperUserApi.getMessageList().then((v) => {\n messageData.push(...v.data)\n })\n }\n})\n</script>\n<template>\n <div class=\"message-panel\">\n <el-popover placement=\"bottom-end\" :width=\"375\" trigger=\"hover\">\n <template #reference>\n <el-badge :value=\"noReadMessage.length || ''\" :max=\"99\">\n <el-button :icon=\"Bell\" circle />\n </el-badge>\n </template>\n <div>\n <el-tabs v-model=\"activeTab\">\n <el-tab-pane :label=\"`未读 ${noReadMessage.length || ''}`\" name=\"no\">\n <message-list auto-show :data=\"noReadMessage\" />\n </el-tab-pane>\n <el-tab-pane :label=\"`全部 ${messageData.length || ''}`\" name=\"all\">\n <message-list :data=\"messageData\" />\n </el-tab-pane>\n </el-tabs>\n </div>\n </el-popover>\n </div>\n</template>\n<style lang=\"scss\" scoped>\n.message-panel {\n margin-right: 10px;\n}\n</style>\n","<template>\n <div class=\"dashboard\">\n <div class=\"pc-nav\">\n <div class=\"nav\">\n <!-- LOGO -->\n <div class=\"logo\">\n <router-link to=\"/\">\n <img\n src=\"https://img.cdn.sugarat.top/easypicker/EasyPicker.png\"\n alt=\"logo\"\n />\n </router-link>\n </div>\n <input v-if=\"isMobile\" type=\"checkbox\" id=\"navActive\" />\n <nav>\n <label v-if=\"isMobile\" for=\"navActive\" class=\"nav-item\">\n <span>Hello💐,</span>\n {{ userName }}\n </label>\n <label\n for=\"navActive\"\n class=\"nav-item\"\n v-for=\"(n, idx) in navList\"\n :key=\"idx\"\n :class=\"{\n active: navActiveIdx === idx\n }\"\n @click=\"handleNav(idx)\"\n >{{ n.title }}</label\n >\n <label\n @click=\"handleLogout\"\n v-if=\"isMobile\"\n for=\"navActive\"\n class=\"nav-item\"\n >\n <span style=\"margin-right: 6px\">退出</span>\n <el-icon size=\"16\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-v-53d86618\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M10.6667 2.55473C13.0212 3.58347 14.6667 5.93291 14.6667 8.66667C14.6667 12.3486 11.6819 15.3333 8 15.3333C4.3181 15.3333 1.33333 12.3486 1.33333 8.66667C1.33333 5.93291 2.97879 3.58347 5.33333 2.55473V4.04684C3.7392 4.969 2.66667 6.69259 2.66667 8.66667C2.66667 11.6122 5.05448 14 8 14C10.9455 14 13.3333 11.6122 13.3333 8.66667C13.3333 6.69259 12.2608 4.969 10.6667 4.04684V2.55473ZM7.33333 8.66667V1.33333C7.33333 1.14924 7.48257 1 7.66667 1H8.33333C8.51743 1 8.66667 1.14924 8.66667 1.33333V8.66667C8.66667 8.85076 8.51743 9 8.33333 9H7.66667C7.48257 9 7.33333 8.85076 7.33333 8.66667Z\"\n fill=\"#86909C\"\n data-v-53d86618\n />\n </svg>\n </el-icon>\n </label>\n </nav>\n <div class=\"mask\"></div>\n </div>\n <!-- 移动端展示 -->\n <span id=\"navMenu\">\n <message-panel v-if=\"isMobile\" class=\"mobile-message-bell\" />\n <label for=\"navActive\">\n <el-icon size=\"32\">\n <Expand />\n </el-icon>\n </label>\n </span>\n <div class=\"flex fac\" v-if=\"!isMobile\">\n <message-panel />\n <span>Hello 💐,</span>\n <el-dropdown class=\"exit\">\n <span class=\"exit-info\">\n <span class=\"ellipsis\">{{ userName }}</span>\n <el-icon>\n <ArrowDown />\n </el-icon>\n </span>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"handleLogout\" :icon=\"Close\"\n >退出</el-dropdown-item\n >\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n </div>\n </div>\n <router-view></router-view>\n <div>\n <home-footer type=\"dashboard\"></home-footer>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { Expand, Close, ArrowDown, Bell } from '@element-plus/icons-vue'\nimport HomeFooter from '@components/HomeFooter/index.vue'\n\nimport { onMounted, reactive, ref, computed, watch } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useStore } from 'vuex'\nimport { ElMessage, ElMessageBox } from 'element-plus'\nimport MessagePanel from '@/components/MessagePanel/index.vue'\nimport { UserApi } from '@/apis'\n\nconst $router = useRouter()\nconst $store = useStore()\nconst $route = useRoute()\nconst isMobile = computed(() => $store.getters['public/isMobile'])\nconst navList = reactive<\n { title: string; path: string; isExternal?: boolean }[]\n>([\n {\n title: '文件管理',\n path: '/dashboard/files'\n },\n {\n title: '任务管理',\n path: '/dashboard/tasks'\n }\n])\nconst navActiveIdx = ref(0)\nconst handleNav = (idx: number) => {\n const n = navList[idx]\n if (!n.isExternal && idx !== navActiveIdx.value) {\n $router.push({\n path: n.path\n })\n }\n if (n.isExternal) {\n window.open(n.path, '_blank')\n }\n}\n\n// 自动切换激活的标题栏\nwatch(\n () => $route.path,\n (path: string) => {\n const idx = navList.findIndex((n) => path.startsWith(n.path))\n if (idx !== -1) {\n navActiveIdx.value = idx\n }\n }\n)\n\nconst handleLogout = () => {\n ElMessageBox.confirm('确认退出登录?', '登出提示', {\n draggable: true\n })\n .then(() => {\n // 登出接口\n UserApi.logout().finally(() => {\n $store.commit('user/setToken', null)\n $router.replace({\n name: 'home'\n })\n })\n })\n .catch(() => {\n ElMessage.info('取消')\n })\n}\nconst userName = ref('World')\n\nconst refreshActiveTab = () => {\n // 动态修改active的项\n navActiveIdx.value = navList.findIndex((v) => $route.path.startsWith(v.path))\n}\nonMounted(() => {\n // 动态添加管理页面入口\n UserApi.checkPower().then((r) => {\n const isSuperAdmin = r.data?.power\n userName.value = r.data?.name\n $store.commit('user/setSuperAdmin', isSuperAdmin)\n if (isSuperAdmin) {\n const superNavList = [\n {\n title: '应用管理',\n path: '/dashboard/manage'\n },\n {\n title: '网站监控',\n path: 'https://www.frontjs.com/app/87c1ef7667a513f313b4abb22a88dc78',\n isExternal: true\n }\n ]\n navList.push(...superNavList)\n }\n const isSystem = r.data?.system\n if (isSystem) {\n navList.splice(0, navList.length)\n navList.push({\n title: '系统管理',\n path: '/dashboard/config'\n })\n }\n refreshActiveTab()\n })\n})\n</script>\n<style scoped lang=\"scss\">\n.dashboard {\n background-color: #fafafa;\n}\n.pc-nav {\n background-color: #fff;\n display: flex;\n padding: 10px;\n justify-content: space-between;\n align-items: center;\n .exit {\n cursor: pointer;\n display: flex;\n align-items: center;\n .exit-info {\n display: flex;\n justify-content: center;\n align-items: center;\n > span {\n margin-right: 5px;\n display: block;\n max-width: 70px;\n }\n }\n }\n .nav {\n display: flex;\n nav {\n display: flex;\n align-items: center;\n .nav-item {\n font-size: 1rem;\n color: #595959;\n padding: 10px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n &.active {\n color: #409eff !important;\n font-weight: 600;\n }\n }\n }\n .exit {\n color: #595959;\n }\n }\n .logo {\n width: 180px;\n margin: 0 10px;\n img {\n height: 40px;\n }\n }\n}\n#navActive {\n display: none;\n opacity: 0;\n}\n#navMenu {\n display: none;\n}\n.mobile-message-bell {\n display: none;\n position: fixed;\n right: 0;\n top: 0;\n}\n@media screen and (max-width: 700px) {\n #navActive {\n display: block;\n position: fixed;\n left: 0;\n top: 0;\n }\n .mobile-message-bell {\n display: block;\n }\n #navMenu {\n cursor: pointer;\n display: block;\n position: absolute;\n left: 10px;\n top: 5px;\n font-size: 2rem;\n }\n .pc-nav {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n z-index: 6;\n .nav {\n flex-wrap: wrap;\n width: 100%;\n .logo {\n width: 100%;\n text-align: center;\n }\n }\n #navActive {\n & + nav {\n display: none;\n }\n }\n #navActive:checked {\n & + nav {\n display: flex;\n flex-direction: column;\n width: 100%;\n position: absolute;\n z-index: 1;\n background: #fff;\n left: 0;\n top: 50px;\n + .mask {\n display: block;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 50px;\n background-color: rgba(0, 0, 0, 0.5);\n }\n }\n }\n .exit {\n position: absolute;\n right: 10px;\n top: 20px;\n }\n }\n}\n</style>\n"],"names":["popoverProps","buildProps","useTooltipTriggerProps","dropdownProps","useTooltipContentProps","popoverEmits","value","isBoolean","__default__","_sfc_main","defineComponent","__props","expose","emit","props","updateEventKeyRaw","onUpdateVisible","computed","ns","useNamespace","tooltipRef","ref","popperRef","_a","unref","style","addUnit","kls","gpuAcceleration","hide","beforeEnter","beforeLeave","afterEnter","afterLeave","_ctx","_cache","openBlock","createBlock","ElTooltip","mergeProps","withCtx","createElementBlock","normalizeClass","toDisplayString","createCommentVNode","renderSlot","createTextVNode","Popover","_export_sfc","attachEvents","el","binding","popperComponent","popover","PopoverDirective","VPopover","ElPopoverDirective","withInstallDirective","ElPopover","withInstall","_hoisted_1","_hoisted_2","createElementVNode","_hoisted_3","_hoisted_4","_hoisted_5","_sfc_render","$props","$setup","$data","$options","bell","close","expand","dialogMessage","reactive","activeMessage","handleViewDialogMessage","v","readMessage","SuperUserApi","watch","showItem","$store","useStore","isMobile","activeTab","messageData","noReadMessage","route","useRoute","onMounted","$router","useRouter","$route","navList","navActiveIdx","handleNav","idx","n","path","handleLogout","ElMessageBox","UserApi","ElMessage","userName","refreshActiveTab","r","isSuperAdmin","_b","superNavList","_c"],"mappings":"urBAQA,MAAMA,GAAeC,GAAW,CAC9B,QAASC,EAAuB,QAChC,UAAWC,EAAc,UACzB,SAAUD,EAAuB,SACjC,QAASE,EAAuB,QAChC,WAAYA,EAAuB,WACnC,cAAeD,EAAc,cAC7B,SAAUA,EAAc,SACxB,QAASC,EAAuB,QAChC,YAAaA,EAAuB,YACpC,YAAaA,EAAuB,YACpC,UAAW,CACT,GAAGA,EAAuB,UAC1B,QAAS,EACV,EACD,OAAQ,CACN,GAAGA,EAAuB,OAC1B,QAAS,OACV,EACD,WAAY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IAAA,CAAA,EACAD,IAAA,KACEF,EAAA,MAAAE,EACF,CACF,EAGF,MAAAG,EAAA,IAAA,CACEC,GAAA,QAAA,UAAA,OAAA,CAAwC,UAAA,EAC3B,CAAA,EAAA,KAAA,IAAA,CAITC,EAAA,SAAA,QAAA,IAAA,CACEpB,EAAA,OAAA,gBAAA,IAAA,EACAS,EAAA,QAAA,CAAgB,KAAA,MACR,CAAA,CACP,CAAA,CACF,CAAA,EAAA,MAAA,IAAA,CAGDY,GAAA,KAAA,IAAA,CAAmB,CAAA,CACpB,EAELC,EAAApF,EAAA,OAAA,EAEAqF,EAAA,IAAA,CAEEV,EAAA,MAAAD,EAAA,UAAAjB,GAAAgB,EAAA,KAAA,WAAAhB,EAAA,IAAA,CAAA,CAA4E,EAE9E,OAAAa,GAAA,IAAA,CAEEY,EAAA,WAAA,EAAA,KAAAI,GAAA,WACE,MAAAC,GAAArF,EAAAoF,EAAA,OAAA,YAAApF,EAAA,MAGA,GAFAkF,EAAA,OAAAI,EAAAF,EAAA,OAAA,YAAAE,EAAA,KACA1B,EAAA,OAAA,qBAAAyB,CAAA,EACAA,EAAA,CACE,MAAAE,EAAA,CAAqB,CACnB,MAAA,OACS,KAAA,mBACD,EACR,CACA,MAAA,OACS,KAAA,+DACD,WAAA,EACM,CACd,EAEFf,EAAA,KAAA,GAAAe,CAAA,CAA4B,GAE9BC,EAAAJ,EAAA,OAAA,YAAAI,EAAA,UAEEhB,EAAA,OAAA,EAAAA,EAAA,MAAA,EACAA,EAAA,KAAA,CAAa,MAAA,OACJ,KAAA,mBACD,CAAA,GAGVW,GAAiB,CAAA,CAClB,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
|
1
|
+
{"version":3,"file":"index-adc1b681.js","sources":["../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/popover/src/popover.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/popover/src/popover2.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/popover/src/directive.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/popover/index.mjs","../../node_modules/.pnpm/@element-plus+icons-vue@1.1.4_vue@3.3.4/node_modules/@element-plus/icons-vue/dist/es/bell.mjs","../../node_modules/.pnpm/@element-plus+icons-vue@1.1.4_vue@3.3.4/node_modules/@element-plus/icons-vue/dist/es/close.mjs","../../node_modules/.pnpm/@element-plus+icons-vue@1.1.4_vue@3.3.4/node_modules/@element-plus/icons-vue/dist/es/expand.mjs","../../src/components/MessageList/index.vue","../../src/components/MessagePanel/index.vue","../../src/pages/dashboard/index.vue"],"sourcesContent":["import '../../../utils/index.mjs';\nimport '../../tooltip/index.mjs';\nimport '../../dropdown/index.mjs';\nimport { buildProps } from '../../../utils/vue/props/runtime.mjs';\nimport { useTooltipTriggerProps, useTooltipContentProps } from '../../tooltip/src/tooltip.mjs';\nimport { dropdownProps } from '../../dropdown/src/dropdown.mjs';\nimport { isBoolean } from '@vueuse/core';\n\nconst popoverProps = buildProps({\n trigger: useTooltipTriggerProps.trigger,\n placement: dropdownProps.placement,\n disabled: useTooltipTriggerProps.disabled,\n visible: useTooltipContentProps.visible,\n transition: useTooltipContentProps.transition,\n popperOptions: dropdownProps.popperOptions,\n tabindex: dropdownProps.tabindex,\n content: useTooltipContentProps.content,\n popperStyle: useTooltipContentProps.popperStyle,\n popperClass: useTooltipContentProps.popperClass,\n enterable: {\n ...useTooltipContentProps.enterable,\n default: true\n },\n effect: {\n ...useTooltipContentProps.effect,\n default: \"light\"\n },\n teleported: useTooltipContentProps.teleported,\n title: String,\n width: {\n type: [String, Number],\n default: 150\n },\n offset: {\n type: Number,\n default: void 0\n },\n showAfter: {\n type: Number,\n default: 0\n },\n hideAfter: {\n type: Number,\n default: 200\n },\n autoClose: {\n type: Number,\n default: 0\n },\n showArrow: {\n type: Boolean,\n default: true\n },\n persistent: {\n type: Boolean,\n default: true\n },\n \"onUpdate:visible\": {\n type: Function\n }\n});\nconst popoverEmits = {\n \"update:visible\": (value) => isBoolean(value),\n \"before-enter\": () => true,\n \"before-leave\": () => true,\n \"after-enter\": () => true,\n \"after-leave\": () => true\n};\n\nexport { popoverEmits, popoverProps };\n//# sourceMappingURL=popover.mjs.map\n","import { defineComponent, computed, ref, unref, openBlock, createBlock, mergeProps, withCtx, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, renderSlot, createTextVNode } from 'vue';\nimport { ElTooltip } from '../../tooltip/index.mjs';\nimport '../../../utils/index.mjs';\nimport '../../../hooks/index.mjs';\nimport { popoverProps, popoverEmits } from './popover.mjs';\nimport _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';\nimport { useNamespace } from '../../../hooks/use-namespace/index.mjs';\nimport { addUnit } from '../../../utils/dom/style.mjs';\n\nconst __default__ = {\n name: \"ElPopover\"\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...__default__,\n props: popoverProps,\n emits: popoverEmits,\n setup(__props, { expose, emit }) {\n const props = __props;\n const updateEventKeyRaw = `onUpdate:visible`;\n const onUpdateVisible = computed(() => {\n return props[updateEventKeyRaw];\n });\n const ns = useNamespace(\"popover\");\n const tooltipRef = ref();\n const popperRef = computed(() => {\n var _a;\n return (_a = unref(tooltipRef)) == null ? void 0 : _a.popperRef;\n });\n const style = computed(() => {\n return [\n {\n width: addUnit(props.width)\n },\n props.popperStyle\n ];\n });\n const kls = computed(() => {\n return [ns.b(), props.popperClass, { [ns.m(\"plain\")]: !!props.content }];\n });\n const gpuAcceleration = computed(() => {\n return props.transition === \"el-fade-in-linear\";\n });\n const hide = () => {\n var _a;\n (_a = tooltipRef.value) == null ? void 0 : _a.hide();\n };\n const beforeEnter = () => {\n emit(\"before-enter\");\n };\n const beforeLeave = () => {\n emit(\"before-leave\");\n };\n const afterEnter = () => {\n emit(\"after-enter\");\n };\n const afterLeave = () => {\n emit(\"update:visible\", false);\n emit(\"after-leave\");\n };\n expose({\n popperRef,\n hide\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(ElTooltip), mergeProps({\n ref_key: \"tooltipRef\",\n ref: tooltipRef\n }, _ctx.$attrs, {\n trigger: _ctx.trigger,\n placement: _ctx.placement,\n disabled: _ctx.disabled,\n visible: _ctx.visible,\n transition: _ctx.transition,\n \"popper-options\": _ctx.popperOptions,\n tabindex: _ctx.tabindex,\n content: _ctx.content,\n offset: _ctx.offset,\n \"show-after\": _ctx.showAfter,\n \"hide-after\": _ctx.hideAfter,\n \"auto-close\": _ctx.autoClose,\n \"show-arrow\": _ctx.showArrow,\n \"aria-label\": _ctx.title,\n effect: _ctx.effect,\n enterable: _ctx.enterable,\n \"popper-class\": unref(kls),\n \"popper-style\": unref(style),\n teleported: _ctx.teleported,\n persistent: _ctx.persistent,\n \"gpu-acceleration\": unref(gpuAcceleration),\n \"onUpdate:visible\": unref(onUpdateVisible),\n onBeforeShow: beforeEnter,\n onBeforeHide: beforeLeave,\n onShow: afterEnter,\n onHide: afterLeave\n }), {\n content: withCtx(() => [\n _ctx.title ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n class: normalizeClass(unref(ns).e(\"title\")),\n role: \"title\"\n }, toDisplayString(_ctx.title), 3)) : createCommentVNode(\"v-if\", true),\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.content), 1)\n ])\n ]),\n default: withCtx(() => [\n _ctx.$slots.reference ? renderSlot(_ctx.$slots, \"reference\", { key: 0 }) : createCommentVNode(\"v-if\", true)\n ]),\n _: 3\n }, 16, [\"trigger\", \"placement\", \"disabled\", \"visible\", \"transition\", \"popper-options\", \"tabindex\", \"content\", \"offset\", \"show-after\", \"hide-after\", \"auto-close\", \"show-arrow\", \"aria-label\", \"effect\", \"enterable\", \"popper-class\", \"popper-style\", \"teleported\", \"persistent\", \"gpu-acceleration\", \"onUpdate:visible\"]);\n };\n }\n});\nvar Popover = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__file\", \"/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue\"]]);\n\nexport { Popover as default };\n//# sourceMappingURL=popover2.mjs.map\n","const attachEvents = (el, binding) => {\n const popperComponent = binding.arg || binding.value;\n const popover = popperComponent == null ? void 0 : popperComponent.popperRef;\n if (popover) {\n popover.triggerRef = el;\n }\n};\nvar PopoverDirective = {\n mounted(el, binding) {\n attachEvents(el, binding);\n },\n updated(el, binding) {\n attachEvents(el, binding);\n }\n};\nconst VPopover = \"popover\";\n\nexport { VPopover, PopoverDirective as default };\n//# sourceMappingURL=directive.mjs.map\n","import '../../utils/index.mjs';\nimport Popover from './src/popover2.mjs';\nimport PopoverDirective, { VPopover } from './src/directive.mjs';\nexport { popoverEmits, popoverProps } from './src/popover.mjs';\nimport { withInstallDirective, withInstall } from '../../utils/vue/install.mjs';\n\nconst ElPopoverDirective = withInstallDirective(PopoverDirective, VPopover);\nconst ElPopover = withInstall(Popover, {\n directive: ElPopoverDirective\n});\n\nexport { ElPopover, ElPopoverDirective, ElPopover as default };\n//# sourceMappingURL=index.mjs.map\n","import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';\nimport _export_sfc from './_virtual/plugin-vue_export-helper.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"Bell\"\n});\nconst _hoisted_1 = {\n viewBox: \"0 0 1024 1024\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64z\"\n}, null, -1);\nconst _hoisted_3 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M256 768h512V448a256 256 0 1 0-512 0v320zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320z\"\n}, null, -1);\nconst _hoisted_4 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32zm352 128h128a64 64 0 0 1-128 0z\"\n}, null, -1);\nconst _hoisted_5 = [\n _hoisted_2,\n _hoisted_3,\n _hoisted_4\n];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1, _hoisted_5);\n}\nvar bell = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render]]);\n\nexport { bell as default };\n","import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';\nimport _export_sfc from './_virtual/plugin-vue_export-helper.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"Close\"\n});\nconst _hoisted_1 = {\n viewBox: \"0 0 1024 1024\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z\"\n}, null, -1);\nconst _hoisted_3 = [\n _hoisted_2\n];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1, _hoisted_3);\n}\nvar close = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render]]);\n\nexport { close as default };\n","import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';\nimport _export_sfc from './_virtual/plugin-vue_export-helper.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"Expand\"\n});\nconst _hoisted_1 = {\n viewBox: \"0 0 1024 1024\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M128 192h768v128H128V192zm0 256h512v128H128V448zm0 256h768v128H128V704zm576-352 192 160-192 128V352z\"\n}, null, -1);\nconst _hoisted_3 = [\n _hoisted_2\n];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", _hoisted_1, _hoisted_3);\n}\nvar expand = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render]]);\n\nexport { expand as default };\n","<script lang=\"ts\" setup>\nimport { ref, reactive, onMounted, watch, computed } from 'vue'\nimport { useStore } from 'vuex'\nimport { formatDate } from '@/utils/stringUtil'\nimport { SuperUserApi } from '@/apis'\n\nconst props = defineProps<{\n data: SuperUserApiTypes.MessageItem[]\n autoShow?: boolean\n}>()\n\nconst dialogMessage = reactive({\n show: false,\n title: '系统消息',\n text: '内容'\n})\nconst activeMessage = ref<SuperUserApiTypes.MessageItem>(null)\nconst handleViewDialogMessage = (v: SuperUserApiTypes.MessageItem) => {\n activeMessage.value = v\n dialogMessage.text = v.text\n // TODO: 魔法数字问题\n // TODO:支持更多的消息类型\n dialogMessage.title = v.type === 0 ? '【系统消息】' : '【私信】'\n dialogMessage.show = true\n}\n\nconst readMessage = () => {\n if (activeMessage.value.read) {\n dialogMessage.show = false\n return\n }\n SuperUserApi.readMessage(activeMessage.value.id).then(() => {\n activeMessage.value.read = true\n dialogMessage.show = false\n })\n}\n\nwatch(\n () => props.data.length,\n () => {\n if (!props.autoShow) {\n return\n }\n const showItem = props.data.find((v) => !v.read)\n if (showItem) {\n handleViewDialogMessage(showItem)\n }\n }\n)\n\n// TODO:换成自定义hook\nconst $store = useStore()\nconst isMobile = computed(() => $store.getters['public/isMobile'])\n</script>\n<template>\n <div v-if=\"!data.length\" class=\"empty\">暂无更多消息 ღ( ´・ᴗ・` )比心</div>\n <ul class=\"message-list\">\n <li\n v-for=\"d in data\"\n :key=\"d.id\"\n :class=\"{\n read: d.read\n }\"\n @click=\"handleViewDialogMessage(d)\"\n >\n <p class=\"text\">{{ d.text }}</p>\n <p class=\"date\">{{ formatDate(new Date(d.date)) }}</p>\n </li>\n </ul>\n <el-dialog\n center\n show-close\n append-to-body\n v-model=\"dialogMessage.show\"\n :close-on-click-modal=\"false\"\n :title=\"dialogMessage.title\"\n width=\"30%\"\n :fullscreen=\"isMobile\"\n >\n <div class=\"message-text\" v-html=\"dialogMessage.text\"></div>\n <template #footer>\n <p class=\"dialog-date\">\n 时间:{{ formatDate(new Date(activeMessage.date)) }}\n </p>\n <span>\n <el-button\n type=\"default\"\n @click=\"\n () => {\n dialogMessage.show = false\n }\n \"\n >\n 下次提醒\n </el-button>\n <el-button type=\"primary\" @click=\"readMessage\"> 确定 </el-button>\n </span>\n </template>\n </el-dialog>\n</template>\n\n<style lang=\"scss\" scoped>\n.message-list {\n list-style: none;\n max-height: 500px;\n overflow-y: scroll;\n li {\n border-bottom: 1px solid #ddd;\n padding: 10px;\n cursor: pointer;\n &.read {\n opacity: 0.5;\n &:hover {\n opacity: 0.9;\n }\n }\n &:last-child {\n border-bottom: none;\n }\n\n p.text {\n font-size: 16px;\n display: -webkit-box;\n overflow: hidden;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n p.date {\n font-size: 14px;\n margin-top: 4px;\n }\n }\n}\n.empty {\n text-align: center;\n padding: 10px;\n}\n\n.dialog-date {\n font-size: 14px;\n text-align: right;\n padding: 10px;\n color: grey;\n}\n</style>\n<style lang=\"scss\">\n.message-text {\n overflow-y: scroll;\n max-height: 500px;\n ul,\n ol {\n list-style: none;\n }\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { Bell } from '@element-plus/icons-vue'\nimport { computed, reactive, onMounted, ref } from 'vue'\nimport { useRoute } from 'vue-router'\nimport { SuperUserApi } from '@/apis'\nimport MessageList from '@/components/MessageList/index.vue'\n\nconst activeTab = ref<'all' | 'no'>('all')\nconst messageData = reactive<SuperUserApiTypes.MessageItem[]>([])\n\nconst noReadMessage = computed(() => messageData.filter((v) => !v.read))\nconst route = useRoute()\nonMounted(() => {\n if (route.name !== 'config') {\n SuperUserApi.getMessageList().then((v) => {\n messageData.push(...v.data)\n })\n }\n})\n</script>\n<template>\n <div class=\"message-panel\">\n <el-popover placement=\"bottom-end\" :width=\"375\" trigger=\"hover\">\n <template #reference>\n <el-badge :value=\"noReadMessage.length || ''\" :max=\"99\">\n <el-button :icon=\"Bell\" circle />\n </el-badge>\n </template>\n <div>\n <el-tabs v-model=\"activeTab\">\n <el-tab-pane :label=\"`未读 ${noReadMessage.length || ''}`\" name=\"no\">\n <message-list auto-show :data=\"noReadMessage\" />\n </el-tab-pane>\n <el-tab-pane :label=\"`全部 ${messageData.length || ''}`\" name=\"all\">\n <message-list :data=\"messageData\" />\n </el-tab-pane>\n </el-tabs>\n </div>\n </el-popover>\n </div>\n</template>\n<style lang=\"scss\" scoped>\n.message-panel {\n margin-right: 10px;\n}\n</style>\n","<template>\n <div class=\"dashboard\">\n <div class=\"pc-nav\">\n <div class=\"nav\">\n <!-- LOGO -->\n <div class=\"logo\">\n <router-link to=\"/\">\n <img\n src=\"https://img.cdn.sugarat.top/easypicker/EasyPicker.png\"\n alt=\"logo\"\n />\n </router-link>\n </div>\n <input v-if=\"isMobile\" type=\"checkbox\" id=\"navActive\" />\n <nav>\n <label v-if=\"isMobile\" for=\"navActive\" class=\"nav-item\">\n <span>Hello💐,</span>\n {{ userName }}\n </label>\n <label\n for=\"navActive\"\n class=\"nav-item\"\n v-for=\"(n, idx) in navList\"\n :key=\"idx\"\n :class=\"{\n active: navActiveIdx === idx\n }\"\n @click=\"handleNav(idx)\"\n >{{ n.title }}</label\n >\n <label\n @click=\"handleLogout\"\n v-if=\"isMobile\"\n for=\"navActive\"\n class=\"nav-item\"\n >\n <span style=\"margin-right: 6px\">退出</span>\n <el-icon size=\"16\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-v-53d86618\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M10.6667 2.55473C13.0212 3.58347 14.6667 5.93291 14.6667 8.66667C14.6667 12.3486 11.6819 15.3333 8 15.3333C4.3181 15.3333 1.33333 12.3486 1.33333 8.66667C1.33333 5.93291 2.97879 3.58347 5.33333 2.55473V4.04684C3.7392 4.969 2.66667 6.69259 2.66667 8.66667C2.66667 11.6122 5.05448 14 8 14C10.9455 14 13.3333 11.6122 13.3333 8.66667C13.3333 6.69259 12.2608 4.969 10.6667 4.04684V2.55473ZM7.33333 8.66667V1.33333C7.33333 1.14924 7.48257 1 7.66667 1H8.33333C8.51743 1 8.66667 1.14924 8.66667 1.33333V8.66667C8.66667 8.85076 8.51743 9 8.33333 9H7.66667C7.48257 9 7.33333 8.85076 7.33333 8.66667Z\"\n fill=\"#86909C\"\n data-v-53d86618\n />\n </svg>\n </el-icon>\n </label>\n </nav>\n <div class=\"mask\"></div>\n </div>\n <!-- 移动端展示 -->\n <span id=\"navMenu\">\n <message-panel v-if=\"isMobile\" class=\"mobile-message-bell\" />\n <label for=\"navActive\">\n <el-icon size=\"32\">\n <Expand />\n </el-icon>\n </label>\n </span>\n <div class=\"flex fac\" v-if=\"!isMobile\">\n <message-panel />\n <span>Hello 💐,</span>\n <el-dropdown class=\"exit\">\n <span class=\"exit-info\">\n <span class=\"ellipsis\">{{ userName }}</span>\n <el-icon>\n <ArrowDown />\n </el-icon>\n </span>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"handleLogout\" :icon=\"Close\"\n >退出</el-dropdown-item\n >\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n </div>\n </div>\n <router-view></router-view>\n <div>\n <home-footer type=\"dashboard\"></home-footer>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { Expand, Close, ArrowDown, Bell } from '@element-plus/icons-vue'\nimport HomeFooter from '@components/HomeFooter/index.vue'\n\nimport { onMounted, reactive, ref, computed, watch } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useStore } from 'vuex'\nimport { ElMessage, ElMessageBox } from 'element-plus'\nimport MessagePanel from '@/components/MessagePanel/index.vue'\nimport { UserApi } from '@/apis'\n\nconst $router = useRouter()\nconst $store = useStore()\nconst $route = useRoute()\nconst isMobile = computed(() => $store.getters['public/isMobile'])\nconst navList = reactive<\n { title: string; path: string; isExternal?: boolean }[]\n>([\n {\n title: '文件管理',\n path: '/dashboard/files'\n },\n {\n title: '任务管理',\n path: '/dashboard/tasks'\n }\n])\nconst navActiveIdx = ref(0)\nconst handleNav = (idx: number) => {\n const n = navList[idx]\n if (!n.isExternal && idx !== navActiveIdx.value) {\n $router.push({\n path: n.path\n })\n }\n if (n.isExternal) {\n window.open(n.path, '_blank')\n }\n}\n\n// 自动切换激活的标题栏\nwatch(\n () => $route.path,\n (path: string) => {\n const idx = navList.findIndex((n) => path.startsWith(n.path))\n if (idx !== -1) {\n navActiveIdx.value = idx\n }\n }\n)\n\nconst handleLogout = () => {\n ElMessageBox.confirm('确认退出登录?', '登出提示', {\n draggable: true\n })\n .then(() => {\n // 登出接口\n UserApi.logout().finally(() => {\n $store.commit('user/setToken', null)\n $router.replace({\n name: 'home'\n })\n })\n })\n .catch(() => {\n ElMessage.info('取消')\n })\n}\nconst userName = ref('World')\n\nconst refreshActiveTab = () => {\n // 动态修改active的项\n navActiveIdx.value = navList.findIndex((v) => $route.path.startsWith(v.path))\n}\nonMounted(() => {\n // 动态添加管理页面入口\n UserApi.checkPower().then((r) => {\n const isSuperAdmin = r.data?.power\n userName.value = r.data?.name\n $store.commit('user/setSuperAdmin', isSuperAdmin)\n if (isSuperAdmin) {\n const superNavList = [\n {\n title: '应用管理',\n path: '/dashboard/manage'\n },\n {\n title: '网站监控',\n path: 'https://www.frontjs.com/app/87c1ef7667a513f313b4abb22a88dc78',\n isExternal: true\n }\n ]\n navList.push(...superNavList)\n }\n const isSystem = r.data?.system\n if (isSystem) {\n navList.splice(0, navList.length)\n navList.push({\n title: '系统管理',\n path: '/dashboard/config'\n })\n }\n refreshActiveTab()\n })\n})\n</script>\n<style scoped lang=\"scss\">\n.dashboard {\n background-color: #fafafa;\n}\n.pc-nav {\n background-color: #fff;\n display: flex;\n padding: 10px;\n justify-content: space-between;\n align-items: center;\n .exit {\n cursor: pointer;\n display: flex;\n align-items: center;\n .exit-info {\n display: flex;\n justify-content: center;\n align-items: center;\n > span {\n margin-right: 5px;\n display: block;\n max-width: 70px;\n }\n }\n }\n .nav {\n display: flex;\n nav {\n display: flex;\n align-items: center;\n .nav-item {\n font-size: 1rem;\n color: #595959;\n padding: 10px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n &.active {\n color: #409eff !important;\n font-weight: 600;\n }\n }\n }\n .exit {\n color: #595959;\n }\n }\n .logo {\n width: 180px;\n margin: 0 10px;\n img {\n height: 40px;\n }\n }\n}\n#navActive {\n display: none;\n opacity: 0;\n}\n#navMenu {\n display: none;\n}\n.mobile-message-bell {\n display: none;\n position: fixed;\n right: 0;\n top: 0;\n}\n@media screen and (max-width: 700px) {\n #navActive {\n display: block;\n position: fixed;\n left: 0;\n top: 0;\n }\n .mobile-message-bell {\n display: block;\n }\n #navMenu {\n cursor: pointer;\n display: block;\n position: absolute;\n left: 10px;\n top: 5px;\n font-size: 2rem;\n }\n .pc-nav {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n z-index: 6;\n .nav {\n flex-wrap: wrap;\n width: 100%;\n .logo {\n width: 100%;\n text-align: center;\n }\n }\n #navActive {\n & + nav {\n display: none;\n }\n }\n #navActive:checked {\n & + nav {\n display: flex;\n flex-direction: column;\n width: 100%;\n position: absolute;\n z-index: 1;\n background: #fff;\n left: 0;\n top: 50px;\n + .mask {\n display: block;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 50px;\n background-color: rgba(0, 0, 0, 0.5);\n }\n }\n }\n .exit {\n position: absolute;\n right: 10px;\n top: 20px;\n }\n }\n}\n</style>\n"],"names":["popoverProps","buildProps","useTooltipTriggerProps","dropdownProps","useTooltipContentProps","popoverEmits","value","isBoolean","__default__","_sfc_main","defineComponent","__props","expose","emit","props","updateEventKeyRaw","onUpdateVisible","computed","ns","useNamespace","tooltipRef","ref","popperRef","_a","unref","style","addUnit","kls","gpuAcceleration","hide","beforeEnter","beforeLeave","afterEnter","afterLeave","_ctx","_cache","openBlock","createBlock","ElTooltip","mergeProps","withCtx","createElementBlock","normalizeClass","toDisplayString","createCommentVNode","renderSlot","createTextVNode","Popover","_export_sfc","attachEvents","el","binding","popperComponent","popover","PopoverDirective","VPopover","ElPopoverDirective","withInstallDirective","ElPopover","withInstall","_hoisted_1","_hoisted_2","createElementVNode","_hoisted_3","_hoisted_4","_hoisted_5","_sfc_render","$props","$setup","$data","$options","bell","close","expand","dialogMessage","reactive","activeMessage","handleViewDialogMessage","v","readMessage","SuperUserApi","watch","showItem","$store","useStore","isMobile","activeTab","messageData","noReadMessage","route","useRoute","onMounted","$router","useRouter","$route","navList","navActiveIdx","handleNav","idx","n","path","handleLogout","ElMessageBox","UserApi","ElMessage","userName","refreshActiveTab","r","isSuperAdmin","_b","superNavList","_c"],"mappings":"urBAQA,MAAMA,GAAeC,GAAW,CAC9B,QAASC,EAAuB,QAChC,UAAWC,EAAc,UACzB,SAAUD,EAAuB,SACjC,QAASE,EAAuB,QAChC,WAAYA,EAAuB,WACnC,cAAeD,EAAc,cAC7B,SAAUA,EAAc,SACxB,QAASC,EAAuB,QAChC,YAAaA,EAAuB,YACpC,YAAaA,EAAuB,YACpC,UAAW,CACT,GAAGA,EAAuB,UAC1B,QAAS,EACV,EACD,OAAQ,CACN,GAAGA,EAAuB,OAC1B,QAAS,OACV,EACD,WAAYA,EAAuB,WACnC,MAAO,OACP,MAAO,CACL,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,GACV,EACD,OAAQ,CACN,KAAM,OACN,QAAS,MACV,EACD,UAAW,CACT,KAAM,OACN,QAAS,CACV,EACD,UAAW,CACT,KAAM,OACN,QAAS,GACV,EACD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OAAA,gBAAA,IAAA,EACAS,EAAA,QAAA,CAAgB,KAAA,MACR,CAAA,CACP,CAAA,CACF,CAAA,EAAA,MAAA,IAAA,CAGDY,GAAA,KAAA,IAAA,CAAmB,CAAA,CACpB,EAELC,EAAApF,EAAA,OAAA,EAEAqF,EAAA,IAAA,CAEEV,EAAA,MAAAD,EAAA,UAAAjB,GAAAgB,EAAA,KAAA,WAAAhB,EAAA,IAAA,CAAA,CAA4E,EAE9E,OAAAa,GAAA,IAAA,CAEEY,EAAA,WAAA,EAAA,KAAAI,GAAA,WACE,MAAAC,GAAArF,EAAAoF,EAAA,OAAA,YAAApF,EAAA,MAGA,GAFAkF,EAAA,OAAAI,EAAAF,EAAA,OAAA,YAAAE,EAAA,KACA1B,EAAA,OAAA,qBAAAyB,CAAA,EACAA,EAAA,CACE,MAAAE,EAAA,CAAqB,CACnB,MAAA,OACS,KAAA,mBACD,EACR,CACA,MAAA,OACS,KAAA,+DACD,WAAA,EACM,CACd,EAEFf,EAAA,KAAA,GAAAe,CAAA,CAA4B,GAE9BC,EAAAJ,EAAA,OAAA,YAAAI,EAAA,UAEEhB,EAAA,OAAA,EAAAA,EAAA,MAAA,EACAA,EAAA,KAAA,CAAa,MAAA,OACJ,KAAA,mBACD,CAAA,GAGVW,GAAiB,CAAA,CAClB,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as H,bL as fe,as as A,ak as me,N as pe,d as ve,x as ge,cm as be,v as ye,I as Ce,cn as he,Q as Ee,r as h,bH as Be,Z as we,O as E,co as _,ar as ee,aw as Me,o as ke,ai as Se,bK as Ie,i as B,f as d,D as v,w as c,a6 as F,j as w,a as f,H as i,aB as ne,aR as z,c as j,G as P,S as M,t as T,aN as D,T as Te,b as q,a7 as G,bf as Ae,bM as Re,aS as $e,cp as O,cq as ae,bG as se,bn as Le,aK as Ve,bk as ze}from"./index-62c7029f.js";import{b as Pe,u as De,d as Oe,e as He}from"./el-dialog-463960e0.js";import{o as oe}from"./aria-bc8e8b0f.js";import{i as Ne}from"./validator-853854a1.js";import{u as Ke}from"./index-6d7ac779.js";const Ue=(e,n)=>{let a;H(()=>e.value,l=>{var t,o;l?(a=document.activeElement,fe(n)&&((o=(t=n.value).focus)==null||o.call(t))):a.focus()})},Z="_trap-focus-children",b=[],te=e=>{if(b.length===0)return;const n=b[b.length-1][Z];if(n.length>0&&e.code===me.tab){if(n.length===1){e.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const a=e.shiftKey,l=e.target===n[0],t=e.target===n[n.length-1];l&&a&&(e.preventDefault(),n[n.length-1].focus()),t&&!a&&(e.preventDefault(),n[0].focus())}},Fe={beforeMount(e){e[Z]=oe(e),b.push(e),b.length<=1&&document.addEventListener("keydown",te)},updated(e){A(()=>{e[Z]=oe(e)})},unmounted(){b.shift(),b.length===0&&document.removeEventListener("keydown",te)}},je=ve({name:"ElMessageBox",directives:{TrapFocus:Fe},components:{ElButton:ge,ElFocusTrap:be,ElInput:ye,ElOverlay:Pe,ElIcon:Ce,...he},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Ne},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:n}){const{t:a}=Ke(),l=Ee("message-box"),t=h(!1),{nextZIndex:o}=Be(),s=we({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:o()}),m=E(()=>{const r=s.type;return{[l.bm("icon",r)]:r&&_[r]}}),N=ee(),$=ee(),K=Me(E(()=>e.buttonSize),{prop:!0,form:!0,formItem:!0}),U=E(()=>s.icon||_[s.type]||""),u=E(()=>!!s.message),y=h(),X=h(),S=h(),L=h(),Q=h(),le=E(()=>s.confirmButtonClass);H(()=>s.inputValue,async r=>{await A(),e.boxType==="prompt"&&r!==null&&J()},{immediate:!0}),H(()=>t.value,r=>{var p,C;r&&(e.boxType!=="prompt"&&(s.autofocus?S.value=(C=(p=Q.value)==null?void 0:p.$el)!=null?C:y.value:S.value=y.value),s.zIndex=o()),e.boxType==="prompt"&&(r?A().then(()=>{var x;L.value&&L.value.$el&&(s.autofocus?S.value=(x=de())!=null?x:y.value:S.value=y.value)}):(s.editorErrorMessage="",s.validateError=!1))});const re=E(()=>e.draggable);De(y,X,re),ke(async()=>{await A(),e.closeOnHashChange&&window.addEventListener("hashchange",I)}),Se(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",I)});function I(){t.value&&(t.value=!1,A(()=>{s.action&&n("action",s.action)}))}const W=()=>{e.closeOnClickModal&&V(s.distinguishCancelAndClose?"close":"cancel")},ie=He(W),ue=r=>{if(s.inputType!=="textarea")return r.preventDefault(),V("confirm")},V=r=>{var p;e.boxType==="prompt"&&r==="confirm"&&!J()||(s.action=r,s.beforeClose?(p=s.beforeClose)==null||p.call(s,r,s,I):I())},J=()=>{if(e.boxType==="prompt"){const r=s.inputPattern;if(r&&!r.test(s.inputValue||""))return s.editorErrorMessage=s.inputErrorMessage||a("el.messagebox.error"),s.validateError=!0,!1;const p=s.inputValidator;if(typeof p=="function"){const C=p(s.inputValue);if(C===!1)return s.editorErrorMessage=s.inputErrorMessage||a("el.messagebox.error"),s.validateError=!0,!1;if(typeof C=="string")return s.editorErrorMessage=C,s.validateError=!0,!1}}return s.editorErrorMessage="",s.validateError=!1,!0},de=()=>{const r=L.value.$refs;return r.input||r.textarea},Y=()=>{V("close")},ce=()=>{e.closeOnPressEscape&&Y()};return e.lockScroll&&Oe(t),Ue(t),{...Ie(s),ns:l,overlayEvent:ie,visible:t,hasMessage:u,typeClass:m,contentId:N,inputId:$,btnSize:K,iconComponent:U,confirmButtonClasses:le,rootRef:y,focusStartRef:S,headerRef:X,inputRef:L,confirmRef:Q,doClose:I,handleClose:Y,onCloseRequested:ce,handleWrapperClick:W,handleInputEnter:ue,handleAction:V,t:a}}}),qe=["aria-label","aria-describedby"],Ge=["aria-label"],Ze=["id"];function Xe(e,n,a,l,t,o){const s=B("el-icon"),m=B("close"),N=B("el-input"),$=B("el-button"),K=B("el-focus-trap"),U=B("el-overlay");return d(),v(Ae,{name:"fade-in-linear",onAfterLeave:n[11]||(n[11]=u=>e.$emit("vanish")),persisted:""},{default:c(()=>[F(w(U,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:c(()=>[f("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:i("".concat(e.ns.namespace.value,"-overlay-message-box")),onClick:n[8]||(n[8]=(...u)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...u)),onMousedown:n[9]||(n[9]=(...u)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...u)),onMouseup:n[10]||(n[10]=(...u)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...u))},[w(K,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:c(()=>[f("div",{ref:"rootRef",class:i([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:ne(e.customStyle),tabindex:"-1",onClick:n[7]||(n[7]=z(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(d(),j("div",{key:0,ref:"headerRef",class:i(e.ns.e("header"))},[f("div",{class:i(e.ns.e("title"))},[e.iconComponent&&e.center?(d(),v(s,{key:0,class:i([e.ns.e("status"),e.typeClass])},{default:c(()=>[(d(),v(P(e.iconComponent)))]),_:1},8,["class"])):M("v-if",!0),f("span",null,T(e.title),1)],2),e.showClose?(d(),j("button",{key:0,type:"button",class:i(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:n[0]||(n[0]=u=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:n[1]||(n[1]=D(z(u=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[w(s,{class:i(e.ns.e("close"))},{default:c(()=>[w(m)]),_:1},8,["class"])],42,Ge)):M("v-if",!0)],2)):M("v-if",!0),f("div",{id:e.contentId,class:i(e.ns.e("content"))},[f("div",{class:i(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(d(),v(s,{key:0,class:i([e.ns.e("status"),e.typeClass])},{default:c(()=>[(d(),v(P(e.iconComponent)))]),_:1},8,["class"])):M("v-if",!0),e.hasMessage?(d(),j("div",{key:1,class:i(e.ns.e("message"))},[Te(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(d(),v(P(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(d(),v(P(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:c(()=>[q(T(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):M("v-if",!0)],2),F(f("div",{class:i(e.ns.e("input"))},[w(N,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":n[2]||(n[2]=u=>e.inputValue=u),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:i({invalid:e.validateError}),onKeydown:D(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),f("div",{class:i(e.ns.e("errormsg")),style:ne({visibility:e.editorErrorMessage?"visible":"hidden"})},T(e.editorErrorMessage),7)],2),[[G,e.showInput]])],10,Ze),f("div",{class:i(e.ns.e("btns"))},[e.showCancelButton?(d(),v($,{key:0,loading:e.cancelButtonLoading,class:i([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:n[3]||(n[3]=u=>e.handleAction("cancel")),onKeydown:n[4]||(n[4]=D(z(u=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:c(()=>[q(T(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):M("v-if",!0),F(w($,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:i([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:n[5]||(n[5]=u=>e.handleAction("confirm")),onKeydown:n[6]||(n[6]=D(z(u=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:c(()=>[q(T(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[G,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,qe)]),_:3},8,["z-index","overlay-class","mask"]),[[G,e.visible]])]),_:3})}var Qe=pe(je,[["render",Xe],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);const R=new Map,We=(e,n,a=null)=>{const l=ze(Qe,e);return l.appContext=a,ae(l,n),document.body.appendChild(n.firstElementChild),l.component},Je=()=>document.createElement("div"),Ye=(e,n)=>{const a=Je();e.onVanish=()=>{ae(null,a),R.delete(t)},e.onAction=o=>{const s=R.get(t);let m;e.showInput?m={value:t.inputValue,action:o}:m=o,e.callback?e.callback(m,l.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(m)};const l=We(e,a,n),t=l.proxy;for(const o in e)se(e,o)&&!se(t.$props,o)&&(t[o]=e[o]);return H(()=>t.message,(o,s)=>{O(o)?l.slots.default=()=>[o]:O(s)&&!O(o)&&delete l.slots.default},{immediate:!0}),t.visible=!0,t};function k(e,n=null){if(!Re)return Promise.reject();let a;return $e(e)||O(e)?e={message:e}:a=e.callback,new Promise((l,t)=>{const o=Ye(e,n!=null?n:k._context);R.set(o,{options:e,callback:a,resolve:l,reject:t})})}const xe=["alert","confirm","prompt"],_e={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};xe.forEach(e=>{k[e]=en(e)});function en(e){return(n,a,l,t)=>{let o;return Le(a)?(l=a,o=""):Ve(a)?o="":o=a,k(Object.assign({title:o,message:n,type:"",..._e[e]},l,{boxType:e}),t)}}k.close=()=>{R.forEach((e,n)=>{n.doClose()}),R.clear()};k._context=null;const g=k;g.install=e=>{g._context=e._context,e.config.globalProperties.$msgbox=g,e.config.globalProperties.$messageBox=g,e.config.globalProperties.$alert=g.alert,e.config.globalProperties.$confirm=g.confirm,e.config.globalProperties.$prompt=g.prompt};const ln=g;export{ln as E};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{$ as H,bL as fe,as as A,ak as me,N as pe,d as ve,x as ge,cm as be,v as ye,I as Ce,cn as he,Q as Ee,r as h,bH as Be,Z as we,O as E,co as _,ar as ee,aw as Me,o as ke,ai as Se,bK as Ie,i as B,f as d,D as v,w as c,a6 as F,j as w,a as f,H as i,aB as ne,aR as z,c as j,G as P,S as M,t as T,aN as D,T as Te,b as q,a7 as G,bf as Ae,bM as Re,aS as $e,cp as O,cq as ae,bG as se,bn as Le,aK as Ve,bk as ze}from"./index-1639ad54.js";import{b as Pe,u as De,d as Oe,e as He}from"./el-dialog-c11c4af2.js";import{o as oe}from"./aria-bc8e8b0f.js";import{i as Ne}from"./validator-5c60ab85.js";import{u as Ke}from"./index-68448dbd.js";const Ue=(e,n)=>{let a;H(()=>e.value,l=>{var t,o;l?(a=document.activeElement,fe(n)&&((o=(t=n.value).focus)==null||o.call(t))):a.focus()})},Z="_trap-focus-children",b=[],te=e=>{if(b.length===0)return;const n=b[b.length-1][Z];if(n.length>0&&e.code===me.tab){if(n.length===1){e.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const a=e.shiftKey,l=e.target===n[0],t=e.target===n[n.length-1];l&&a&&(e.preventDefault(),n[n.length-1].focus()),t&&!a&&(e.preventDefault(),n[0].focus())}},Fe={beforeMount(e){e[Z]=oe(e),b.push(e),b.length<=1&&document.addEventListener("keydown",te)},updated(e){A(()=>{e[Z]=oe(e)})},unmounted(){b.shift(),b.length===0&&document.removeEventListener("keydown",te)}},je=ve({name:"ElMessageBox",directives:{TrapFocus:Fe},components:{ElButton:ge,ElFocusTrap:be,ElInput:ye,ElOverlay:Pe,ElIcon:Ce,...he},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Ne},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:n}){const{t:a}=Ke(),l=Ee("message-box"),t=h(!1),{nextZIndex:o}=Be(),s=we({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:o()}),m=E(()=>{const r=s.type;return{[l.bm("icon",r)]:r&&_[r]}}),N=ee(),$=ee(),K=Me(E(()=>e.buttonSize),{prop:!0,form:!0,formItem:!0}),U=E(()=>s.icon||_[s.type]||""),u=E(()=>!!s.message),y=h(),X=h(),S=h(),L=h(),Q=h(),le=E(()=>s.confirmButtonClass);H(()=>s.inputValue,async r=>{await A(),e.boxType==="prompt"&&r!==null&&J()},{immediate:!0}),H(()=>t.value,r=>{var p,C;r&&(e.boxType!=="prompt"&&(s.autofocus?S.value=(C=(p=Q.value)==null?void 0:p.$el)!=null?C:y.value:S.value=y.value),s.zIndex=o()),e.boxType==="prompt"&&(r?A().then(()=>{var x;L.value&&L.value.$el&&(s.autofocus?S.value=(x=de())!=null?x:y.value:S.value=y.value)}):(s.editorErrorMessage="",s.validateError=!1))});const re=E(()=>e.draggable);De(y,X,re),ke(async()=>{await A(),e.closeOnHashChange&&window.addEventListener("hashchange",I)}),Se(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",I)});function I(){t.value&&(t.value=!1,A(()=>{s.action&&n("action",s.action)}))}const W=()=>{e.closeOnClickModal&&V(s.distinguishCancelAndClose?"close":"cancel")},ie=He(W),ue=r=>{if(s.inputType!=="textarea")return r.preventDefault(),V("confirm")},V=r=>{var p;e.boxType==="prompt"&&r==="confirm"&&!J()||(s.action=r,s.beforeClose?(p=s.beforeClose)==null||p.call(s,r,s,I):I())},J=()=>{if(e.boxType==="prompt"){const r=s.inputPattern;if(r&&!r.test(s.inputValue||""))return s.editorErrorMessage=s.inputErrorMessage||a("el.messagebox.error"),s.validateError=!0,!1;const p=s.inputValidator;if(typeof p=="function"){const C=p(s.inputValue);if(C===!1)return s.editorErrorMessage=s.inputErrorMessage||a("el.messagebox.error"),s.validateError=!0,!1;if(typeof C=="string")return s.editorErrorMessage=C,s.validateError=!0,!1}}return s.editorErrorMessage="",s.validateError=!1,!0},de=()=>{const r=L.value.$refs;return r.input||r.textarea},Y=()=>{V("close")},ce=()=>{e.closeOnPressEscape&&Y()};return e.lockScroll&&Oe(t),Ue(t),{...Ie(s),ns:l,overlayEvent:ie,visible:t,hasMessage:u,typeClass:m,contentId:N,inputId:$,btnSize:K,iconComponent:U,confirmButtonClasses:le,rootRef:y,focusStartRef:S,headerRef:X,inputRef:L,confirmRef:Q,doClose:I,handleClose:Y,onCloseRequested:ce,handleWrapperClick:W,handleInputEnter:ue,handleAction:V,t:a}}}),qe=["aria-label","aria-describedby"],Ge=["aria-label"],Ze=["id"];function Xe(e,n,a,l,t,o){const s=B("el-icon"),m=B("close"),N=B("el-input"),$=B("el-button"),K=B("el-focus-trap"),U=B("el-overlay");return d(),v(Ae,{name:"fade-in-linear",onAfterLeave:n[11]||(n[11]=u=>e.$emit("vanish")),persisted:""},{default:c(()=>[F(w(U,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:c(()=>[f("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:i("".concat(e.ns.namespace.value,"-overlay-message-box")),onClick:n[8]||(n[8]=(...u)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...u)),onMousedown:n[9]||(n[9]=(...u)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...u)),onMouseup:n[10]||(n[10]=(...u)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...u))},[w(K,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:c(()=>[f("div",{ref:"rootRef",class:i([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:ne(e.customStyle),tabindex:"-1",onClick:n[7]||(n[7]=z(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(d(),j("div",{key:0,ref:"headerRef",class:i(e.ns.e("header"))},[f("div",{class:i(e.ns.e("title"))},[e.iconComponent&&e.center?(d(),v(s,{key:0,class:i([e.ns.e("status"),e.typeClass])},{default:c(()=>[(d(),v(P(e.iconComponent)))]),_:1},8,["class"])):M("v-if",!0),f("span",null,T(e.title),1)],2),e.showClose?(d(),j("button",{key:0,type:"button",class:i(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:n[0]||(n[0]=u=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:n[1]||(n[1]=D(z(u=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[w(s,{class:i(e.ns.e("close"))},{default:c(()=>[w(m)]),_:1},8,["class"])],42,Ge)):M("v-if",!0)],2)):M("v-if",!0),f("div",{id:e.contentId,class:i(e.ns.e("content"))},[f("div",{class:i(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(d(),v(s,{key:0,class:i([e.ns.e("status"),e.typeClass])},{default:c(()=>[(d(),v(P(e.iconComponent)))]),_:1},8,["class"])):M("v-if",!0),e.hasMessage?(d(),j("div",{key:1,class:i(e.ns.e("message"))},[Te(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(d(),v(P(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(d(),v(P(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:c(()=>[q(T(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):M("v-if",!0)],2),F(f("div",{class:i(e.ns.e("input"))},[w(N,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":n[2]||(n[2]=u=>e.inputValue=u),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:i({invalid:e.validateError}),onKeydown:D(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),f("div",{class:i(e.ns.e("errormsg")),style:ne({visibility:e.editorErrorMessage?"visible":"hidden"})},T(e.editorErrorMessage),7)],2),[[G,e.showInput]])],10,Ze),f("div",{class:i(e.ns.e("btns"))},[e.showCancelButton?(d(),v($,{key:0,loading:e.cancelButtonLoading,class:i([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:n[3]||(n[3]=u=>e.handleAction("cancel")),onKeydown:n[4]||(n[4]=D(z(u=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:c(()=>[q(T(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):M("v-if",!0),F(w($,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:i([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:n[5]||(n[5]=u=>e.handleAction("confirm")),onKeydown:n[6]||(n[6]=D(z(u=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:c(()=>[q(T(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[G,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,qe)]),_:3},8,["z-index","overlay-class","mask"]),[[G,e.visible]])]),_:3})}var Qe=pe(je,[["render",Xe],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);const R=new Map,We=(e,n,a=null)=>{const l=ze(Qe,e);return l.appContext=a,ae(l,n),document.body.appendChild(n.firstElementChild),l.component},Je=()=>document.createElement("div"),Ye=(e,n)=>{const a=Je();e.onVanish=()=>{ae(null,a),R.delete(t)},e.onAction=o=>{const s=R.get(t);let m;e.showInput?m={value:t.inputValue,action:o}:m=o,e.callback?e.callback(m,l.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(m)};const l=We(e,a,n),t=l.proxy;for(const o in e)se(e,o)&&!se(t.$props,o)&&(t[o]=e[o]);return H(()=>t.message,(o,s)=>{O(o)?l.slots.default=()=>[o]:O(s)&&!O(o)&&delete l.slots.default},{immediate:!0}),t.visible=!0,t};function k(e,n=null){if(!Re)return Promise.reject();let a;return $e(e)||O(e)?e={message:e}:a=e.callback,new Promise((l,t)=>{const o=Ye(e,n!=null?n:k._context);R.set(o,{options:e,callback:a,resolve:l,reject:t})})}const xe=["alert","confirm","prompt"],_e={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};xe.forEach(e=>{k[e]=en(e)});function en(e){return(n,a,l,t)=>{let o;return Le(a)?(l=a,o=""):Ve(a)?o="":o=a,k(Object.assign({title:o,message:n,type:"",..._e[e]},l,{boxType:e}),t)}}k.close=()=>{R.forEach((e,n)=>{n.doClose()}),R.clear()};k._context=null;const g=k;g.install=e=>{g._context=e._context,e.config.globalProperties.$msgbox=g,e.config.globalProperties.$messageBox=g,e.config.globalProperties.$alert=g.alert,e.config.globalProperties.$confirm=g.confirm,e.config.globalProperties.$prompt=g.prompt};const ln=g;export{ln as E};
|
|
2
|
+
//# sourceMappingURL=index-b8357360.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-17fa8fb7.js","sources":["../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/hooks/use-restore-active/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/directives/trap-focus/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/message-box/src/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/message-box/src/messageBox.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/message-box/index.mjs"],"sourcesContent":["import { watch, isRef } from 'vue';\n\nconst useRestoreActive = (toggle, initialFocus) => {\n let previousActive;\n watch(() => toggle.value, (val) => {\n var _a, _b;\n if (val) {\n previousActive = document.activeElement;\n if (isRef(initialFocus)) {\n (_b = (_a = initialFocus.value).focus) == null ? void 0 : _b.call(_a);\n }\n } else {\n if (process.env.NODE_ENV === \"test\") {\n previousActive.focus.call(previousActive);\n } else {\n previousActive.focus();\n }\n }\n });\n};\n\nexport { useRestoreActive };\n//# sourceMappingURL=index.mjs.map\n","import { nextTick } from 'vue';\nimport '../../utils/index.mjs';\nimport '../../constants/index.mjs';\nimport { EVENT_CODE } from '../../constants/aria.mjs';\nimport { obtainAllFocusableElements } from '../../utils/dom/aria.mjs';\n\nconst FOCUSABLE_CHILDREN = \"_trap-focus-children\";\nconst TRAP_FOCUS_HANDLER = \"_trap-focus-handler\";\nconst FOCUS_STACK = [];\nconst FOCUS_HANDLER = (e) => {\n var _a;\n if (FOCUS_STACK.length === 0)\n return;\n const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];\n if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {\n if (focusableElement.length === 1) {\n e.preventDefault();\n if (document.activeElement !== focusableElement[0]) {\n focusableElement[0].focus();\n }\n return;\n }\n const goingBackward = e.shiftKey;\n const isFirst = e.target === focusableElement[0];\n const isLast = e.target === focusableElement[focusableElement.length - 1];\n if (isFirst && goingBackward) {\n e.preventDefault();\n focusableElement[focusableElement.length - 1].focus();\n }\n if (isLast && !goingBackward) {\n e.preventDefault();\n focusableElement[0].focus();\n }\n if (process.env.NODE_ENV === \"test\") {\n const index = focusableElement.indexOf(e.target);\n if (index !== -1) {\n (_a = focusableElement[goingBackward ? index - 1 : index + 1]) == null ? void 0 : _a.focus();\n }\n }\n }\n};\nconst TrapFocus = {\n beforeMount(el) {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n FOCUS_STACK.push(el);\n if (FOCUS_STACK.length <= 1) {\n document.addEventListener(\"keydown\", FOCUS_HANDLER);\n }\n },\n updated(el) {\n nextTick(() => {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n });\n },\n unmounted() {\n FOCUS_STACK.shift();\n if (FOCUS_STACK.length === 0) {\n document.removeEventListener(\"keydown\", FOCUS_HANDLER);\n }\n }\n};\n\nexport { FOCUSABLE_CHILDREN, TRAP_FOCUS_HANDLER, TrapFocus as default };\n//# sourceMappingURL=index.mjs.map\n","import { defineComponent, ref, reactive, computed, watch, nextTick, onMounted, onBeforeUnmount, toRefs, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, createTextVNode, vShow } from 'vue';\nimport { ElButton } from '../../button/index.mjs';\nimport '../../../directives/index.mjs';\nimport '../../../hooks/index.mjs';\nimport { ElInput } from '../../input/index.mjs';\nimport { ElOverlay } from '../../overlay/index.mjs';\nimport '../../../utils/index.mjs';\nimport { ElIcon } from '../../icon/index.mjs';\nimport '../../focus-trap/index.mjs';\nimport _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';\nimport TrapFocus from '../../../directives/trap-focus/index.mjs';\nimport ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';\nimport { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';\nimport { isValidComponentSize } from '../../../utils/vue/validator.mjs';\nimport { useLocale } from '../../../hooks/use-locale/index.mjs';\nimport { useNamespace } from '../../../hooks/use-namespace/index.mjs';\nimport { useZIndex } from '../../../hooks/use-z-index/index.mjs';\nimport { useId } from '../../../hooks/use-id/index.mjs';\nimport { useSize } from '../../../hooks/use-common-props/index.mjs';\nimport { useDraggable } from '../../../hooks/use-draggable/index.mjs';\nimport { useSameTarget } from '../../../hooks/use-same-target/index.mjs';\nimport { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';\nimport { useRestoreActive } from '../../../hooks/use-restore-active/index.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"ElMessageBox\",\n directives: {\n TrapFocus\n },\n components: {\n ElButton,\n ElFocusTrap,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String,\n validator: isValidComponentSize\n },\n modal: {\n type: Boolean,\n default: true\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n showClose: {\n type: Boolean,\n default: true\n },\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n closeOnHashChange: {\n type: Boolean,\n default: true\n },\n center: Boolean,\n draggable: Boolean,\n roundButton: {\n default: false,\n type: Boolean\n },\n container: {\n type: String,\n default: \"body\"\n },\n boxType: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"vanish\", \"action\"],\n setup(props, { emit }) {\n const { t } = useLocale();\n const ns = useNamespace(\"message-box\");\n const visible = ref(false);\n const { nextZIndex } = useZIndex();\n const state = reactive({\n autofocus: true,\n beforeClose: null,\n callback: null,\n cancelButtonText: \"\",\n cancelButtonClass: \"\",\n confirmButtonText: \"\",\n confirmButtonClass: \"\",\n customClass: \"\",\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: \"\",\n inputPattern: null,\n inputPlaceholder: \"\",\n inputType: \"text\",\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: \"\",\n message: null,\n modalFade: true,\n modalClass: \"\",\n showCancelButton: false,\n showConfirmButton: true,\n type: \"\",\n title: void 0,\n showInput: false,\n action: \"\",\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: \"\",\n validateError: false,\n zIndex: nextZIndex()\n });\n const typeClass = computed(() => {\n const type = state.type;\n return { [ns.bm(\"icon\", type)]: type && TypeComponentsMap[type] };\n });\n const contentId = useId();\n const inputId = useId();\n const btnSize = useSize(computed(() => props.buttonSize), { prop: true, form: true, formItem: true });\n const iconComponent = computed(() => state.icon || TypeComponentsMap[state.type] || \"\");\n const hasMessage = computed(() => !!state.message);\n const rootRef = ref();\n const headerRef = ref();\n const focusStartRef = ref();\n const inputRef = ref();\n const confirmRef = ref();\n const confirmButtonClasses = computed(() => state.confirmButtonClass);\n watch(() => state.inputValue, async (val) => {\n await nextTick();\n if (props.boxType === \"prompt\" && val !== null) {\n validate();\n }\n }, { immediate: true });\n watch(() => visible.value, (val) => {\n var _a, _b;\n if (val) {\n if (props.boxType !== \"prompt\") {\n if (state.autofocus) {\n focusStartRef.value = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) != null ? _b : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n state.zIndex = nextZIndex();\n }\n if (props.boxType !== \"prompt\")\n return;\n if (val) {\n nextTick().then(() => {\n var _a2;\n if (inputRef.value && inputRef.value.$el) {\n if (state.autofocus) {\n focusStartRef.value = (_a2 = getInputElement()) != null ? _a2 : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n });\n } else {\n state.editorErrorMessage = \"\";\n state.validateError = false;\n }\n });\n const draggable = computed(() => props.draggable);\n useDraggable(rootRef, headerRef, draggable);\n onMounted(async () => {\n await nextTick();\n if (props.closeOnHashChange) {\n window.addEventListener(\"hashchange\", doClose);\n }\n });\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n window.removeEventListener(\"hashchange\", doClose);\n }\n });\n function doClose() {\n if (!visible.value)\n return;\n visible.value = false;\n nextTick(() => {\n if (state.action)\n emit(\"action\", state.action);\n });\n }\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? \"close\" : \"cancel\");\n }\n };\n const overlayEvent = useSameTarget(handleWrapperClick);\n const handleInputEnter = (e) => {\n if (state.inputType !== \"textarea\") {\n e.preventDefault();\n return handleAction(\"confirm\");\n }\n };\n const handleAction = (action) => {\n var _a;\n if (props.boxType === \"prompt\" && action === \"confirm\" && !validate()) {\n return;\n }\n state.action = action;\n if (state.beforeClose) {\n (_a = state.beforeClose) == null ? void 0 : _a.call(state, action, state, doClose);\n } else {\n doClose();\n }\n };\n const validate = () => {\n if (props.boxType === \"prompt\") {\n const inputPattern = state.inputPattern;\n if (inputPattern && !inputPattern.test(state.inputValue || \"\")) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n const inputValidator = state.inputValidator;\n if (typeof inputValidator === \"function\") {\n const validateResult = inputValidator(state.inputValue);\n if (validateResult === false) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n if (typeof validateResult === \"string\") {\n state.editorErrorMessage = validateResult;\n state.validateError = true;\n return false;\n }\n }\n }\n state.editorErrorMessage = \"\";\n state.validateError = false;\n return true;\n };\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs;\n return inputRefs.input || inputRefs.textarea;\n };\n const handleClose = () => {\n handleAction(\"close\");\n };\n const onCloseRequested = () => {\n if (props.closeOnPressEscape) {\n handleClose();\n }\n };\n if (props.lockScroll) {\n useLockscreen(visible);\n }\n useRestoreActive(visible);\n return {\n ...toRefs(state),\n ns,\n overlayEvent,\n visible,\n hasMessage,\n typeClass,\n contentId,\n inputId,\n btnSize,\n iconComponent,\n confirmButtonClasses,\n rootRef,\n focusStartRef,\n headerRef,\n inputRef,\n confirmRef,\n doClose,\n handleClose,\n onCloseRequested,\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t\n };\n }\n});\nconst _hoisted_1 = [\"aria-label\", \"aria-describedby\"];\nconst _hoisted_2 = [\"aria-label\"];\nconst _hoisted_3 = [\"id\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_icon = resolveComponent(\"el-icon\");\n const _component_close = resolveComponent(\"close\");\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_focus_trap = resolveComponent(\"el-focus-trap\");\n const _component_el_overlay = resolveComponent(\"el-overlay\");\n return openBlock(), createBlock(Transition, {\n name: \"fade-in-linear\",\n onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit(\"vanish\")),\n persisted: \"\"\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_overlay, {\n \"z-index\": _ctx.zIndex,\n \"overlay-class\": [_ctx.ns.is(\"message-box\"), _ctx.modalClass],\n mask: _ctx.modal\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n role: \"dialog\",\n \"aria-label\": _ctx.title,\n \"aria-modal\": \"true\",\n \"aria-describedby\": !_ctx.showInput ? _ctx.contentId : void 0,\n class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),\n onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),\n onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),\n onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))\n }, [\n createVNode(_component_el_focus_trap, {\n loop: \"\",\n trapped: _ctx.visible,\n \"focus-trap-el\": _ctx.rootRef,\n \"focus-start-el\": _ctx.focusStartRef,\n onReleaseRequested: _ctx.onCloseRequested\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n ref: \"rootRef\",\n class: normalizeClass([\n _ctx.ns.b(),\n _ctx.customClass,\n _ctx.ns.is(\"draggable\", _ctx.draggable),\n { [_ctx.ns.m(\"center\")]: _ctx.center }\n ]),\n style: normalizeStyle(_ctx.customStyle),\n tabindex: \"-1\",\n onClick: _cache[7] || (_cache[7] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n ref: \"headerRef\",\n class: normalizeClass(_ctx.ns.e(\"header\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"title\"))\n }, [\n _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"span\", null, toDisplayString(_ctx.title), 1)\n ], 2),\n _ctx.showClose ? (openBlock(), createElementBlock(\"button\", {\n key: 0,\n type: \"button\",\n class: normalizeClass(_ctx.ns.e(\"headerbtn\")),\n \"aria-label\": _ctx.t(\"el.messagebox.close\"),\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\")),\n onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, [\n createVNode(_component_el_icon, {\n class: normalizeClass(_ctx.ns.e(\"close\"))\n }, {\n default: withCtx(() => [\n createVNode(_component_close)\n ]),\n _: 1\n }, 8, [\"class\"])\n ], 42, _hoisted_2)) : createCommentVNode(\"v-if\", true)\n ], 2)) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"div\", {\n id: _ctx.contentId,\n class: normalizeClass(_ctx.ns.e(\"content\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"container\"))\n }, [\n _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n _ctx.hasMessage ? (openBlock(), createElementBlock(\"div\", {\n key: 1,\n class: normalizeClass(_ctx.ns.e(\"message\"))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 0,\n for: _ctx.showInput ? _ctx.inputId : void 0\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(!_ctx.dangerouslyUseHTMLString ? _ctx.message : \"\"), 1)\n ]),\n _: 1\n }, 8, [\"for\"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 1,\n for: _ctx.showInput ? _ctx.inputId : void 0,\n innerHTML: _ctx.message\n }, null, 8, [\"for\", \"innerHTML\"]))\n ])\n ], 2)) : createCommentVNode(\"v-if\", true)\n ], 2),\n withDirectives(createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"input\"))\n }, [\n createVNode(_component_el_input, {\n id: _ctx.inputId,\n ref: \"inputRef\",\n modelValue: _ctx.inputValue,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),\n type: _ctx.inputType,\n placeholder: _ctx.inputPlaceholder,\n \"aria-invalid\": _ctx.validateError,\n class: normalizeClass({ invalid: _ctx.validateError }),\n onKeydown: withKeys(_ctx.handleInputEnter, [\"enter\"])\n }, null, 8, [\"id\", \"modelValue\", \"type\", \"placeholder\", \"aria-invalid\", \"class\", \"onKeydown\"]),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"errormsg\")),\n style: normalizeStyle({\n visibility: !!_ctx.editorErrorMessage ? \"visible\" : \"hidden\"\n })\n }, toDisplayString(_ctx.editorErrorMessage), 7)\n ], 2), [\n [vShow, _ctx.showInput]\n ])\n ], 10, _hoisted_3),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"btns\"))\n }, [\n _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {\n key: 0,\n loading: _ctx.cancelButtonLoading,\n class: normalizeClass([_ctx.cancelButtonClass]),\n round: _ctx.roundButton,\n size: _ctx.btnSize,\n onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction(\"cancel\")),\n onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction(\"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t(\"el.messagebox.cancel\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"size\"])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(_component_el_button, {\n ref: \"confirmRef\",\n type: \"primary\",\n loading: _ctx.confirmButtonLoading,\n class: normalizeClass([_ctx.confirmButtonClasses]),\n round: _ctx.roundButton,\n disabled: _ctx.confirmButtonDisabled,\n size: _ctx.btnSize,\n onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction(\"confirm\")),\n onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction(\"confirm\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t(\"el.messagebox.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"disabled\", \"size\"]), [\n [vShow, _ctx.showConfirmButton]\n ])\n ], 2)\n ], 6)\n ]),\n _: 3\n }, 8, [\"trapped\", \"focus-trap-el\", \"focus-start-el\", \"onReleaseRequested\"])\n ], 42, _hoisted_1)\n ]),\n _: 3\n }, 8, [\"z-index\", \"overlay-class\", \"mask\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 3\n });\n}\nvar MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__file\", \"/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue\"]]);\n\nexport { MessageBoxConstructor as default };\n//# sourceMappingURL=index.mjs.map\n","import { h, render, watch, isVNode } from 'vue';\nimport { isClient } from '@vueuse/core';\nimport '../../../utils/index.mjs';\nimport MessageBoxConstructor from './index.mjs';\nimport { hasOwn, isString, isObject } from '@vue/shared';\nimport { isUndefined } from '../../../utils/types.mjs';\n\nconst messageInstance = /* @__PURE__ */ new Map();\nconst initInstance = (props, container, appContext = null) => {\n const vnode = h(MessageBoxConstructor, props);\n vnode.appContext = appContext;\n render(vnode, container);\n document.body.appendChild(container.firstElementChild);\n return vnode.component;\n};\nconst genContainer = () => {\n return document.createElement(\"div\");\n};\nconst showMessage = (options, appContext) => {\n const container = genContainer();\n options.onVanish = () => {\n render(null, container);\n messageInstance.delete(vm);\n };\n options.onAction = (action) => {\n const currentMsg = messageInstance.get(vm);\n let resolve;\n if (options.showInput) {\n resolve = { value: vm.inputValue, action };\n } else {\n resolve = action;\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy);\n } else {\n if (action === \"cancel\" || action === \"close\") {\n if (options.distinguishCancelAndClose && action !== \"cancel\") {\n currentMsg.reject(\"close\");\n } else {\n currentMsg.reject(\"cancel\");\n }\n } else {\n currentMsg.resolve(resolve);\n }\n }\n };\n const instance = initInstance(options, container, appContext);\n const vm = instance.proxy;\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop] = options[prop];\n }\n }\n watch(() => vm.message, (newVal, oldVal) => {\n if (isVNode(newVal)) {\n instance.slots.default = () => [newVal];\n } else if (isVNode(oldVal) && !isVNode(newVal)) {\n delete instance.slots.default;\n }\n }, {\n immediate: true\n });\n vm.visible = true;\n return vm;\n};\nfunction MessageBox(options, appContext = null) {\n if (!isClient)\n return Promise.reject();\n let callback;\n if (isString(options) || isVNode(options)) {\n options = {\n message: options\n };\n } else {\n callback = options.callback;\n }\n return new Promise((resolve, reject) => {\n const vm = showMessage(options, appContext != null ? appContext : MessageBox._context);\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject\n });\n });\n}\nconst MESSAGE_BOX_VARIANTS = [\"alert\", \"confirm\", \"prompt\"];\nconst MESSAGE_BOX_DEFAULT_OPTS = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true }\n};\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n MessageBox[boxType] = messageBoxFactory(boxType);\n});\nfunction messageBoxFactory(boxType) {\n return (message, titleOrOpts, options, appContext) => {\n let title;\n if (isObject(titleOrOpts)) {\n options = titleOrOpts;\n title = \"\";\n } else if (isUndefined(titleOrOpts)) {\n title = \"\";\n } else {\n title = titleOrOpts;\n }\n return MessageBox(Object.assign({\n title,\n message,\n type: \"\",\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType]\n }, options, {\n boxType\n }), appContext);\n };\n}\nMessageBox.close = () => {\n messageInstance.forEach((_, vm) => {\n vm.doClose();\n });\n messageInstance.clear();\n};\nMessageBox._context = null;\n\nexport { MessageBox as default };\n//# sourceMappingURL=messageBox.mjs.map\n","import MessageBox from './src/messageBox.mjs';\nimport './src/message-box.type.mjs';\n\nconst _MessageBox = MessageBox;\n_MessageBox.install = (app) => {\n _MessageBox._context = app._context;\n app.config.globalProperties.$msgbox = _MessageBox;\n app.config.globalProperties.$messageBox = _MessageBox;\n app.config.globalProperties.$alert = _MessageBox.alert;\n app.config.globalProperties.$confirm = _MessageBox.confirm;\n app.config.globalProperties.$prompt = _MessageBox.prompt;\n};\nconst ElMessageBox = _MessageBox;\n\nexport { ElMessageBox, _MessageBox as default };\n//# sourceMappingURL=index.mjs.map\n"],"names":["useRestoreActive","toggle","initialFocus","previousActive","watch","val","_a","_b","isRef","FOCUSABLE_CHILDREN","FOCUS_STACK","FOCUS_HANDLER","focusableElement","EVENT_CODE","goingBackward","isFirst","isLast","TrapFocus","el","obtainAllFocusableElements","nextTick","_sfc_main","defineComponent","ElButton","ElFocusTrap","ElInput","ElOverlay","ElIcon","TypeComponents","isValidComponentSize","props","emit","t","useLocale","ns","useNamespace","visible","ref","nextZIndex","useZIndex","state","reactive","typeClass","computed","type","TypeComponentsMap","contentId","useId","inputId","btnSize","useSize","iconComponent","hasMessage","rootRef","headerRef","focusStartRef","inputRef","confirmRef","confirmButtonClasses","validate","_a2","getInputElement","draggable","useDraggable","onMounted","doClose","onBeforeUnmount","handleWrapperClick","handleAction","overlayEvent","useSameTarget","handleInputEnter","e","action","inputPattern","inputValidator","validateResult","inputRefs","handleClose","onCloseRequested","useLockscreen","toRefs","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","$options","_component_el_icon","resolveComponent","_component_close","_component_el_input","_component_el_button","_component_el_focus_trap","_component_el_overlay","openBlock","createBlock","Transition","$event","withCtx","withDirectives","createVNode","createElementVNode","normalizeClass","args","normalizeStyle","withModifiers","createElementBlock","resolveDynamicComponent","createCommentVNode","toDisplayString","withKeys","renderSlot","createTextVNode","vShow","MessageBoxConstructor","_export_sfc","messageInstance","initInstance","container","appContext","vnode","h","render","genContainer","showMessage","options","vm","currentMsg","resolve","instance","prop","hasOwn","newVal","oldVal","isVNode","MessageBox","isClient","callback","isString","reject","MESSAGE_BOX_VARIANTS","MESSAGE_BOX_DEFAULT_OPTS","boxType","messageBoxFactory","message","titleOrOpts","title","isObject","isUndefined","_","_MessageBox","app","ElMessageBox"],"mappings":"+mBAEA,MAAMA,GAAmB,CAACC,EAAQC,IAAiB,CACjD,IAAIC,EACJC,EAAM,IAAMH,EAAO,MAAQI,GAAQ,CACjC,IAAIC,EAAIC,EACJF,GACFF,EAAiB,SAAS,cACtBK,GAAMN,CAAY,KACnBK,GAAMD,EAAKJ,EAAa,OAAO,QAAU,MAAgBK,EAAG,KAAKD,CAAE,IAMpEH,EAAe,MAAK,CAG5B,CAAG,CACH,ECbMM,EAAqB,uBAErBC,EAAc,CAAA,EACdC,GAAiB,GAAM,CAE3B,GAAID,EAAY,SAAW,EACzB,OACF,MAAME,EAAmBF,EAAYA,EAAY,OAAS,CAAC,EAAED,CAAkB,EAC/E,GAAIG,EAAiB,OAAS,GAAK,EAAE,OAASC,GAAW,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,EAAY,QACnDC,EAAI,OAAO,iBAAiB,QAAUD,EAAY,MACpD,EACK,MAACE,GAAeF","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"index-b8357360.js","sources":["../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/hooks/use-restore-active/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/directives/trap-focus/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/message-box/src/index.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/message-box/src/messageBox.mjs","../../node_modules/.pnpm/element-plus@2.2.13_vue@3.3.4/node_modules/element-plus/es/components/message-box/index.mjs"],"sourcesContent":["import { watch, isRef } from 'vue';\n\nconst useRestoreActive = (toggle, initialFocus) => {\n let previousActive;\n watch(() => toggle.value, (val) => {\n var _a, _b;\n if (val) {\n previousActive = document.activeElement;\n if (isRef(initialFocus)) {\n (_b = (_a = initialFocus.value).focus) == null ? void 0 : _b.call(_a);\n }\n } else {\n if (process.env.NODE_ENV === \"test\") {\n previousActive.focus.call(previousActive);\n } else {\n previousActive.focus();\n }\n }\n });\n};\n\nexport { useRestoreActive };\n//# sourceMappingURL=index.mjs.map\n","import { nextTick } from 'vue';\nimport '../../utils/index.mjs';\nimport '../../constants/index.mjs';\nimport { EVENT_CODE } from '../../constants/aria.mjs';\nimport { obtainAllFocusableElements } from '../../utils/dom/aria.mjs';\n\nconst FOCUSABLE_CHILDREN = \"_trap-focus-children\";\nconst TRAP_FOCUS_HANDLER = \"_trap-focus-handler\";\nconst FOCUS_STACK = [];\nconst FOCUS_HANDLER = (e) => {\n var _a;\n if (FOCUS_STACK.length === 0)\n return;\n const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];\n if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {\n if (focusableElement.length === 1) {\n e.preventDefault();\n if (document.activeElement !== focusableElement[0]) {\n focusableElement[0].focus();\n }\n return;\n }\n const goingBackward = e.shiftKey;\n const isFirst = e.target === focusableElement[0];\n const isLast = e.target === focusableElement[focusableElement.length - 1];\n if (isFirst && goingBackward) {\n e.preventDefault();\n focusableElement[focusableElement.length - 1].focus();\n }\n if (isLast && !goingBackward) {\n e.preventDefault();\n focusableElement[0].focus();\n }\n if (process.env.NODE_ENV === \"test\") {\n const index = focusableElement.indexOf(e.target);\n if (index !== -1) {\n (_a = focusableElement[goingBackward ? index - 1 : index + 1]) == null ? void 0 : _a.focus();\n }\n }\n }\n};\nconst TrapFocus = {\n beforeMount(el) {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n FOCUS_STACK.push(el);\n if (FOCUS_STACK.length <= 1) {\n document.addEventListener(\"keydown\", FOCUS_HANDLER);\n }\n },\n updated(el) {\n nextTick(() => {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n });\n },\n unmounted() {\n FOCUS_STACK.shift();\n if (FOCUS_STACK.length === 0) {\n document.removeEventListener(\"keydown\", FOCUS_HANDLER);\n }\n }\n};\n\nexport { FOCUSABLE_CHILDREN, TRAP_FOCUS_HANDLER, TrapFocus as default };\n//# sourceMappingURL=index.mjs.map\n","import { defineComponent, ref, reactive, computed, watch, nextTick, onMounted, onBeforeUnmount, toRefs, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, createTextVNode, vShow } from 'vue';\nimport { ElButton } from '../../button/index.mjs';\nimport '../../../directives/index.mjs';\nimport '../../../hooks/index.mjs';\nimport { ElInput } from '../../input/index.mjs';\nimport { ElOverlay } from '../../overlay/index.mjs';\nimport '../../../utils/index.mjs';\nimport { ElIcon } from '../../icon/index.mjs';\nimport '../../focus-trap/index.mjs';\nimport _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';\nimport TrapFocus from '../../../directives/trap-focus/index.mjs';\nimport ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';\nimport { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';\nimport { isValidComponentSize } from '../../../utils/vue/validator.mjs';\nimport { useLocale } from '../../../hooks/use-locale/index.mjs';\nimport { useNamespace } from '../../../hooks/use-namespace/index.mjs';\nimport { useZIndex } from '../../../hooks/use-z-index/index.mjs';\nimport { useId } from '../../../hooks/use-id/index.mjs';\nimport { useSize } from '../../../hooks/use-common-props/index.mjs';\nimport { useDraggable } from '../../../hooks/use-draggable/index.mjs';\nimport { useSameTarget } from '../../../hooks/use-same-target/index.mjs';\nimport { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';\nimport { useRestoreActive } from '../../../hooks/use-restore-active/index.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"ElMessageBox\",\n directives: {\n TrapFocus\n },\n components: {\n ElButton,\n ElFocusTrap,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String,\n validator: isValidComponentSize\n },\n modal: {\n type: Boolean,\n default: true\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n showClose: {\n type: Boolean,\n default: true\n },\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n closeOnHashChange: {\n type: Boolean,\n default: true\n },\n center: Boolean,\n draggable: Boolean,\n roundButton: {\n default: false,\n type: Boolean\n },\n container: {\n type: String,\n default: \"body\"\n },\n boxType: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"vanish\", \"action\"],\n setup(props, { emit }) {\n const { t } = useLocale();\n const ns = useNamespace(\"message-box\");\n const visible = ref(false);\n const { nextZIndex } = useZIndex();\n const state = reactive({\n autofocus: true,\n beforeClose: null,\n callback: null,\n cancelButtonText: \"\",\n cancelButtonClass: \"\",\n confirmButtonText: \"\",\n confirmButtonClass: \"\",\n customClass: \"\",\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: \"\",\n inputPattern: null,\n inputPlaceholder: \"\",\n inputType: \"text\",\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: \"\",\n message: null,\n modalFade: true,\n modalClass: \"\",\n showCancelButton: false,\n showConfirmButton: true,\n type: \"\",\n title: void 0,\n showInput: false,\n action: \"\",\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: \"\",\n validateError: false,\n zIndex: nextZIndex()\n });\n const typeClass = computed(() => {\n const type = state.type;\n return { [ns.bm(\"icon\", type)]: type && TypeComponentsMap[type] };\n });\n const contentId = useId();\n const inputId = useId();\n const btnSize = useSize(computed(() => props.buttonSize), { prop: true, form: true, formItem: true });\n const iconComponent = computed(() => state.icon || TypeComponentsMap[state.type] || \"\");\n const hasMessage = computed(() => !!state.message);\n const rootRef = ref();\n const headerRef = ref();\n const focusStartRef = ref();\n const inputRef = ref();\n const confirmRef = ref();\n const confirmButtonClasses = computed(() => state.confirmButtonClass);\n watch(() => state.inputValue, async (val) => {\n await nextTick();\n if (props.boxType === \"prompt\" && val !== null) {\n validate();\n }\n }, { immediate: true });\n watch(() => visible.value, (val) => {\n var _a, _b;\n if (val) {\n if (props.boxType !== \"prompt\") {\n if (state.autofocus) {\n focusStartRef.value = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) != null ? _b : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n state.zIndex = nextZIndex();\n }\n if (props.boxType !== \"prompt\")\n return;\n if (val) {\n nextTick().then(() => {\n var _a2;\n if (inputRef.value && inputRef.value.$el) {\n if (state.autofocus) {\n focusStartRef.value = (_a2 = getInputElement()) != null ? _a2 : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n });\n } else {\n state.editorErrorMessage = \"\";\n state.validateError = false;\n }\n });\n const draggable = computed(() => props.draggable);\n useDraggable(rootRef, headerRef, draggable);\n onMounted(async () => {\n await nextTick();\n if (props.closeOnHashChange) {\n window.addEventListener(\"hashchange\", doClose);\n }\n });\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n window.removeEventListener(\"hashchange\", doClose);\n }\n });\n function doClose() {\n if (!visible.value)\n return;\n visible.value = false;\n nextTick(() => {\n if (state.action)\n emit(\"action\", state.action);\n });\n }\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? \"close\" : \"cancel\");\n }\n };\n const overlayEvent = useSameTarget(handleWrapperClick);\n const handleInputEnter = (e) => {\n if (state.inputType !== \"textarea\") {\n e.preventDefault();\n return handleAction(\"confirm\");\n }\n };\n const handleAction = (action) => {\n var _a;\n if (props.boxType === \"prompt\" && action === \"confirm\" && !validate()) {\n return;\n }\n state.action = action;\n if (state.beforeClose) {\n (_a = state.beforeClose) == null ? void 0 : _a.call(state, action, state, doClose);\n } else {\n doClose();\n }\n };\n const validate = () => {\n if (props.boxType === \"prompt\") {\n const inputPattern = state.inputPattern;\n if (inputPattern && !inputPattern.test(state.inputValue || \"\")) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n const inputValidator = state.inputValidator;\n if (typeof inputValidator === \"function\") {\n const validateResult = inputValidator(state.inputValue);\n if (validateResult === false) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n if (typeof validateResult === \"string\") {\n state.editorErrorMessage = validateResult;\n state.validateError = true;\n return false;\n }\n }\n }\n state.editorErrorMessage = \"\";\n state.validateError = false;\n return true;\n };\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs;\n return inputRefs.input || inputRefs.textarea;\n };\n const handleClose = () => {\n handleAction(\"close\");\n };\n const onCloseRequested = () => {\n if (props.closeOnPressEscape) {\n handleClose();\n }\n };\n if (props.lockScroll) {\n useLockscreen(visible);\n }\n useRestoreActive(visible);\n return {\n ...toRefs(state),\n ns,\n overlayEvent,\n visible,\n hasMessage,\n typeClass,\n contentId,\n inputId,\n btnSize,\n iconComponent,\n confirmButtonClasses,\n rootRef,\n focusStartRef,\n headerRef,\n inputRef,\n confirmRef,\n doClose,\n handleClose,\n onCloseRequested,\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t\n };\n }\n});\nconst _hoisted_1 = [\"aria-label\", \"aria-describedby\"];\nconst _hoisted_2 = [\"aria-label\"];\nconst _hoisted_3 = [\"id\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_icon = resolveComponent(\"el-icon\");\n const _component_close = resolveComponent(\"close\");\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_focus_trap = resolveComponent(\"el-focus-trap\");\n const _component_el_overlay = resolveComponent(\"el-overlay\");\n return openBlock(), createBlock(Transition, {\n name: \"fade-in-linear\",\n onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit(\"vanish\")),\n persisted: \"\"\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_overlay, {\n \"z-index\": _ctx.zIndex,\n \"overlay-class\": [_ctx.ns.is(\"message-box\"), _ctx.modalClass],\n mask: _ctx.modal\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n role: \"dialog\",\n \"aria-label\": _ctx.title,\n \"aria-modal\": \"true\",\n \"aria-describedby\": !_ctx.showInput ? _ctx.contentId : void 0,\n class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),\n onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),\n onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),\n onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))\n }, [\n createVNode(_component_el_focus_trap, {\n loop: \"\",\n trapped: _ctx.visible,\n \"focus-trap-el\": _ctx.rootRef,\n \"focus-start-el\": _ctx.focusStartRef,\n onReleaseRequested: _ctx.onCloseRequested\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n ref: \"rootRef\",\n class: normalizeClass([\n _ctx.ns.b(),\n _ctx.customClass,\n _ctx.ns.is(\"draggable\", _ctx.draggable),\n { [_ctx.ns.m(\"center\")]: _ctx.center }\n ]),\n style: normalizeStyle(_ctx.customStyle),\n tabindex: \"-1\",\n onClick: _cache[7] || (_cache[7] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n ref: \"headerRef\",\n class: normalizeClass(_ctx.ns.e(\"header\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"title\"))\n }, [\n _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"span\", null, toDisplayString(_ctx.title), 1)\n ], 2),\n _ctx.showClose ? (openBlock(), createElementBlock(\"button\", {\n key: 0,\n type: \"button\",\n class: normalizeClass(_ctx.ns.e(\"headerbtn\")),\n \"aria-label\": _ctx.t(\"el.messagebox.close\"),\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\")),\n onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, [\n createVNode(_component_el_icon, {\n class: normalizeClass(_ctx.ns.e(\"close\"))\n }, {\n default: withCtx(() => [\n createVNode(_component_close)\n ]),\n _: 1\n }, 8, [\"class\"])\n ], 42, _hoisted_2)) : createCommentVNode(\"v-if\", true)\n ], 2)) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"div\", {\n id: _ctx.contentId,\n class: normalizeClass(_ctx.ns.e(\"content\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"container\"))\n }, [\n _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n _ctx.hasMessage ? (openBlock(), createElementBlock(\"div\", {\n key: 1,\n class: normalizeClass(_ctx.ns.e(\"message\"))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 0,\n for: _ctx.showInput ? _ctx.inputId : void 0\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(!_ctx.dangerouslyUseHTMLString ? _ctx.message : \"\"), 1)\n ]),\n _: 1\n }, 8, [\"for\"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 1,\n for: _ctx.showInput ? _ctx.inputId : void 0,\n innerHTML: _ctx.message\n }, null, 8, [\"for\", \"innerHTML\"]))\n ])\n ], 2)) : createCommentVNode(\"v-if\", true)\n ], 2),\n withDirectives(createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"input\"))\n }, [\n createVNode(_component_el_input, {\n id: _ctx.inputId,\n ref: \"inputRef\",\n modelValue: _ctx.inputValue,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),\n type: _ctx.inputType,\n placeholder: _ctx.inputPlaceholder,\n \"aria-invalid\": _ctx.validateError,\n class: normalizeClass({ invalid: _ctx.validateError }),\n onKeydown: withKeys(_ctx.handleInputEnter, [\"enter\"])\n }, null, 8, [\"id\", \"modelValue\", \"type\", \"placeholder\", \"aria-invalid\", \"class\", \"onKeydown\"]),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"errormsg\")),\n style: normalizeStyle({\n visibility: !!_ctx.editorErrorMessage ? \"visible\" : \"hidden\"\n })\n }, toDisplayString(_ctx.editorErrorMessage), 7)\n ], 2), [\n [vShow, _ctx.showInput]\n ])\n ], 10, _hoisted_3),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"btns\"))\n }, [\n _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {\n key: 0,\n loading: _ctx.cancelButtonLoading,\n class: normalizeClass([_ctx.cancelButtonClass]),\n round: _ctx.roundButton,\n size: _ctx.btnSize,\n onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction(\"cancel\")),\n onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction(\"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t(\"el.messagebox.cancel\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"size\"])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(_component_el_button, {\n ref: \"confirmRef\",\n type: \"primary\",\n loading: _ctx.confirmButtonLoading,\n class: normalizeClass([_ctx.confirmButtonClasses]),\n round: _ctx.roundButton,\n disabled: _ctx.confirmButtonDisabled,\n size: _ctx.btnSize,\n onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction(\"confirm\")),\n onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction(\"confirm\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t(\"el.messagebox.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"disabled\", \"size\"]), [\n [vShow, _ctx.showConfirmButton]\n ])\n ], 2)\n ], 6)\n ]),\n _: 3\n }, 8, [\"trapped\", \"focus-trap-el\", \"focus-start-el\", \"onReleaseRequested\"])\n ], 42, _hoisted_1)\n ]),\n _: 3\n }, 8, [\"z-index\", \"overlay-class\", \"mask\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 3\n });\n}\nvar MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__file\", \"/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue\"]]);\n\nexport { MessageBoxConstructor as default };\n//# sourceMappingURL=index.mjs.map\n","import { h, render, watch, isVNode } from 'vue';\nimport { isClient } from '@vueuse/core';\nimport '../../../utils/index.mjs';\nimport MessageBoxConstructor from './index.mjs';\nimport { hasOwn, isString, isObject } from '@vue/shared';\nimport { isUndefined } from '../../../utils/types.mjs';\n\nconst messageInstance = /* @__PURE__ */ new Map();\nconst initInstance = (props, container, appContext = null) => {\n const vnode = h(MessageBoxConstructor, props);\n vnode.appContext = appContext;\n render(vnode, container);\n document.body.appendChild(container.firstElementChild);\n return vnode.component;\n};\nconst genContainer = () => {\n return document.createElement(\"div\");\n};\nconst showMessage = (options, appContext) => {\n const container = genContainer();\n options.onVanish = () => {\n render(null, container);\n messageInstance.delete(vm);\n };\n options.onAction = (action) => {\n const currentMsg = messageInstance.get(vm);\n let resolve;\n if (options.showInput) {\n resolve = { value: vm.inputValue, action };\n } else {\n resolve = action;\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy);\n } else {\n if (action === \"cancel\" || action === \"close\") {\n if (options.distinguishCancelAndClose && action !== \"cancel\") {\n currentMsg.reject(\"close\");\n } else {\n currentMsg.reject(\"cancel\");\n }\n } else {\n currentMsg.resolve(resolve);\n }\n }\n };\n const instance = initInstance(options, container, appContext);\n const vm = instance.proxy;\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop] = options[prop];\n }\n }\n watch(() => vm.message, (newVal, oldVal) => {\n if (isVNode(newVal)) {\n instance.slots.default = () => [newVal];\n } else if (isVNode(oldVal) && !isVNode(newVal)) {\n delete instance.slots.default;\n }\n }, {\n immediate: true\n });\n vm.visible = true;\n return vm;\n};\nfunction MessageBox(options, appContext = null) {\n if (!isClient)\n return Promise.reject();\n let callback;\n if (isString(options) || isVNode(options)) {\n options = {\n message: options\n };\n } else {\n callback = options.callback;\n }\n return new Promise((resolve, reject) => {\n const vm = showMessage(options, appContext != null ? appContext : MessageBox._context);\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject\n });\n });\n}\nconst MESSAGE_BOX_VARIANTS = [\"alert\", \"confirm\", \"prompt\"];\nconst MESSAGE_BOX_DEFAULT_OPTS = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true }\n};\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n MessageBox[boxType] = messageBoxFactory(boxType);\n});\nfunction messageBoxFactory(boxType) {\n return (message, titleOrOpts, options, appContext) => {\n let title;\n if (isObject(titleOrOpts)) {\n options = titleOrOpts;\n title = \"\";\n } else if (isUndefined(titleOrOpts)) {\n title = \"\";\n } else {\n title = titleOrOpts;\n }\n return MessageBox(Object.assign({\n title,\n message,\n type: \"\",\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType]\n }, options, {\n boxType\n }), appContext);\n };\n}\nMessageBox.close = () => {\n messageInstance.forEach((_, vm) => {\n vm.doClose();\n });\n messageInstance.clear();\n};\nMessageBox._context = null;\n\nexport { MessageBox as default };\n//# sourceMappingURL=messageBox.mjs.map\n","import MessageBox from './src/messageBox.mjs';\nimport './src/message-box.type.mjs';\n\nconst _MessageBox = MessageBox;\n_MessageBox.install = (app) => {\n _MessageBox._context = app._context;\n app.config.globalProperties.$msgbox = _MessageBox;\n app.config.globalProperties.$messageBox = _MessageBox;\n app.config.globalProperties.$alert = _MessageBox.alert;\n app.config.globalProperties.$confirm = _MessageBox.confirm;\n app.config.globalProperties.$prompt = _MessageBox.prompt;\n};\nconst ElMessageBox = _MessageBox;\n\nexport { ElMessageBox, _MessageBox as default };\n//# sourceMappingURL=index.mjs.map\n"],"names":["useRestoreActive","toggle","initialFocus","previousActive","watch","val","_a","_b","isRef","FOCUSABLE_CHILDREN","FOCUS_STACK","FOCUS_HANDLER","focusableElement","EVENT_CODE","goingBackward","isFirst","isLast","TrapFocus","el","obtainAllFocusableElements","nextTick","_sfc_main","defineComponent","ElButton","ElFocusTrap","ElInput","ElOverlay","ElIcon","TypeComponents","isValidComponentSize","props","emit","t","useLocale","ns","useNamespace","visible","ref","nextZIndex","useZIndex","state","reactive","typeClass","computed","type","TypeComponentsMap","contentId","useId","inputId","btnSize","useSize","iconComponent","hasMessage","rootRef","headerRef","focusStartRef","inputRef","confirmRef","confirmButtonClasses","validate","_a2","getInputElement","draggable","useDraggable","onMounted","doClose","onBeforeUnmount","handleWrapperClick","handleAction","overlayEvent","useSameTarget","handleInputEnter","e","action","inputPattern","inputValidator","validateResult","inputRefs","handleClose","onCloseRequested","useLockscreen","toRefs","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","$options","_component_el_icon","resolveComponent","_component_close","_component_el_input","_component_el_button","_component_el_focus_trap","_component_el_overlay","openBlock","createBlock","Transition","$event","withCtx","withDirectives","createVNode","createElementVNode","normalizeClass","args","normalizeStyle","withModifiers","createElementBlock","resolveDynamicComponent","createCommentVNode","toDisplayString","withKeys","renderSlot","createTextVNode","vShow","MessageBoxConstructor","_export_sfc","messageInstance","initInstance","container","appContext","vnode","h","render","genContainer","showMessage","options","vm","currentMsg","resolve","instance","prop","hasOwn","newVal","oldVal","isVNode","MessageBox","isClient","callback","isString","reject","MESSAGE_BOX_VARIANTS","MESSAGE_BOX_DEFAULT_OPTS","boxType","messageBoxFactory","message","titleOrOpts","title","isObject","isUndefined","_","_MessageBox","app","ElMessageBox"],"mappings":"+mBAEA,MAAMA,GAAmB,CAACC,EAAQC,IAAiB,CACjD,IAAIC,EACJC,EAAM,IAAMH,EAAO,MAAQI,GAAQ,CACjC,IAAIC,EAAIC,EACJF,GACFF,EAAiB,SAAS,cACtBK,GAAMN,CAAY,KACnBK,GAAMD,EAAKJ,EAAa,OAAO,QAAU,MAAgBK,EAAG,KAAKD,CAAE,IAMpEH,EAAe,MAAK,CAG5B,CAAG,CACH,ECbMM,EAAqB,uBAErBC,EAAc,CAAA,EACdC,GAAiB,GAAM,CAE3B,GAAID,EAAY,SAAW,EACzB,OACF,MAAME,EAAmBF,EAAYA,EAAY,OAAS,CAAC,EAAED,CAAkB,EAC/E,GAAIG,EAAiB,OAAS,GAAK,EAAE,OAASC,GAAW,IAAK,CAC5D,GAAID,EAAiB,SAAW,EAAG,CACjC,EAAE,eAAc,EACZ,SAAS,gBAAkBA,EAAiB,CAAC,GAC/CA,EAAiB,CAAC,EAAE,QAEtB,MACD,CACD,MAAME,EAAgB,EAAE,SAClBC,EAAU,EAAE,SAAWH,EAAiB,CAAC,EACzCI,EAAS,EAAE,SAAWJ,EAAiBA,EAAiB,OAAS,CAAC,EACpEG,GAAWD,IACb,EAAE,eAAc,EAChBF,EAAiBA,EAAiB,OAAS,CAAC,EAAE,MAAK,GAEjDI,GAAU,CAACF,IACb,EAAE,eAAc,EAChBF,EAAiB,CAAC,EAAE,QAQvB,CACH,EACMK,GAAY,CAChB,YAAYC,EAAI,CACdA,EAAGT,CAAkB,EAAIU,GAA2BD,CAAE,EACtDR,EAAY,KAAKQ,CAAE,EACfR,EAAY,QAAU,GACxB,SAAS,iBAAiB,UAAWC,EAAa,CAErD,EACD,QAAQO,EAAI,CACVE,EAAS,IAAM,CACbF,EAA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AAIC,GAASF,CAAW,GACtBpB,EAAUoB,EACVC,EAAQ,IACCE,GAAYH,CAAW,EAChCC,EAAQ,GAERA,EAAQD,EAEHV,EAAW,OAAO,OAAO,CAC9B,MAAAW,EACA,QAAAF,EACA,KAAM,GACN,GAAGH,GAAyBC,CAAO,CACpC,EAAEjB,EAAS,CACV,QAAAiB,CACN,CAAK,EAAGvB,CAAU,CAClB,CACA,CACAgB,EAAW,MAAQ,IAAM,CACvBnB,EAAgB,QAAQ,CAACiC,EAAGvB,IAAO,CACjCA,EAAG,QAAO,CACd,CAAG,EACDV,EAAgB,MAAK,CACvB,EACAmB,EAAW,SAAW,KCvHtB,MAAMe,EAAcf,EACpBe,EAAY,QAAWC,GAAQ,CAC7BD,EAAY,SAAWC,EAAI,SAC3BA,EAAI,OAAO,iBAAiB,QAAUD,EACtCC,EAAI,OAAO,iBAAiB,YAAcD,EAC1CC,EAAI,OAAO,iBAAiB,OAASD,EAAY,MACjDC,EAAI,OAAO,iBAAiB,SAAWD,EAAY,QACnDC,EAAI,OAAO,iBAAiB,QAAUD,EAAY,MACpD,EACK,MAACE,GAAeF","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as I,d as k,f as c,c as r,a as e,h as ce,O as j,r as i,Z as N,a5 as B,o as ie,i as re,a6 as A,F as J,C as G,j as a,w as n,k as w,D as P,bq as L,E as K,s as F,aa as ue,v as pe,x as de,p as _e,e as ve,bp as me,G as he,t as V,b as h,ac as fe,I as ge,_ as $e}from"./index-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{g as I,d as k,f as c,c as r,a as e,h as ce,O as j,r as i,Z as N,a5 as B,o as ie,i as re,a6 as A,F as J,C as G,j as a,w as n,k as w,D as P,bq as L,E as K,s as F,aa as ue,v as pe,x as de,p as _e,e as ve,bp as me,G as he,t as V,b as h,ac as fe,I as ge,_ as $e}from"./index-1639ad54.js";import{v as we}from"./el-loading-e9365e7e.js";import{E as ye}from"./el-dialog-c11c4af2.js";import{E as xe,s as be}from"./el-pagination-85149e11.js";import{E as Ce,a as ze}from"./el-select-2a16e5df.js";import{E as Ve,a as ke}from"./el-table-column-19feeab8.js";import{d as Ee}from"./other-8d7ba6a0.js";import{d as Se}from"./data-board-4290cade.js";import{r as De}from"./refresh-be31af7a.js";import{d as He}from"./data-analysis-632af70e.js";import"./index-68448dbd.js";import"./isEqual-95d6c129.js";import"./validator-5c60ab85.js";const Me=k({name:"Coin"}),Be={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Le=e("path",{fill:"currentColor",d:"m161.92 580.736 29.888 58.88C171.328 659.776 160 681.728 160 704c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 615.808 928 657.664 928 704c0 129.728-188.544 224-416 224S96 833.728 96 704c0-46.592 24.32-88.576 65.92-123.264z"},null,-1),Ie=e("path",{fill:"currentColor",d:"m161.92 388.736 29.888 58.88C171.328 467.84 160 489.792 160 512c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 423.808 928 465.664 928 512c0 129.728-188.544 224-416 224S96 641.728 96 512c0-46.592 24.32-88.576 65.92-123.264z"},null,-1),Te=e("path",{fill:"currentColor",d:"M512 544c-227.456 0-416-94.272-416-224S284.544 96 512 96s416 94.272 416 224-188.544 224-416 224zm0-64c196.672 0 352-77.696 352-160S708.672 160 512 160s-352 77.696-352 160 155.328 160 352 160z"},null,-1),Oe=[Le,Ie,Te];function je(u,y,x,m,o,f){return c(),r("svg",Be,Oe)}var Ne=I(Me,[["render",je]]);const Pe=k({name:"Document"}),Fe={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Ue=e("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"},null,-1),qe=[Ue];function Ae(u,y,x,m,o,f){return c(),r("svg",Fe,qe)}var Je=I(Pe,[["render",Ae]]);const Ge=k({name:"TakeawayBox"}),Ke={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Re=e("path",{fill:"currentColor",d:"M832 384H192v448h640V384zM96 320h832V128H96v192zm800 64v480a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V384H64a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h896a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32h-64zM416 512h192a32 32 0 0 1 0 64H416a32 32 0 0 1 0-64z"},null,-1),We=[Re];function Ze(u,y,x,m,o,f){return c(),r("svg",Ke,We)}var Qe=I(Ge,[["render",Ze]]);const Xe=k({name:"Tickets"}),Ye={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},et=e("path",{fill:"currentColor",d:"M192 128v768h640V128H192zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32zm160 448h384v64H320v-64zm0-192h192v64H320v-64zm0 384h384v64H320v-64z"},null,-1),tt=[et];function at(u,y,x,m,o,f){return c(),r("svg",Ye,tt)}var ot=I(Xe,[["render",at]]);const st=u=>(_e("data-v-c6757aaa"),u=u(),ve(),u),lt={class:"overview"},nt={class:"card-list","element-loading-text":"Loading..."},ct={class:"logo"},it={class:"content"},rt={class:"title"},ut={class:"text"},pt={class:"supplement"},dt={class:"panel"},_t={class:"p10 log-filter"},vt={class:"item"},mt=st(()=>e("span",{class:"label"},"类型",-1)),ht={class:"item"},ft={class:"item"},gt={class:"item"},$t={class:"item"},wt={class:"flex fc p10"},yt={class:"dialog-footer"},xt=k({__name:"index",setup(u){const y=ce(),x=j(()=>y.getters["public/isMobile"]),m=i(!1),o=N([{type:"user",title:"用户数量",value:"0",supplement:"较昨日 +0",icon:me,color:"#40c9c6"},{type:"file",title:"记录/OSS",value:"0",supplement:"记录较昨日 +0",icon:Je,color:"#36a3f7"},{type:"log",title:"日志数量",value:"0",supplement:"较昨日 +0",icon:ot,color:"#f4516c"},{type:"pv",title:"PV/UV",value:"0/0",supplement:"",icon:Se,color:"#34bfa3"},{type:"compress",title:"归档&无效文件",value:"0/0KB",supplement:"已失效0个",icon:Ne,color:"#e38013"}]),f=()=>{m.value=!0,L.getCount().then(s=>{const{user:l,file:d,log:g,pv:_,compress:v}=s.data;o[0].value="".concat(l.sum),o[0].supplement="较昨日 +".concat(l.recent),o[1].value="".concat(d.server.sum,"/").concat(d.oss.sum," (").concat(d.oss.size,")"),o[1].supplement="记录较昨日 +".concat(d.server.recent),o[2].value="".concat(g.sum),o[2].supplement="较昨日 +".concat(g.recent),o[3].value="".concat(_.today.sum,"/").concat(_.today.uv),o[3].supplement="历史: ".concat(_.all.sum,"/").concat(_.all.uv),o[4].value="".concat(v.all.sum,"/").concat(v.all.size),o[4].supplement="已失效 ".concat(v.expired.sum,"/").concat(v.expired.size),m.value=!1})},E=i(!1),R=()=>{E.value=!0,L.clearExpiredCompressFile().then(()=>{setTimeout(()=>{K.success("清理成功,数据同步可能有延迟"),E.value=!1,f()},2e3)})},p=N([]),b=i("behavior"),S=i(""),W=N([{label:"用户行为",type:"behavior"},{label:"网络请求",type:"request"},{label:"服务端错误",type:"error"},{label:"页面访问",type:"pv"}]),C=i(10),Z=s=>{C.value=s},T=i(0),Q=j(()=>Math.ceil(T.value/C.value)),z=i(1),X=s=>{z.value=s},D=Ee(()=>{L.getLogMsg(C.value,z.value,b.value,S.value).then(s=>{p.splice(0,p.length),p.push(...s.data.logs),T.value=s.data.sum})},100,!1);B(()=>{b.value&&(z.value=1)}),B(()=>{S.value!==void 0&&D()}),B(()=>{b.value&&D()}),B(()=>{(z.value||C.value)&&D()});const H=i(!1),O=i(""),Y=s=>{L.getLogMsgDetail(s).then(l=>{H.value=!0,O.value=JSON.stringify(l.data,null,2)})},ee=j(()=>{try{return JSON.parse(O.value)}catch(s){return{}}}),te=()=>{fe(O.value)},ae=()=>{if(p.length===0)return;const s=["日期","IP","内容"],l=p.map(d=>{const{date:g,ip:_,msg:v}=d;return[F(new Date(g)),_,v]});ue(s,l,"导出日志_".concat(p.length,"条").concat(F(new Date,"yyyy年MM月日hh时mm分ss秒"),".xlsx")),K.success("导出成功")};return ie(()=>{f()}),(s,l)=>{const d=ge,g=ze,_=Ce,v=pe,$=de,M=ke,oe=Ve,se=xe,le=re("json-viewer"),ne=ye,U=we;return c(),r("div",lt,[A((c(),r("div",nt,[(c(!0),r(J,null,G(o,t=>(c(),r("div",{key:t.type,class:"card"},[e("div",ct,[a(d,{color:t.color},{default:n(()=>[(c(),P(he(t.icon)))]),_:2},1032,["color"])]),e("div",it,[e("div",rt,V(t.title),1),e("div",ut,V(t.value),1),e("div",pt,V(t.supplement),1)])]))),128))])),[[U,m.value]]),e("div",dt,[e("div",_t,[e("span",vt,[mt,a(_,{modelValue:b.value,"onUpdate:modelValue":l[0]||(l[0]=t=>b.value=t),size:"default",placeholder:"请选择日志类型"},{default:n(()=>[(c(!0),r(J,null,G(W,(t,q)=>(c(),P(g,{key:q,label:t.label,value:t.type},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e("span",ht,[a(v,{size:"default",clearable:"",placeholder:"请输入要检索的内容","prefix-icon":w(be),modelValue:S.value,"onUpdate:modelValue":l[1]||(l[1]=t=>S.value=t)},null,8,["prefix-icon","modelValue"])]),e("span",ft,[a($,{size:"default",icon:w(De),onClick:w(D)},{default:n(()=>[h("刷新")]),_:1},8,["icon","onClick"])]),e("span",gt,[a($,{size:"default",type:"primary",icon:w(He),onClick:ae},{default:n(()=>[h("导出日志 "+V(p.length)+" 条",1)]),_:1},8,["icon"])]),e("span",$t,[A((c(),P($,{size:"default",type:"danger",icon:w(Qe),disabled:E.value,onClick:R},{default:n(()=>[h("清理无效文件")]),_:1},8,["icon","disabled"])),[[U,E.value]])])]),a(oe,{"tooltip-effect":"dark",height:"400",stripe:"",border:"","default-sort":{prop:"date",order:"descending"},data:p,style:{width:"100%"}},{default:n(()=>[a(M,{sortable:"",prop:"date",label:"日期",width:"180"},{default:n(t=>[h(V(w(F)(new Date(t.row.date))),1)]),_:1}),a(M,{sortable:"",prop:"ip",label:"IP",width:"100"}),a(M,{"min-width":"160",prop:"msg",label:"内容"}),a(M,{fixed:"right",label:"操作",width:"100"},{default:n(t=>[a($,{onClick:q=>Y(t.row.id),type:"primary",text:"",size:"small"},{default:n(()=>[h("查看详情")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),e("div",wt,[a(se,{"current-page":z.value,onCurrentChange:X,background:"","page-count":Q.value,"page-sizes":[10,50,100,200,500,1e3],"page-size":C.value,onSizeChange:Z,total:T.value,layout:"total, sizes, prev, pager, next, jumper"},null,8,["current-page","page-count","page-size","total"])])]),a(ne,{modelValue:H.value,"onUpdate:modelValue":l[3]||(l[3]=t=>H.value=t),title:"详细信息",width:"50%",center:"",fullscreen:x.value},{footer:n(()=>[e("span",yt,[a($,{type:"default",onClick:te},{default:n(()=>[h("复制")]),_:1}),a($,{type:"primary",onClick:l[2]||(l[2]=t=>H.value=!1)},{default:n(()=>[h("确定")]),_:1})])]),default:n(()=>[a(le,{value:ee.value,"expand-depth":5,copyable:"",boxed:"",sort:""},null,8,["value"])]),_:1},8,["modelValue","fullscreen"])])}}});const Tt=$e(xt,[["__scopeId","data-v-c6757aaa"]]);export{Tt as default};
|
|
2
|
+
//# sourceMappingURL=index-d09329eb.js.map
|