@web-utils/component 4.0.15 → 5.0.0-beta01
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/address-input/index.mjs +76 -76
- package/affix/index.mjs +71 -78
- package/aside-menu/index.mjs +20 -31
- package/avatar/index.mjs +94 -82
- package/awesome-button/index.mjs +54 -71
- package/capsule-tab/index.mjs +27 -32
- package/card/index.mjs +86 -71
- package/carousel/index.mjs +45 -34
- package/chat/index.mjs +440 -276
- package/chunk-file-uploader/index.mjs +2 -445
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/ChunkFileUploader.C3EA0e5t.mjs +114 -0
- package/chunks/EditableTree.C_IJBL5b.mjs +648 -0
- package/chunks/ElementBaseInfo.DyuFR6fE.mjs +209 -0
- package/chunks/ElementDialog.C0IjriTW.mjs +681 -0
- package/chunks/ElementForm.ButuYDPA.mjs +627 -0
- package/chunks/ElementListeners.Dg3e_dmp.mjs +656 -0
- package/chunks/ElementMultiInstance.Dmi79FqA.mjs +290 -0
- package/chunks/ElementOtherConfig.C2AddGTp.mjs +51 -0
- package/chunks/ElementProperties.CfV8UF7L.mjs +196 -0
- package/chunks/ElementTaskConfig.Bn7ycGGn.mjs +446 -0
- package/chunks/FlowCondition.C6PdqOAW.mjs +194 -0
- package/chunks/FlowDesigner.uJYFfKpR.mjs +5101 -0
- package/chunks/FormBlock.BEENc22F.mjs +117 -0
- package/chunks/FormCascader.CaM-oEhv.mjs +1226 -0
- package/chunks/FormInputTime.Bg3UIP8H.mjs +1773 -0
- package/chunks/FormItem.H9OOvNzT.mjs +90 -0
- package/chunks/FormItemGroup.D9eRy-cZ.mjs +147 -0
- package/chunks/FormSelect.CanodoAI.mjs +1472 -0
- package/chunks/FormSwitch.DTqdaFjv.mjs +296 -0
- package/chunks/FormTemp.DiI5EfgK.mjs +139 -0
- package/chunks/FyCurd.DMj1dMK9.mjs +2622 -0
- package/chunks/FyForm.vgR8ujEF.mjs +904 -0
- package/chunks/FyFormDesign.DEWT6LsX.mjs +5600 -0
- package/chunks/FyUEditor.D_rEYfll.mjs +221 -0
- package/chunks/FyUpload.B2QKfTxF.mjs +504 -0
- package/chunks/Keyboard.ItiRy7Gb.mjs +379 -0
- package/chunks/MonacoEditor.Bd5Kui-Y.mjs +301 -0
- package/chunks/PageableTable.Bujb0NUx.mjs +658 -0
- package/chunks/RecordVideo.B35_dLty.mjs +116 -0
- package/chunks/SignalAndMessage.CYVzlFuL.mjs +198 -0
- package/chunks/SplitPane.Dw96M0Yf.mjs +219 -0
- package/chunks/TableColumn.DJYkznbJ.mjs +180 -0
- package/chunks/TableView.DyIdIxAg.mjs +484 -0
- package/chunks/Toolbar.DHuXJAoG.mjs +219 -0
- package/chunks/UserTaskListeners.Bp-2qkHs.mjs +599 -0
- package/chunks/VueCron.GfjodnyM.mjs +1766 -0
- package/chunks/VueTreeSelect.9Ywl-I8e.mjs +1872 -0
- package/chunks/_plugin-vue_export-helper.7vrlOII_.mjs +8 -0
- package/chunks/checkbox.emIuFmnt.mjs +437 -0
- package/chunks/confirmable-mixin.BBil7dto.mjs +1646 -0
- package/chunks/core.DJv6Qrae.mjs +51 -0
- package/chunks/dataformat.Bfr4nOcA.mjs +144 -0
- package/chunks/dic.DgDfnovD.mjs +116 -0
- package/chunks/dictionary.5eKjWeAp.mjs +19 -0
- package/chunks/dictionary.DxZxP0ej.mjs +87 -0
- package/chunks/event.B4iwtUNO.mjs +4 -0
- package/chunks/event.eJ-c1Z3a.mjs +224 -0
- package/chunks/focus-trap.DT4GnqQI.mjs +211 -0
- package/chunks/form-input.D25eDRMq.mjs +34 -0
- package/chunks/form-item.CgmUuw_n.mjs +714 -0
- package/chunks/form-pick.Axem0gOO.mjs +7 -0
- package/chunks/form-validate.B1KPCHqN.mjs +11 -0
- package/chunks/icon.CbS8-322.mjs +259 -0
- package/chunks/init.DwpukyOB.mjs +115 -0
- package/chunks/input.PejnqwSH.mjs +547 -0
- package/chunks/install.yLcn5MLL.mjs +84 -0
- package/chunks/message.BCmee5N0.mjs +400 -0
- package/chunks/overlay.DubSnqma.mjs +122 -0
- package/chunks/packages.BGjydzjm.mjs +56 -0
- package/chunks/permission.DgEVNWlh.mjs +16 -0
- package/chunks/photo-swipe.BB0SJZg9.mjs +55 -0
- package/chunks/radio.BotKXqJr.mjs +274 -0
- package/chunks/scroll.CzORc5Zk.mjs +28 -0
- package/chunks/scrollbar.CAmrlKi9.mjs +345 -0
- package/chunks/slot.C6Ozd2e7.mjs +25 -0
- package/chunks/style.BmlGmjpO.mjs +325 -0
- package/chunks/sub-table-plus-props.B_lLth3j.mjs +28 -0
- package/chunks/tab-mixin.u0EZpx3j.mjs +70 -0
- package/chunks/tag.DPi-PLbb.mjs +141 -0
- package/chunks/teleport._VGEzK4d.mjs +22 -0
- package/chunks/tooltip.D50x7Rva.mjs +1926 -0
- package/chunks/typescript.DiWBU4nj.mjs +4 -0
- package/chunks/use-aria.BW7nWOl1.mjs +17 -0
- package/chunks/use-composition.mUaomyno.mjs +47 -0
- package/chunks/use-deprecated.BfDSbZS9.mjs +12 -0
- package/chunks/use-empty-values.Dy_r78F6.mjs +263 -0
- package/chunks/use-form-item.wsRjehHp.mjs +47 -0
- package/chunks/use-global-config.C9hs-O_x.mjs +56 -0
- package/chunks/use-id.CFO5NeoV.mjs +15 -0
- package/chunks/use-size.DxrwTUwf.mjs +18 -0
- package/chunks/util.B3sjVZoZ.mjs +103 -0
- package/chunks/util.g-WQEec9.mjs +223 -0
- package/chunks/utilSelf.ZED4DmCU.mjs +46 -0
- package/chunks/utils.Cs2fYBrT.mjs +60 -0
- package/chunks/utils.DsGhtCIO.mjs +14 -0
- package/chunks/validator.C4-z_t9p.mjs +5 -0
- package/chunks/vnode.D_SioRnx.mjs +14 -0
- package/code-mirror-editor/index.mjs +89 -88
- package/comment/index.mjs +62 -57
- package/configComponents.mjs +40 -50
- package/confirm-button/index.mjs +34 -46
- package/confirmable/index.mjs +7 -17
- package/context-menu/index.mjs +195 -174
- package/count-up/index.mjs +97 -105
- package/custom-scrollbar/index.mjs +91 -98
- package/data-box/index.mjs +64 -47
- package/data-card/index.mjs +60 -49
- package/data-card-text/index.mjs +63 -51
- package/data-display/index.mjs +71 -53
- package/data-icons/index.mjs +70 -53
- package/data-imgtext/index.mjs +67 -46
- package/data-operatext/index.mjs +51 -42
- package/data-panel/index.mjs +57 -47
- package/data-pay/index.mjs +105 -52
- package/data-price/index.mjs +48 -42
- package/data-progress/index.mjs +67 -48
- package/data-rotate/index.mjs +61 -47
- package/data-table-picker/index.mjs +119 -74
- package/data-tabs/index.mjs +67 -47
- package/dialog-form/index.mjs +139 -89
- package/dynamic-table/index.mjs +166 -114
- package/e-charts/index.mjs +174 -200
- package/easy-popup/index.mjs +91 -102
- package/editable-progress/index.mjs +112 -85
- package/editable-tree/index.mjs +2 -485
- package/element-dialog/index.mjs +2 -307
- package/element-listeners/style.css +1 -0
- package/element-multi-instance/style.css +1 -0
- package/ellipsis/index.mjs +124 -148
- package/empty-view/index.mjs +48 -65
- package/error-view/index.mjs +39 -51
- package/flex-column/index.mjs +32 -51
- package/flex-item/index.mjs +54 -64
- package/flex-row/index.mjs +32 -39
- package/flex-scroller/index.mjs +29 -30
- package/flow/index.mjs +240 -248
- package/flow-designer/index.mjs +2 -5983
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +56 -64
- package/flow-viewer/index.mjs +159 -157
- package/form-block/index.mjs +2 -149
- package/form-button/index.mjs +35 -47
- package/form-card/index.mjs +14 -25
- package/form-cascader/index.mjs +2 -116
- package/form-checkbox/index.mjs +89 -71
- package/form-checkbox-group/index.mjs +161 -116
- package/form-date-picker/index.mjs +155 -144
- package/form-holder/index.mjs +137 -110
- package/form-input/index.mjs +113 -87
- package/form-input-cron-expression/index.mjs +97 -79
- package/form-input-email/index.mjs +64 -52
- package/form-input-id-card/index.mjs +72 -55
- package/form-input-phone-number/index.mjs +71 -57
- package/form-input-tag/index.mjs +88 -62
- package/form-input-time/index.mjs +2 -74
- package/form-item/index.mjs +2 -5
- package/form-item-config-provider/index.mjs +46 -60
- package/form-item-group/index.mjs +2 -160
- package/form-radio-group/index.mjs +161 -122
- package/form-select/index.mjs +2 -181
- package/form-switch/index.mjs +2 -55
- package/form-table/index.mjs +131 -85
- package/form-table-plus/index.mjs +164 -109
- package/form-textarea/index.mjs +90 -57
- package/form-tree-select/index.mjs +89 -72
- package/form-tree-select-multiple/index.mjs +92 -78
- package/form-view/index.mjs +275 -211
- package/fy-array/index.mjs +121 -74
- package/fy-article/index.mjs +73 -60
- package/fy-cascader/index.mjs +113 -91
- package/fy-checkbox/index.mjs +96 -66
- package/fy-code/index.mjs +48 -50
- package/fy-curd/index.mjs +2 -1903
- package/fy-date/index.mjs +76 -42
- package/fy-draggable/index.mjs +322 -318
- package/fy-dynamic/index.mjs +259 -227
- package/fy-empty/index.mjs +35 -36
- package/fy-form/index.mjs +2 -17
- package/fy-form-design/index.mjs +2 -2890
- package/fy-form-design/style.css +1 -1
- package/fy-from/crud/zh.d.ts +6 -6
- package/fy-input/index.mjs +117 -99
- package/fy-input-color/index.mjs +77 -56
- package/fy-input-icon/index.mjs +129 -85
- package/fy-input-map/index.mjs +242 -186
- package/fy-input-number/index.mjs +74 -50
- package/fy-input-table/index.mjs +160 -109
- package/fy-input-tree/index.mjs +259 -182
- package/fy-progress/index.mjs +36 -40
- package/fy-radio/index.mjs +53 -38
- package/fy-rate/index.mjs +86 -71
- package/fy-select/index.mjs +223 -140
- package/fy-slider/index.mjs +68 -44
- package/fy-switch/index.mjs +67 -42
- package/fy-tabs/index.mjs +46 -48
- package/fy-time/index.mjs +81 -53
- package/fy-title/index.mjs +18 -27
- package/fy-tree/index.mjs +382 -292
- package/fy-u-editor/index.mjs +2 -357
- package/fy-upload/index.mjs +2 -423
- package/guide-steps/index.mjs +72 -73
- package/helper-function.d.ts +2 -30
- package/helper-function.mjs +41 -67
- package/highlight-j-s/index.mjs +50 -59
- package/icon-card/index.mjs +34 -36
- package/icon-temp/index.mjs +27 -27
- package/iframe-window/index.mjs +39 -33
- package/image-cropper/index.mjs +171 -75
- package/image-preview/index.mjs +187 -118
- package/image-viewer/index.mjs +69 -66
- package/index.d.ts +3 -9
- package/index.mjs +173 -488
- package/input-number-range/index.mjs +78 -59
- package/j-s-x-component/index.mjs +13 -15
- package/keyboard/index.mjs +2 -369
- package/license/index.mjs +106 -115
- package/loading-view/index.mjs +39 -51
- package/login/index.mjs +252 -125
- package/monaco-editor/index.mjs +2 -7
- package/name-avatar/index.mjs +61 -53
- package/nav-bar/index.mjs +33 -31
- package/not-implement/index.mjs +10 -22
- package/notice/index.mjs +100 -94
- package/package.json +3 -3
- package/page/index.mjs +18 -25
- package/page-header/index.mjs +27 -33
- package/page-index/index.mjs +121 -100
- package/page-index-top/index.mjs +79 -79
- package/page-skeleton/index.mjs +48 -45
- package/page-skeleton-new/index.mjs +79 -50
- package/pageable-table/index.mjs +2 -522
- package/pageable-view/index.mjs +279 -275
- package/photo-swipe/index.d.ts +4 -0
- package/photo-swipe/index.mjs +33 -36
- package/picker-table-view/index.mjs +224 -126
- package/present-view/index.mjs +266 -200
- package/queue/index.mjs +45 -53
- package/record-video/index.mjs +2 -134
- package/resize-observer/index.mjs +43 -46
- package/search/index.mjs +116 -109
- package/sign/index.mjs +103 -110
- package/sign-panel/index.mjs +182 -141
- package/skeleton/index.mjs +51 -54
- package/skeleton-panel/index.mjs +33 -38
- package/split-pane/index.mjs +3 -197
- package/stateful/index.mjs +69 -73
- package/static-pageable-table/index.mjs +72 -66
- package/sub-table/index.mjs +508 -219
- package/sub-table-plus/index.mjs +592 -19
- package/swiper/index.mjs +128 -121
- package/tab/index.mjs +117 -119
- package/tab-item/index.mjs +48 -56
- package/table-column/index.mjs +2 -5
- package/table-view/index.mjs +3 -334
- package/tabs-view/index.mjs +109 -106
- package/tag-render/index.mjs +79 -69
- package/text-ellipsis/index.mjs +94 -78
- package/toolbar/index.mjs +2 -255
- package/toolbar-button/index.mjs +145 -121
- package/verify/index.mjs +58 -64
- package/vue-cron/index.mjs +2 -1188
- package/vue-qr-code/index.mjs +30 -54
- package/vue-quill-editor/index.mjs +123 -99
- package/vue-tags-input/index.mjs +348 -431
- package/vue-tree-select/index.mjs +2 -2627
- package/vue-video-player/index.mjs +135 -136
- package/watermark/index.mjs +46 -74
- package/web-types.json +197 -975
- package/x-input-tag/index.mjs +144 -109
- package/chunks/ElementTaskConfig.AvBOzAni.mjs +0 -325
- package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
- package/chunks/FyForm.DriwCJ7b.mjs +0 -765
- package/chunks/MonacoEditor.D31t4FTy.mjs +0 -327
- package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
- package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
- package/chunks/TableColumn.BzivvXMF.mjs +0 -337
- package/chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs +0 -10
- package/chunks/confirmable-mixin.BFZb6pcK.mjs +0 -86
- package/chunks/dataformat.DJoNBlmI.mjs +0 -154
- package/chunks/dic.BinnDitI.mjs +0 -128
- package/chunks/dictionary.DqiP9x2m.mjs +0 -25
- package/chunks/event.DSlcqYHL.mjs +0 -236
- package/chunks/form-input.BtS_J5a2.mjs +0 -31
- package/chunks/form-pick.BFTIVn_i.mjs +0 -11
- package/chunks/form-validate.CVarNHKX.mjs +0 -12
- package/chunks/helper.BiMLcEEk.mjs +0 -41
- package/chunks/index.BmYCjxZQ.mjs +0 -47
- package/chunks/index.CIfe3UB3.mjs +0 -16
- package/chunks/index.Cn7aq-Et.mjs +0 -184
- package/chunks/init.xOlFpTyZ.mjs +0 -122
- package/chunks/packages.ByyangTp.mjs +0 -58
- package/chunks/permission.CO31YIkD.mjs +0 -16
- package/chunks/slot.DXIbhGat.mjs +0 -27
- package/chunks/tab-mixin.BNK6dxLN.mjs +0 -81
- package/chunks/util.DI42t5GU.mjs +0 -241
- package/color-picker/index.mjs +0 -157
- package/egd-collapse/index.mjs +0 -62
- package/egd-collapse-item/index.mjs +0 -72
- package/form-input-number/index.mjs +0 -70
- package/form-input-number/style.css +0 -1
- package/input-number/index.mjs +0 -233
- package/input-number/style.css +0 -1
- package/keep-view-alive/index.mjs +0 -117
- package/search-popover/index.mjs +0 -118
- package/search-popover/style.css +0 -1
- /package/{base.css → utils/style.css} +0 -0
|
@@ -0,0 +1,1226 @@
|
|
|
1
|
+
import { d as e, g as t, o as n, p as r, s as i, t as a } from "./install.yLcn5MLL.mjs";
|
|
2
|
+
import { t as o } from "./_plugin-vue_export-helper.7vrlOII_.mjs";
|
|
3
|
+
import { c as s, d as c, n as l, r as u, u as d } from "./use-empty-values.Dy_r78F6.mjs";
|
|
4
|
+
import { r as f, t as p } from "./event.B4iwtUNO.mjs";
|
|
5
|
+
import { r as m } from "./use-size.DxrwTUwf.mjs";
|
|
6
|
+
import { B as h, E as ee, F as g, L as _, M as v, O as y, S as te, _ as b, b as x, d as ne, j as S, p as re, u as ie, z as ae } from "./style.BmlGmjpO.mjs";
|
|
7
|
+
import { t as oe } from "./input.PejnqwSH.mjs";
|
|
8
|
+
import { n as C } from "./scroll.CzORc5Zk.mjs";
|
|
9
|
+
import { n as w, r as se, t as ce } from "./tooltip.D50x7Rva.mjs";
|
|
10
|
+
import { i as le, r as ue, t as de } from "./use-form-item.wsRjehHp.mjs";
|
|
11
|
+
import { t as fe } from "./use-id.CFO5NeoV.mjs";
|
|
12
|
+
import { n as T, t as pe } from "./use-composition.mUaomyno.mjs";
|
|
13
|
+
import { c as E, d as me, f as he, g as ge, o as D, s as _e, t as O } from "./icon.CbS8-322.mjs";
|
|
14
|
+
import { i as ve, n as k } from "./form-item.CgmUuw_n.mjs";
|
|
15
|
+
import { t as ye } from "./scrollbar.CAmrlKi9.mjs";
|
|
16
|
+
import { n as be, r as xe, t as Se } from "./tag.DPi-PLbb.mjs";
|
|
17
|
+
import { t as A } from "./checkbox.emIuFmnt.mjs";
|
|
18
|
+
import { t as Ce } from "./radio.BotKXqJr.mjs";
|
|
19
|
+
import { d as j, n as we, u as M } from "./util.B3sjVZoZ.mjs";
|
|
20
|
+
import { t as N } from "./form-input.D25eDRMq.mjs";
|
|
21
|
+
import { t as Te } from "./form-pick.Axem0gOO.mjs";
|
|
22
|
+
import { t as Ee } from "./dictionary.5eKjWeAp.mjs";
|
|
23
|
+
import { Comment as De, Fragment as Oe, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createSlots as ke, createTextVNode as Ae, createVNode as z, defineComponent as B, getCurrentInstance as je, inject as V, mergeProps as Me, nextTick as Ne, normalizeClass as H, normalizeStyle as Pe, onBeforeUpdate as U, onMounted as Fe, openBlock as W, provide as Ie, reactive as Le, ref as G, renderList as Re, renderSlot as K, resolveComponent as ze, resolveDynamicComponent as Be, toDisplayString as q, toHandlers as Ve, unref as J, useAttrs as He, useSlots as Ue, vModelText as We, vShow as Ge, watch as Y, withCtx as X, withDirectives as Ke, withKeys as qe, withModifiers as Z } from "vue";
|
|
24
|
+
import { findTreeChildren as Je, isArray as Ye, isString as Xe, setParent as Ze } from "@web-utils/core";
|
|
25
|
+
import { cloneDeep as Qe } from "@web-utils/integrations/lodash";
|
|
26
|
+
import { cloneDeep as $e, flattenDeep as et, isEqual as Q } from "lodash-unified";
|
|
27
|
+
//#region node_modules/.pnpm/element-plus@2.13.6_typescr_b7ae825491da06c0282fd613061a7e37/node_modules/element-plus/es/components/cascader-panel/src/config.mjs
|
|
28
|
+
var tt = S({
|
|
29
|
+
modelValue: { type: v([
|
|
30
|
+
Number,
|
|
31
|
+
String,
|
|
32
|
+
Array,
|
|
33
|
+
Object
|
|
34
|
+
]) },
|
|
35
|
+
options: {
|
|
36
|
+
type: v(Array),
|
|
37
|
+
default: () => []
|
|
38
|
+
},
|
|
39
|
+
props: {
|
|
40
|
+
type: v(Object),
|
|
41
|
+
default: () => ({})
|
|
42
|
+
}
|
|
43
|
+
}), nt = {
|
|
44
|
+
expandTrigger: "click",
|
|
45
|
+
multiple: !1,
|
|
46
|
+
checkStrictly: !1,
|
|
47
|
+
emitPath: !0,
|
|
48
|
+
lazy: !1,
|
|
49
|
+
lazyLoad: i,
|
|
50
|
+
value: "value",
|
|
51
|
+
label: "label",
|
|
52
|
+
children: "children",
|
|
53
|
+
leaf: "leaf",
|
|
54
|
+
disabled: "disabled",
|
|
55
|
+
hoverThreshold: 500,
|
|
56
|
+
checkOnClickNode: !1,
|
|
57
|
+
checkOnClickLeaf: !0,
|
|
58
|
+
showPrefix: !0
|
|
59
|
+
}, rt = S({
|
|
60
|
+
...tt,
|
|
61
|
+
border: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !0
|
|
64
|
+
},
|
|
65
|
+
renderLabel: { type: Function }
|
|
66
|
+
}), it = (e) => !0, $ = {
|
|
67
|
+
[f]: it,
|
|
68
|
+
[p]: it,
|
|
69
|
+
close: () => !0,
|
|
70
|
+
"expand-change": (e) => e
|
|
71
|
+
}, at = (e) => P(() => ({
|
|
72
|
+
...nt,
|
|
73
|
+
...e.props
|
|
74
|
+
})), ot = Symbol();
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region node_modules/.pnpm/element-plus@2.13.6_typescr_b7ae825491da06c0282fd613061a7e37/node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs
|
|
77
|
+
function st(t) {
|
|
78
|
+
return !!(e(t) ? t.every(({ type: e }) => e === De) : (t == null ? void 0 : t.type) === De);
|
|
79
|
+
}
|
|
80
|
+
var ct = /* @__PURE__ */ B({
|
|
81
|
+
name: "NodeContent",
|
|
82
|
+
props: { node: {
|
|
83
|
+
type: Object,
|
|
84
|
+
required: !0
|
|
85
|
+
} },
|
|
86
|
+
setup(e) {
|
|
87
|
+
let t = n("cascader-node"), { renderLabelFn: r } = V(ot), { node: i } = e, { data: a, label: o } = i, s = () => {
|
|
88
|
+
let e = r == null ? void 0 : r({
|
|
89
|
+
node: i,
|
|
90
|
+
data: a
|
|
91
|
+
});
|
|
92
|
+
return st(e) ? o : e ?? o;
|
|
93
|
+
};
|
|
94
|
+
return () => z("span", { class: t.e("label") }, [s()]);
|
|
95
|
+
}
|
|
96
|
+
}), lt = [
|
|
97
|
+
"id",
|
|
98
|
+
"aria-haspopup",
|
|
99
|
+
"aria-owns",
|
|
100
|
+
"aria-expanded",
|
|
101
|
+
"tabindex"
|
|
102
|
+
], ut = /* @__PURE__ */ B({
|
|
103
|
+
name: "ElCascaderNode",
|
|
104
|
+
__name: "node",
|
|
105
|
+
props: {
|
|
106
|
+
node: {
|
|
107
|
+
type: Object,
|
|
108
|
+
required: !0
|
|
109
|
+
},
|
|
110
|
+
menuId: String
|
|
111
|
+
},
|
|
112
|
+
emits: ["expand"],
|
|
113
|
+
setup(e, { emit: t }) {
|
|
114
|
+
let r = e, i = t, a = V(ot), o = n("cascader-node"), s = P(() => a.isHoverMenu), c = P(() => a.config.multiple), l = P(() => a.config.checkStrictly), u = P(() => a.config.showPrefix), d = P(() => {
|
|
115
|
+
var e;
|
|
116
|
+
return (e = a.checkedNodes[0]) == null ? void 0 : e.uid;
|
|
117
|
+
}), f = P(() => r.node.isDisabled), p = P(() => r.node.isLeaf), m = P(() => l.value && !p.value || !f.value), h = P(() => g(a.expandingNode)), ee = P(() => l.value && a.checkedNodes.some(g)), g = (e) => {
|
|
118
|
+
var t;
|
|
119
|
+
let { level: n, uid: i } = r.node;
|
|
120
|
+
return (e == null || (t = e.pathNodes[n - 1]) == null ? void 0 : t.uid) === i;
|
|
121
|
+
}, _ = () => {
|
|
122
|
+
h.value || a.expandNode(r.node);
|
|
123
|
+
}, v = (e) => {
|
|
124
|
+
let { node: t } = r;
|
|
125
|
+
e !== t.checked && a.handleCheckChange(t, e);
|
|
126
|
+
}, y = () => {
|
|
127
|
+
a.lazyLoad(r.node, () => {
|
|
128
|
+
p.value || _();
|
|
129
|
+
});
|
|
130
|
+
}, te = (e) => {
|
|
131
|
+
s.value && (b(), !p.value && i("expand", e));
|
|
132
|
+
}, b = () => {
|
|
133
|
+
let { node: e } = r;
|
|
134
|
+
!m.value || e.loading || (e.loaded ? _() : y());
|
|
135
|
+
}, x = () => {
|
|
136
|
+
p.value && !f.value && !l.value && !c.value ? S(!0) : (a.config.checkOnClickNode && (c.value || l.value) || p.value && a.config.checkOnClickLeaf) && !f.value ? ne(!r.node.checked) : s.value || b();
|
|
137
|
+
}, ne = (e) => {
|
|
138
|
+
l.value ? (v(e), r.node.loaded && _()) : S(e);
|
|
139
|
+
}, S = (e) => {
|
|
140
|
+
r.node.loaded ? (v(e), !l.value && _()) : y();
|
|
141
|
+
};
|
|
142
|
+
return (t, n) => (W(), L("li", {
|
|
143
|
+
id: `${e.menuId}-${e.node.uid}`,
|
|
144
|
+
role: "menuitem",
|
|
145
|
+
"aria-haspopup": !p.value,
|
|
146
|
+
"aria-owns": p.value ? void 0 : e.menuId,
|
|
147
|
+
"aria-expanded": h.value,
|
|
148
|
+
tabindex: m.value ? -1 : void 0,
|
|
149
|
+
class: H([
|
|
150
|
+
J(o).b(),
|
|
151
|
+
J(o).is("selectable", l.value),
|
|
152
|
+
J(o).is("active", e.node.checked),
|
|
153
|
+
J(o).is("disabled", !m.value),
|
|
154
|
+
h.value && "in-active-path",
|
|
155
|
+
ee.value && "in-checked-path"
|
|
156
|
+
]),
|
|
157
|
+
onMouseenter: te,
|
|
158
|
+
onFocus: te,
|
|
159
|
+
onClick: x
|
|
160
|
+
}, [
|
|
161
|
+
I(" prefix "),
|
|
162
|
+
c.value && u.value ? (W(), F(J(A), {
|
|
163
|
+
key: 0,
|
|
164
|
+
"model-value": e.node.checked,
|
|
165
|
+
indeterminate: e.node.indeterminate,
|
|
166
|
+
disabled: f.value,
|
|
167
|
+
onClick: n[0] || (n[0] = Z(() => {}, ["stop"])),
|
|
168
|
+
"onUpdate:modelValue": ne
|
|
169
|
+
}, null, 8, [
|
|
170
|
+
"model-value",
|
|
171
|
+
"indeterminate",
|
|
172
|
+
"disabled"
|
|
173
|
+
])) : l.value && u.value ? (W(), F(J(Ce), {
|
|
174
|
+
key: 1,
|
|
175
|
+
"model-value": d.value,
|
|
176
|
+
label: e.node.uid,
|
|
177
|
+
disabled: f.value,
|
|
178
|
+
"onUpdate:modelValue": ne,
|
|
179
|
+
onClick: n[1] || (n[1] = Z(() => {}, ["stop"]))
|
|
180
|
+
}, {
|
|
181
|
+
default: X(() => [I("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "), n[2] || (n[2] = R("span", null, null, -1))]),
|
|
182
|
+
_: 1
|
|
183
|
+
}, 8, [
|
|
184
|
+
"model-value",
|
|
185
|
+
"label",
|
|
186
|
+
"disabled"
|
|
187
|
+
])) : p.value && e.node.checked ? (W(), F(J(O), {
|
|
188
|
+
key: 2,
|
|
189
|
+
class: H(J(o).e("prefix"))
|
|
190
|
+
}, {
|
|
191
|
+
default: X(() => [z(J(me))]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["class"])) : I("v-if", !0),
|
|
194
|
+
I(" content "),
|
|
195
|
+
z(J(ct), { node: e.node }, null, 8, ["node"]),
|
|
196
|
+
I(" postfix "),
|
|
197
|
+
p.value ? I("v-if", !0) : (W(), L(Oe, { key: 3 }, [e.node.loading ? (W(), F(J(O), {
|
|
198
|
+
key: 0,
|
|
199
|
+
class: H([J(o).is("loading"), J(o).e("postfix")])
|
|
200
|
+
}, {
|
|
201
|
+
default: X(() => [z(J(ge))]),
|
|
202
|
+
_: 1
|
|
203
|
+
}, 8, ["class"])) : (W(), F(J(O), {
|
|
204
|
+
key: 1,
|
|
205
|
+
class: H(["arrow-right", J(o).e("postfix")])
|
|
206
|
+
}, {
|
|
207
|
+
default: X(() => [z(J(E))]),
|
|
208
|
+
_: 1
|
|
209
|
+
}, 8, ["class"]))], 64))
|
|
210
|
+
], 42, lt));
|
|
211
|
+
}
|
|
212
|
+
}), dt = /* @__PURE__ */ B({
|
|
213
|
+
name: "ElCascaderMenu",
|
|
214
|
+
__name: "menu",
|
|
215
|
+
props: {
|
|
216
|
+
nodes: {
|
|
217
|
+
type: Array,
|
|
218
|
+
required: !0
|
|
219
|
+
},
|
|
220
|
+
index: {
|
|
221
|
+
type: Number,
|
|
222
|
+
required: !0
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
setup(e) {
|
|
226
|
+
let t = e, r = je(), i = n("cascader-menu"), { t: a } = d(), o = fe(), s, c, l = V(ot), u = G(), f = P(() => !t.nodes.length), p = P(() => !l.initialLoaded), m = P(() => `${o.value}-${t.index}`), h = (e) => {
|
|
227
|
+
s = e.target;
|
|
228
|
+
}, ee = (e) => {
|
|
229
|
+
if (!(!l.isHoverMenu || !s || !u.value)) if (s.contains(e.target)) {
|
|
230
|
+
var t;
|
|
231
|
+
g();
|
|
232
|
+
let n = r.vnode.el, { left: a } = n.getBoundingClientRect(), { offsetWidth: o, offsetHeight: c } = n, l = e.clientX - a, d = s.offsetTop, f = d + s.offsetHeight, p = ((t = n.querySelector(`.${i.e("wrap")}`)) == null ? void 0 : t.scrollTop) || 0;
|
|
233
|
+
u.value.innerHTML = `
|
|
234
|
+
<path style="pointer-events: auto;" fill="transparent" d="M${l} ${d} L${o} ${p} V${d} Z" />
|
|
235
|
+
<path style="pointer-events: auto;" fill="transparent" d="M${l} ${f} L${o} ${c + p} V${f} Z" />
|
|
236
|
+
`;
|
|
237
|
+
} else c || (c = window.setTimeout(_, l.config.hoverThreshold));
|
|
238
|
+
}, g = () => {
|
|
239
|
+
c && (clearTimeout(c), c = void 0);
|
|
240
|
+
}, _ = () => {
|
|
241
|
+
u.value && (u.value.innerHTML = "", g());
|
|
242
|
+
};
|
|
243
|
+
return (t, n) => (W(), F(J(ye), {
|
|
244
|
+
key: m.value,
|
|
245
|
+
tag: "ul",
|
|
246
|
+
role: "menu",
|
|
247
|
+
class: H(J(i).b()),
|
|
248
|
+
"wrap-class": J(i).e("wrap"),
|
|
249
|
+
"view-class": [J(i).e("list"), J(i).is("empty", f.value)],
|
|
250
|
+
onMousemove: ee,
|
|
251
|
+
onMouseleave: _
|
|
252
|
+
}, {
|
|
253
|
+
default: X(() => {
|
|
254
|
+
var n;
|
|
255
|
+
return [
|
|
256
|
+
(W(!0), L(Oe, null, Re(e.nodes, (e) => (W(), F(ut, {
|
|
257
|
+
key: e.uid,
|
|
258
|
+
node: e,
|
|
259
|
+
"menu-id": m.value,
|
|
260
|
+
onExpand: h
|
|
261
|
+
}, null, 8, ["node", "menu-id"]))), 128)),
|
|
262
|
+
p.value ? (W(), L("div", {
|
|
263
|
+
key: 0,
|
|
264
|
+
class: H(J(i).e("empty-text"))
|
|
265
|
+
}, [z(J(O), {
|
|
266
|
+
size: "14",
|
|
267
|
+
class: H(J(i).is("loading"))
|
|
268
|
+
}, {
|
|
269
|
+
default: X(() => [z(J(ge))]),
|
|
270
|
+
_: 1
|
|
271
|
+
}, 8, ["class"]), Ae(" " + q(J(a)("el.cascader.loading")), 1)], 2)) : f.value ? (W(), L("div", {
|
|
272
|
+
key: 1,
|
|
273
|
+
class: H(J(i).e("empty-text"))
|
|
274
|
+
}, [K(t.$slots, "empty", {}, () => [Ae(q(J(a)("el.cascader.noData")), 1)])], 2)) : (n = J(l)) != null && n.isHoverMenu ? (W(), L(Oe, { key: 2 }, [I(" eslint-disable vue/html-self-closing "), (W(), L("svg", {
|
|
275
|
+
ref_key: "hoverZone",
|
|
276
|
+
ref: u,
|
|
277
|
+
class: H(J(i).e("hover-zone"))
|
|
278
|
+
}, null, 2))], 2112)) : I("v-if", !0),
|
|
279
|
+
I(" eslint-enable vue/html-self-closing ")
|
|
280
|
+
];
|
|
281
|
+
}),
|
|
282
|
+
_: 3
|
|
283
|
+
}, 8, [
|
|
284
|
+
"class",
|
|
285
|
+
"wrap-class",
|
|
286
|
+
"view-class"
|
|
287
|
+
]));
|
|
288
|
+
}
|
|
289
|
+
}), ft = 0, pt = (e) => {
|
|
290
|
+
let t = [e], { parent: n } = e;
|
|
291
|
+
for (; n;) t.unshift(n), n = n.parent;
|
|
292
|
+
return t;
|
|
293
|
+
}, mt = class t {
|
|
294
|
+
constructor(e, n, r, i = !1) {
|
|
295
|
+
this.data = e, this.config = n, this.parent = r, this.root = i, this.uid = ft++, this.checked = !1, this.indeterminate = !1, this.loading = !1;
|
|
296
|
+
let { value: a, label: o, children: s } = n, c = e[s], l = pt(this);
|
|
297
|
+
this.level = i ? 0 : r ? r.level + 1 : 1, this.value = e[a], this.label = e[o], this.pathNodes = l, this.pathValues = l.map((e) => e.value), this.pathLabels = l.map((e) => e.label), this.childrenData = c, this.children = (c || []).map((e) => new t(e, n, this)), this.loaded = !n.lazy || this.isLeaf || !_(c), this.text = "";
|
|
298
|
+
}
|
|
299
|
+
get isDisabled() {
|
|
300
|
+
let { data: e, parent: t, config: n } = this, { disabled: i, checkStrictly: a } = n;
|
|
301
|
+
return (r(i) ? i(e, this) : !!e[i]) || !a && !!(t != null && t.isDisabled);
|
|
302
|
+
}
|
|
303
|
+
get isLeaf() {
|
|
304
|
+
let { data: t, config: n, childrenData: i, loaded: a } = this, { lazy: o, leaf: s } = n, c = r(s) ? s(t, this) : t[s];
|
|
305
|
+
return h(c) ? o && !a ? !1 : !(e(i) && i.length) : !!c;
|
|
306
|
+
}
|
|
307
|
+
get valueByOption() {
|
|
308
|
+
return this.config.emitPath ? this.pathValues : this.value;
|
|
309
|
+
}
|
|
310
|
+
appendChild(n) {
|
|
311
|
+
let { childrenData: r, children: i } = this, a = new t(n, this.config, this);
|
|
312
|
+
return e(r) ? r.push(n) : this.childrenData = [n], i.push(a), a;
|
|
313
|
+
}
|
|
314
|
+
calcText(e, t) {
|
|
315
|
+
let n = e ? this.pathLabels.join(t) : this.label;
|
|
316
|
+
return this.text = n, n;
|
|
317
|
+
}
|
|
318
|
+
broadcast(e) {
|
|
319
|
+
this.children.forEach((t) => {
|
|
320
|
+
if (t) {
|
|
321
|
+
var n;
|
|
322
|
+
t.broadcast(e), (n = t.onParentCheck) == null || n.call(t, e);
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
emit() {
|
|
327
|
+
let { parent: e } = this;
|
|
328
|
+
if (e) {
|
|
329
|
+
var t;
|
|
330
|
+
(t = e.onChildCheck) == null || t.call(e), e.emit();
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
onParentCheck(e) {
|
|
334
|
+
this.isDisabled || this.setCheckState(e);
|
|
335
|
+
}
|
|
336
|
+
onChildCheck() {
|
|
337
|
+
let { children: e } = this, t = e.filter((e) => !e.isDisabled), n = t.length ? t.every((e) => e.checked) : !1;
|
|
338
|
+
this.setCheckState(n);
|
|
339
|
+
}
|
|
340
|
+
setCheckState(e) {
|
|
341
|
+
let t = this.children.length, n = this.children.reduce((e, t) => e + (t.checked ? 1 : t.indeterminate ? .5 : 0), 0);
|
|
342
|
+
this.checked = this.loaded && this.children.filter((e) => !e.isDisabled).every((e) => e.loaded && e.checked) && e, this.indeterminate = this.loaded && n !== t && n > 0;
|
|
343
|
+
}
|
|
344
|
+
doCheck(e) {
|
|
345
|
+
if (this.checked === e) return;
|
|
346
|
+
let { checkStrictly: t, multiple: n } = this.config;
|
|
347
|
+
t || !n ? this.checked = e : (this.broadcast(e), this.setCheckState(e), this.emit());
|
|
348
|
+
}
|
|
349
|
+
}, ht = (e, t) => e.reduce((e, n) => (n.isLeaf ? e.push(n) : (!t && e.push(n), e = e.concat(ht(n.children, t))), e), []), gt = class {
|
|
350
|
+
constructor(e, t) {
|
|
351
|
+
this.config = t;
|
|
352
|
+
let n = (e || []).map((e) => new mt(e, this.config));
|
|
353
|
+
this.nodes = n, this.allNodes = ht(n, !1), this.leafNodes = ht(n, !0);
|
|
354
|
+
}
|
|
355
|
+
getNodes() {
|
|
356
|
+
return this.nodes;
|
|
357
|
+
}
|
|
358
|
+
getFlattedNodes(e) {
|
|
359
|
+
return e ? this.leafNodes : this.allNodes;
|
|
360
|
+
}
|
|
361
|
+
appendNode(e, t) {
|
|
362
|
+
let n = t ? t.appendChild(e) : new mt(e, this.config);
|
|
363
|
+
t || this.nodes.push(n), this.appendAllNodesAndLeafNodes(n);
|
|
364
|
+
}
|
|
365
|
+
appendNodes(e, t) {
|
|
366
|
+
e.length > 0 ? e.forEach((e) => this.appendNode(e, t)) : t && t.isLeaf && this.leafNodes.push(t);
|
|
367
|
+
}
|
|
368
|
+
appendAllNodesAndLeafNodes(e) {
|
|
369
|
+
this.allNodes.push(e), e.isLeaf && this.leafNodes.push(e), e.children && e.children.forEach((e) => {
|
|
370
|
+
this.appendAllNodesAndLeafNodes(e);
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
getNodeByValue(e, t = !1) {
|
|
374
|
+
return ae(e) ? null : this.getFlattedNodes(t).find((t) => Q(t.value, e) || Q(t.pathValues, e)) || null;
|
|
375
|
+
}
|
|
376
|
+
getSameNode(e) {
|
|
377
|
+
return e && this.getFlattedNodes(!1).find(({ value: t, level: n }) => Q(e.value, t) && e.level === n) || null;
|
|
378
|
+
}
|
|
379
|
+
}, _t = (e) => {
|
|
380
|
+
if (!e) return 0;
|
|
381
|
+
let t = e.id.split("-");
|
|
382
|
+
return Number(t[t.length - 2]);
|
|
383
|
+
}, vt = (e) => {
|
|
384
|
+
if (!e) return;
|
|
385
|
+
let t = e.querySelector("input");
|
|
386
|
+
t ? t.click() : re(e) && e.click();
|
|
387
|
+
}, yt = (e, t) => {
|
|
388
|
+
let n = t.slice(0), r = n.map((e) => e.uid), i = e.reduce((e, t) => {
|
|
389
|
+
let i = r.indexOf(t.uid);
|
|
390
|
+
return i > -1 && (e.push(t), n.splice(i, 1), r.splice(i, 1)), e;
|
|
391
|
+
}, []);
|
|
392
|
+
return i.push(...n), i;
|
|
393
|
+
}, bt = a(/* @__PURE__ */ B({
|
|
394
|
+
name: "ElCascaderPanel",
|
|
395
|
+
__name: "index",
|
|
396
|
+
props: rt,
|
|
397
|
+
emits: $,
|
|
398
|
+
setup(e, { expose: t, emit: r }) {
|
|
399
|
+
let i = e, a = r, o = !1, l = n("cascader"), u = at(i), d = Ue(), m, h = G(!0), ee = G(!1), g = G([]), v = G(), y = G([]), b = G(), x = G([]), S = P(() => u.value.expandTrigger === "hover"), re = P(() => i.renderLabel || d.default), ae = () => {
|
|
400
|
+
let { options: e } = i, t = u.value;
|
|
401
|
+
o = !1, m = new gt(e, t), y.value = [m.getNodes()], t.lazy && _(i.options) ? (h.value = !1, oe(void 0, (e) => {
|
|
402
|
+
e && (m = new gt(e, t), y.value = [m.getNodes()]), h.value = !0, T(!1, !0);
|
|
403
|
+
})) : T(!1, !0);
|
|
404
|
+
}, oe = (e, t) => {
|
|
405
|
+
let n = u.value;
|
|
406
|
+
e = e || new mt({}, n, void 0, !0), e.loading = !0, n.lazyLoad(e, (n) => {
|
|
407
|
+
let r = e, i = r.root ? null : r;
|
|
408
|
+
r.loading = !1, r.loaded = !0, r.childrenData = r.childrenData || [], n && (m == null || m.appendNodes(n, i)), n && (t == null || t(n)), e.level === 0 && (ee.value = !0);
|
|
409
|
+
}, () => {
|
|
410
|
+
e.loading = !1, e.loaded = !1, e.level === 0 && (h.value = !0);
|
|
411
|
+
});
|
|
412
|
+
}, w = (e, t) => {
|
|
413
|
+
var n;
|
|
414
|
+
let { level: r } = e, i = y.value.slice(0, r), o;
|
|
415
|
+
e.isLeaf ? o = e.pathNodes[r - 2] : (o = e, i.push(e.children)), ((n = b.value) == null ? void 0 : n.uid) !== (o == null ? void 0 : o.uid) && (b.value = e, y.value = i, !t && a("expand-change", (e == null ? void 0 : e.pathValues) || []));
|
|
416
|
+
}, se = (e, t, n = !0) => {
|
|
417
|
+
let { checkStrictly: r, multiple: i } = u.value, s = x.value[0];
|
|
418
|
+
o = !0, !i && (s == null || s.doCheck(!1)), e.doCheck(t), fe(), n && !i && !r && a("close"), !n && !i && ce(e);
|
|
419
|
+
}, ce = (e) => {
|
|
420
|
+
e && (e = e.parent, ce(e), e && w(e));
|
|
421
|
+
}, le = (e) => m == null ? void 0 : m.getFlattedNodes(e), ue = (e) => {
|
|
422
|
+
var t;
|
|
423
|
+
return (t = le(e)) == null ? void 0 : t.filter(({ checked: e }) => e !== !1);
|
|
424
|
+
}, de = () => {
|
|
425
|
+
x.value.forEach((e) => e.doCheck(!1)), fe(), y.value = y.value.slice(0, 1), b.value = void 0, a("expand-change", []);
|
|
426
|
+
}, fe = () => {
|
|
427
|
+
let { checkStrictly: e, multiple: t } = u.value, n = x.value, r = yt(n, ue(!e)), i = r.map((e) => e.valueByOption);
|
|
428
|
+
x.value = r, v.value = t ? i : i[0] ?? null;
|
|
429
|
+
}, T = (e = !1, t = !1) => {
|
|
430
|
+
let { modelValue: n } = i, { lazy: r, multiple: a, checkStrictly: s } = u.value, c = !s;
|
|
431
|
+
if (!(!h.value || o || !t && Q(n, v.value))) if (r && !e) {
|
|
432
|
+
let e = ve(et(k(n))).map((e) => m == null ? void 0 : m.getNodeByValue(e)).filter((e) => !!e && !e.loaded && !e.loading);
|
|
433
|
+
e.length ? e.forEach((e) => {
|
|
434
|
+
oe(e, () => T(!1, t));
|
|
435
|
+
}) : T(!0, t);
|
|
436
|
+
} else pe(ve((a ? k(n) : [n]).map((e) => m == null ? void 0 : m.getNodeByValue(e, c))), t), v.value = $e(n ?? void 0);
|
|
437
|
+
}, pe = (e, t = !0) => {
|
|
438
|
+
let { checkStrictly: n } = u.value, r = x.value, i = e.filter((e) => !!e && (n || e.isLeaf)), a = m == null ? void 0 : m.getSameNode(b.value), o = t && a || i[0];
|
|
439
|
+
o ? o.pathNodes.forEach((e) => w(e, !0)) : b.value = void 0, r.forEach((e) => e.doCheck(!1)), Le(i).forEach((e) => e.doCheck(!0)), x.value = i, Ne(E);
|
|
440
|
+
}, E = () => {
|
|
441
|
+
te && g.value.forEach((e) => {
|
|
442
|
+
let t = e == null ? void 0 : e.$el;
|
|
443
|
+
if (t) {
|
|
444
|
+
let e = t.querySelector(`.${l.namespace.value}-scrollbar__wrap`), n = t.querySelector(`.${l.b("node")}.in-active-path`);
|
|
445
|
+
if (!n) {
|
|
446
|
+
let e = t.querySelectorAll(`.${l.b("node")}.${l.is("active")}`);
|
|
447
|
+
n = e[e.length - 1];
|
|
448
|
+
}
|
|
449
|
+
C(e, n);
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
}, me = (e) => {
|
|
453
|
+
let t = e.target, n = s(e);
|
|
454
|
+
switch (n) {
|
|
455
|
+
case c.up:
|
|
456
|
+
case c.down:
|
|
457
|
+
e.preventDefault(), ie(ne(t, n === c.up ? -1 : 1, `.${l.b("node")}[tabindex="-1"]`));
|
|
458
|
+
break;
|
|
459
|
+
case c.left:
|
|
460
|
+
var r;
|
|
461
|
+
e.preventDefault(), ie((r = g.value[_t(t) - 1]) == null ? void 0 : r.$el.querySelector(`.${l.b("node")}[aria-expanded="true"]`));
|
|
462
|
+
break;
|
|
463
|
+
case c.right:
|
|
464
|
+
var i;
|
|
465
|
+
e.preventDefault(), ie((i = g.value[_t(t) + 1]) == null ? void 0 : i.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`));
|
|
466
|
+
break;
|
|
467
|
+
case c.enter:
|
|
468
|
+
case c.numpadEnter:
|
|
469
|
+
vt(t);
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
return Ie(ot, Le({
|
|
474
|
+
config: u,
|
|
475
|
+
expandingNode: b,
|
|
476
|
+
checkedNodes: x,
|
|
477
|
+
isHoverMenu: S,
|
|
478
|
+
initialLoaded: h,
|
|
479
|
+
renderLabelFn: re,
|
|
480
|
+
lazyLoad: oe,
|
|
481
|
+
expandNode: w,
|
|
482
|
+
handleCheckChange: se
|
|
483
|
+
})), Y(u, (e, t) => {
|
|
484
|
+
Q(e, t) || ae();
|
|
485
|
+
}, { immediate: !0 }), Y(() => i.options, ae, { deep: !0 }), Y(() => i.modelValue, () => {
|
|
486
|
+
o = !1, T();
|
|
487
|
+
}, { deep: !0 }), Y(() => v.value, (e) => {
|
|
488
|
+
Q(e, i.modelValue) || (a(f, e), a(p, e));
|
|
489
|
+
}), U(() => g.value = []), Fe(() => !_(i.modelValue) && T()), t({
|
|
490
|
+
menuList: g,
|
|
491
|
+
menus: y,
|
|
492
|
+
checkedNodes: x,
|
|
493
|
+
handleKeyDown: me,
|
|
494
|
+
handleCheckChange: se,
|
|
495
|
+
getFlattedNodes: le,
|
|
496
|
+
getCheckedNodes: ue,
|
|
497
|
+
clearCheckedNodes: de,
|
|
498
|
+
calculateCheckedValue: fe,
|
|
499
|
+
scrollToExpandingNode: E,
|
|
500
|
+
loadLazyRootNodes: () => {
|
|
501
|
+
ee.value || ae();
|
|
502
|
+
}
|
|
503
|
+
}), (t, n) => (W(), L("div", {
|
|
504
|
+
class: H([J(l).b("panel"), J(l).is("bordered", e.border)]),
|
|
505
|
+
onKeydown: me
|
|
506
|
+
}, [(W(!0), L(Oe, null, Re(y.value, (e, n) => (W(), F(dt, {
|
|
507
|
+
key: n,
|
|
508
|
+
ref_for: !0,
|
|
509
|
+
ref: (e) => g.value[n] = e,
|
|
510
|
+
index: n,
|
|
511
|
+
nodes: [...e]
|
|
512
|
+
}, {
|
|
513
|
+
empty: X(() => [K(t.$slots, "empty")]),
|
|
514
|
+
_: 3
|
|
515
|
+
}, 8, ["index", "nodes"]))), 128))], 34));
|
|
516
|
+
}
|
|
517
|
+
})), xt = S({
|
|
518
|
+
...tt,
|
|
519
|
+
size: m,
|
|
520
|
+
placeholder: String,
|
|
521
|
+
disabled: {
|
|
522
|
+
type: Boolean,
|
|
523
|
+
default: void 0
|
|
524
|
+
},
|
|
525
|
+
clearable: Boolean,
|
|
526
|
+
clearIcon: {
|
|
527
|
+
type: D,
|
|
528
|
+
default: he
|
|
529
|
+
},
|
|
530
|
+
filterable: Boolean,
|
|
531
|
+
filterMethod: {
|
|
532
|
+
type: v(Function),
|
|
533
|
+
default: (e, t) => e.text.includes(t)
|
|
534
|
+
},
|
|
535
|
+
separator: {
|
|
536
|
+
type: String,
|
|
537
|
+
default: " / "
|
|
538
|
+
},
|
|
539
|
+
showAllLevels: {
|
|
540
|
+
type: Boolean,
|
|
541
|
+
default: !0
|
|
542
|
+
},
|
|
543
|
+
collapseTags: Boolean,
|
|
544
|
+
maxCollapseTags: {
|
|
545
|
+
type: Number,
|
|
546
|
+
default: 1
|
|
547
|
+
},
|
|
548
|
+
collapseTagsTooltip: Boolean,
|
|
549
|
+
maxCollapseTagsTooltipHeight: { type: [String, Number] },
|
|
550
|
+
debounce: {
|
|
551
|
+
type: Number,
|
|
552
|
+
default: 300
|
|
553
|
+
},
|
|
554
|
+
beforeFilter: {
|
|
555
|
+
type: v(Function),
|
|
556
|
+
default: () => !0
|
|
557
|
+
},
|
|
558
|
+
placement: {
|
|
559
|
+
type: v(String),
|
|
560
|
+
values: se,
|
|
561
|
+
default: "bottom-start"
|
|
562
|
+
},
|
|
563
|
+
fallbackPlacements: {
|
|
564
|
+
type: v(Array),
|
|
565
|
+
default: [
|
|
566
|
+
"bottom-start",
|
|
567
|
+
"bottom",
|
|
568
|
+
"top-start",
|
|
569
|
+
"top",
|
|
570
|
+
"right",
|
|
571
|
+
"left"
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
popperClass: w.popperClass,
|
|
575
|
+
popperStyle: w.popperStyle,
|
|
576
|
+
teleported: w.teleported,
|
|
577
|
+
effect: {
|
|
578
|
+
type: v(String),
|
|
579
|
+
default: "light"
|
|
580
|
+
},
|
|
581
|
+
tagType: {
|
|
582
|
+
...be.type,
|
|
583
|
+
default: "info"
|
|
584
|
+
},
|
|
585
|
+
tagEffect: {
|
|
586
|
+
...be.effect,
|
|
587
|
+
default: "light"
|
|
588
|
+
},
|
|
589
|
+
validateEvent: {
|
|
590
|
+
type: Boolean,
|
|
591
|
+
default: !0
|
|
592
|
+
},
|
|
593
|
+
persistent: {
|
|
594
|
+
type: Boolean,
|
|
595
|
+
default: !0
|
|
596
|
+
},
|
|
597
|
+
showCheckedStrategy: {
|
|
598
|
+
type: String,
|
|
599
|
+
values: ["parent", "child"],
|
|
600
|
+
default: "child"
|
|
601
|
+
},
|
|
602
|
+
checkOnClickNode: Boolean,
|
|
603
|
+
showPrefix: {
|
|
604
|
+
type: Boolean,
|
|
605
|
+
default: !0
|
|
606
|
+
},
|
|
607
|
+
...u
|
|
608
|
+
}), St = (e) => !0, Ct = {
|
|
609
|
+
[f]: St,
|
|
610
|
+
[p]: St,
|
|
611
|
+
focus: (e) => e instanceof FocusEvent,
|
|
612
|
+
blur: (e) => e instanceof FocusEvent,
|
|
613
|
+
clear: () => !0,
|
|
614
|
+
visibleChange: (e) => g(e),
|
|
615
|
+
expandChange: (e) => !!e,
|
|
616
|
+
removeTag: (e) => !!e
|
|
617
|
+
}, wt = ["placeholder"], Tt = ["onClick"], Et = M(a(/* @__PURE__ */ B({
|
|
618
|
+
name: "ElCascader",
|
|
619
|
+
__name: "cascader",
|
|
620
|
+
props: xt,
|
|
621
|
+
emits: Ct,
|
|
622
|
+
setup(e, { expose: r, emit: i }) {
|
|
623
|
+
let a = { modifiers: [{
|
|
624
|
+
name: "arrowPosition",
|
|
625
|
+
enabled: !0,
|
|
626
|
+
phase: "main",
|
|
627
|
+
fn: ({ state: e }) => {
|
|
628
|
+
let { modifiersData: t, placement: n } = e;
|
|
629
|
+
[
|
|
630
|
+
"right",
|
|
631
|
+
"left",
|
|
632
|
+
"bottom",
|
|
633
|
+
"top"
|
|
634
|
+
].includes(n) || t.arrow && (t.arrow.x = 35);
|
|
635
|
+
},
|
|
636
|
+
requires: ["arrow"]
|
|
637
|
+
}] }, o = e, u = i, m = He(), h = Ue(), g = 0, _ = 0, v = n("cascader"), S = n("input"), re = {
|
|
638
|
+
small: 7,
|
|
639
|
+
default: 11,
|
|
640
|
+
large: 15
|
|
641
|
+
}, { t: ae } = d(), { formItem: C } = de(), w = ue(), { valueOnClear: se } = l(o), { isComposing: fe, handleComposition: E } = pe({ afterComposition(e) {
|
|
642
|
+
var t;
|
|
643
|
+
Et((t = e.target) == null ? void 0 : t.value);
|
|
644
|
+
} }), he = G(), ge = G(), D = G(), ve = G(), k = G(), be = G(), A = G(!1), Ce = G(!1), j = G(!1), we = G(""), M = G(""), N = G([]), Te = G([]), Ee = P(() => o.props.multiple ? o.collapseTags ? N.value.slice(0, o.maxCollapseTags) : N.value : []), De = P(() => o.props.multiple && o.collapseTags ? N.value.slice(o.maxCollapseTags) : []), Ae = P(() => m.style), B = P(() => o.placeholder ?? ae("el.cascader.placeholder")), je = P(() => M.value || N.value.length > 0 || fe.value ? "" : B.value), V = le(), Me = P(() => V.value === "small" ? "small" : "default"), U = P(() => !!o.props.multiple), Ie = P(() => !o.filterable || U.value), Le = P(() => U.value ? M.value : we.value), ze = P(() => {
|
|
645
|
+
var e;
|
|
646
|
+
return ((e = k.value) == null ? void 0 : e.checkedNodes) || [];
|
|
647
|
+
}), { wrapperRef: Ve, isFocused: Je, handleBlur: Ye } = T(D, {
|
|
648
|
+
disabled: w,
|
|
649
|
+
beforeBlur(e) {
|
|
650
|
+
var t, n;
|
|
651
|
+
return ((t = he.value) == null ? void 0 : t.isFocusInsideContent(e)) || ((n = ge.value) == null ? void 0 : n.isFocusInsideContent(e));
|
|
652
|
+
},
|
|
653
|
+
afterBlur() {
|
|
654
|
+
var e;
|
|
655
|
+
o.validateEvent && (C == null || (e = C.validate) == null || e.call(C, "blur").catch((e) => y(e)));
|
|
656
|
+
}
|
|
657
|
+
}), Xe = P(() => !o.clearable || w.value || j.value || !Ce.value && !Je.value ? !1 : !!ze.value.length), Ze = P(() => {
|
|
658
|
+
let { showAllLevels: e, separator: t } = o, n = ze.value;
|
|
659
|
+
return n.length ? U.value ? "" : n[0].calcText(e, t) : "";
|
|
660
|
+
}), Qe = P(() => (C == null ? void 0 : C.validateState) || ""), et = P({
|
|
661
|
+
get() {
|
|
662
|
+
return $e(o.modelValue);
|
|
663
|
+
},
|
|
664
|
+
set(e) {
|
|
665
|
+
let t = e ?? se.value;
|
|
666
|
+
u(f, t), u(p, t), o.validateEvent && (C == null || C.validate("change").catch((e) => y(e)));
|
|
667
|
+
}
|
|
668
|
+
}), Q = P(() => [
|
|
669
|
+
v.b(),
|
|
670
|
+
v.m(V.value),
|
|
671
|
+
v.is("disabled", w.value),
|
|
672
|
+
m.class
|
|
673
|
+
]), tt = P(() => [
|
|
674
|
+
S.e("icon"),
|
|
675
|
+
"icon-arrow-down",
|
|
676
|
+
v.is("reverse", A.value)
|
|
677
|
+
]), nt = P(() => v.is("focus", Je.value)), rt = P(() => {
|
|
678
|
+
var e;
|
|
679
|
+
return (e = he.value) == null || (e = e.popperRef) == null ? void 0 : e.contentRef;
|
|
680
|
+
}), it = (e) => {
|
|
681
|
+
Je.value && Ye(new FocusEvent("blur", e)), $(!1);
|
|
682
|
+
}, $ = (e) => {
|
|
683
|
+
if (!w.value && (e = e ?? !A.value, e !== A.value)) {
|
|
684
|
+
var t;
|
|
685
|
+
A.value = e, (t = D.value) == null || (t = t.input) == null || t.setAttribute("aria-expanded", `${e}`), e ? (at(), k.value && Ne(k.value.scrollToExpandingNode)) : o.filterable && vt(), u("visibleChange", e);
|
|
686
|
+
}
|
|
687
|
+
}, at = () => {
|
|
688
|
+
Ne(() => {
|
|
689
|
+
var e;
|
|
690
|
+
(e = he.value) == null || e.updatePopper();
|
|
691
|
+
});
|
|
692
|
+
}, ot = () => {
|
|
693
|
+
j.value = !1;
|
|
694
|
+
}, st = (e) => {
|
|
695
|
+
let { showAllLevels: t, separator: n } = o;
|
|
696
|
+
return {
|
|
697
|
+
node: e,
|
|
698
|
+
key: e.uid,
|
|
699
|
+
text: e.calcText(t, n),
|
|
700
|
+
hitState: !1,
|
|
701
|
+
closable: !w.value && !e.isDisabled
|
|
702
|
+
};
|
|
703
|
+
}, ct = (e) => {
|
|
704
|
+
var t;
|
|
705
|
+
let n = e.node;
|
|
706
|
+
n.doCheck(!1), (t = k.value) == null || t.calculateCheckedValue(), u("removeTag", n.valueByOption);
|
|
707
|
+
}, lt = () => {
|
|
708
|
+
switch (o.showCheckedStrategy) {
|
|
709
|
+
case "child": return ze.value;
|
|
710
|
+
case "parent": {
|
|
711
|
+
let e = mt(!1), t = e.map((e) => e.value);
|
|
712
|
+
return e.filter((e) => !e.parent || !t.includes(e.parent.value));
|
|
713
|
+
}
|
|
714
|
+
default: return [];
|
|
715
|
+
}
|
|
716
|
+
}, ut = () => {
|
|
717
|
+
if (!U.value) return;
|
|
718
|
+
let e = lt(), t = [];
|
|
719
|
+
e.forEach((e) => t.push(st(e))), N.value = t;
|
|
720
|
+
}, dt = () => {
|
|
721
|
+
var e;
|
|
722
|
+
let { filterMethod: t, showAllLevels: n, separator: r } = o, i = (e = k.value) == null || (e = e.getFlattedNodes(!o.props.checkStrictly)) == null ? void 0 : e.filter((e) => e.isDisabled ? !1 : (e.calcText(n, r), t(e, Le.value)));
|
|
723
|
+
U.value && N.value.forEach((e) => {
|
|
724
|
+
e.hitState = !1;
|
|
725
|
+
}), j.value = !0, Te.value = i, at();
|
|
726
|
+
}, ft = () => {
|
|
727
|
+
var e;
|
|
728
|
+
let t;
|
|
729
|
+
t = j.value && be.value ? be.value.$el.querySelector(`.${v.e("suggestion-item")}`) : (e = k.value) == null ? void 0 : e.$el.querySelector(`.${v.b("node")}[tabindex="-1"]`), t && (t.focus(), !j.value && t.click());
|
|
730
|
+
}, pt = () => {
|
|
731
|
+
var e, t;
|
|
732
|
+
let n = (e = D.value) == null ? void 0 : e.input, r = ve.value, i = (t = be.value) == null ? void 0 : t.$el;
|
|
733
|
+
if (!(!te || !n)) {
|
|
734
|
+
if (i) {
|
|
735
|
+
let e = i.querySelector(`.${v.e("suggestion-list")}`);
|
|
736
|
+
e.style.minWidth = `${n.offsetWidth}px`;
|
|
737
|
+
}
|
|
738
|
+
if (r) {
|
|
739
|
+
let { offsetHeight: e } = r, t = N.value.length > 0 ? `${Math.max(e, g) - 2}px` : `${g}px`;
|
|
740
|
+
if (n.style.height = t, h.prefix) {
|
|
741
|
+
var a;
|
|
742
|
+
let e = (a = D.value) == null ? void 0 : a.$el.querySelector(`.${S.e("prefix")}`), t = 0;
|
|
743
|
+
e && (t = e.offsetWidth, t > 0 && (t += re[V.value || "default"])), r.style.left = `${t}px`;
|
|
744
|
+
} else r.style.left = "0";
|
|
745
|
+
at();
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}, mt = (e) => {
|
|
749
|
+
var t;
|
|
750
|
+
return (t = k.value) == null ? void 0 : t.getCheckedNodes(e);
|
|
751
|
+
}, ht = (e) => {
|
|
752
|
+
at(), u("expandChange", e);
|
|
753
|
+
}, gt = (e) => {
|
|
754
|
+
if (!fe.value) switch (s(e)) {
|
|
755
|
+
case c.enter:
|
|
756
|
+
case c.numpadEnter:
|
|
757
|
+
$();
|
|
758
|
+
break;
|
|
759
|
+
case c.down:
|
|
760
|
+
$(!0), Ne(ft), e.preventDefault();
|
|
761
|
+
break;
|
|
762
|
+
case c.esc:
|
|
763
|
+
A.value === !0 && (e.preventDefault(), e.stopPropagation(), $(!1));
|
|
764
|
+
break;
|
|
765
|
+
case c.tab:
|
|
766
|
+
$(!1);
|
|
767
|
+
break;
|
|
768
|
+
}
|
|
769
|
+
}, _t = () => {
|
|
770
|
+
var e;
|
|
771
|
+
(e = k.value) == null || e.clearCheckedNodes(), !A.value && o.filterable && vt(), $(!1), u("clear");
|
|
772
|
+
}, vt = () => {
|
|
773
|
+
let { value: e } = Ze;
|
|
774
|
+
we.value = e, M.value = e;
|
|
775
|
+
}, yt = (e) => {
|
|
776
|
+
var t;
|
|
777
|
+
let { checked: n } = e;
|
|
778
|
+
if (U.value) (t = k.value) == null || t.handleCheckChange(e, !n, !1);
|
|
779
|
+
else {
|
|
780
|
+
var r;
|
|
781
|
+
!n && ((r = k.value) == null || r.handleCheckChange(e, !0, !1)), $(!1);
|
|
782
|
+
}
|
|
783
|
+
}, xt = (e) => {
|
|
784
|
+
let t = e.target, n = s(e);
|
|
785
|
+
switch (n) {
|
|
786
|
+
case c.up:
|
|
787
|
+
case c.down:
|
|
788
|
+
e.preventDefault(), ie(ne(t, n === c.up ? -1 : 1, `.${v.e("suggestion-item")}[tabindex="-1"]`));
|
|
789
|
+
break;
|
|
790
|
+
case c.enter:
|
|
791
|
+
case c.numpadEnter:
|
|
792
|
+
t.click();
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
}, St = () => {
|
|
796
|
+
let e = N.value[N.value.length - 1];
|
|
797
|
+
_ = M.value ? 0 : _ + 1, !(!e || !_ || o.collapseTags && N.value.length > 1) && (e.hitState ? ct(e) : e.hitState = !0);
|
|
798
|
+
}, Ct = ee(() => {
|
|
799
|
+
let { value: e } = Le;
|
|
800
|
+
if (!e) return;
|
|
801
|
+
let n = o.beforeFilter(e);
|
|
802
|
+
t(n) ? n.then(dt).catch(() => {}) : n === !1 ? ot() : dt();
|
|
803
|
+
}, P(() => o.debounce)), Et = (e, t) => {
|
|
804
|
+
!A.value && $(!0), !(t != null && t.isComposing) && (e ? Ct() : ot());
|
|
805
|
+
}, Dt = (e) => Number.parseFloat(b(S.cssVarName("input-height"), e).value) - 2;
|
|
806
|
+
return Y(j, at), Y([
|
|
807
|
+
ze,
|
|
808
|
+
w,
|
|
809
|
+
() => o.collapseTags,
|
|
810
|
+
() => o.maxCollapseTags
|
|
811
|
+
], ut), Y(N, () => {
|
|
812
|
+
Ne(() => pt());
|
|
813
|
+
}), Y(V, async () => {
|
|
814
|
+
await Ne();
|
|
815
|
+
let e = D.value.input;
|
|
816
|
+
g = Dt(e) || g, pt();
|
|
817
|
+
}), Y(Ze, vt, { immediate: !0 }), Y(() => A.value, (e) => {
|
|
818
|
+
var t;
|
|
819
|
+
e && o.props.lazy && o.props.lazyLoad && ((t = k.value) == null || t.loadLazyRootNodes());
|
|
820
|
+
}), Fe(() => {
|
|
821
|
+
let e = D.value.input, t = Dt(e);
|
|
822
|
+
g = e.offsetHeight || t, x(e, pt);
|
|
823
|
+
}), r({
|
|
824
|
+
getCheckedNodes: mt,
|
|
825
|
+
cascaderPanelRef: k,
|
|
826
|
+
togglePopperVisible: $,
|
|
827
|
+
contentRef: rt,
|
|
828
|
+
presentText: Ze,
|
|
829
|
+
focus: () => {
|
|
830
|
+
var e;
|
|
831
|
+
(e = D.value) == null || e.focus();
|
|
832
|
+
},
|
|
833
|
+
blur: () => {
|
|
834
|
+
var e;
|
|
835
|
+
(e = D.value) == null || e.blur();
|
|
836
|
+
}
|
|
837
|
+
}), (t, n) => (W(), F(J(ce), {
|
|
838
|
+
ref_key: "tooltipRef",
|
|
839
|
+
ref: he,
|
|
840
|
+
visible: A.value,
|
|
841
|
+
teleported: e.teleported,
|
|
842
|
+
"popper-class": [J(v).e("dropdown"), e.popperClass],
|
|
843
|
+
"popper-style": e.popperStyle,
|
|
844
|
+
"popper-options": a,
|
|
845
|
+
"fallback-placements": e.fallbackPlacements,
|
|
846
|
+
"stop-popper-mouse-event": !1,
|
|
847
|
+
"gpu-acceleration": !1,
|
|
848
|
+
placement: e.placement,
|
|
849
|
+
transition: `${J(v).namespace.value}-zoom-in-top`,
|
|
850
|
+
effect: e.effect,
|
|
851
|
+
pure: "",
|
|
852
|
+
persistent: e.persistent,
|
|
853
|
+
onHide: ot
|
|
854
|
+
}, {
|
|
855
|
+
default: X(() => [Ke((W(), L("div", {
|
|
856
|
+
ref_key: "wrapperRef",
|
|
857
|
+
ref: Ve,
|
|
858
|
+
class: H(Q.value),
|
|
859
|
+
style: Pe(Ae.value),
|
|
860
|
+
onClick: n[8] || (n[8] = () => $(Ie.value ? void 0 : !0)),
|
|
861
|
+
onKeydown: gt,
|
|
862
|
+
onMouseenter: n[9] || (n[9] = (e) => Ce.value = !0),
|
|
863
|
+
onMouseleave: n[10] || (n[10] = (e) => Ce.value = !1)
|
|
864
|
+
}, [z(J(oe), {
|
|
865
|
+
ref_key: "inputRef",
|
|
866
|
+
ref: D,
|
|
867
|
+
modelValue: we.value,
|
|
868
|
+
"onUpdate:modelValue": n[1] || (n[1] = (e) => we.value = e),
|
|
869
|
+
placeholder: je.value,
|
|
870
|
+
readonly: Ie.value,
|
|
871
|
+
disabled: J(w),
|
|
872
|
+
"validate-event": !1,
|
|
873
|
+
size: J(V),
|
|
874
|
+
class: H(nt.value),
|
|
875
|
+
tabindex: U.value && e.filterable && !J(w) ? -1 : void 0,
|
|
876
|
+
onCompositionstart: J(E),
|
|
877
|
+
onCompositionupdate: J(E),
|
|
878
|
+
onCompositionend: J(E),
|
|
879
|
+
onInput: Et
|
|
880
|
+
}, ke({
|
|
881
|
+
suffix: X(() => [Xe.value ? (W(), F(J(O), {
|
|
882
|
+
key: "clear",
|
|
883
|
+
class: H([J(S).e("icon"), "icon-circle-close"]),
|
|
884
|
+
onClick: Z(_t, ["stop"])
|
|
885
|
+
}, {
|
|
886
|
+
default: X(() => [(W(), F(Be(e.clearIcon)))]),
|
|
887
|
+
_: 1
|
|
888
|
+
}, 8, ["class"])) : (W(), F(J(O), {
|
|
889
|
+
key: "arrow-down",
|
|
890
|
+
class: H(tt.value),
|
|
891
|
+
onClick: n[0] || (n[0] = Z((e) => $(), ["stop"]))
|
|
892
|
+
}, {
|
|
893
|
+
default: X(() => [z(J(_e))]),
|
|
894
|
+
_: 1
|
|
895
|
+
}, 8, ["class"]))]),
|
|
896
|
+
_: 2
|
|
897
|
+
}, [t.$slots.prefix ? {
|
|
898
|
+
name: "prefix",
|
|
899
|
+
fn: X(() => [K(t.$slots, "prefix")]),
|
|
900
|
+
key: "0"
|
|
901
|
+
} : void 0]), 1032, [
|
|
902
|
+
"modelValue",
|
|
903
|
+
"placeholder",
|
|
904
|
+
"readonly",
|
|
905
|
+
"disabled",
|
|
906
|
+
"size",
|
|
907
|
+
"class",
|
|
908
|
+
"tabindex",
|
|
909
|
+
"onCompositionstart",
|
|
910
|
+
"onCompositionupdate",
|
|
911
|
+
"onCompositionend"
|
|
912
|
+
]), U.value ? (W(), L("div", {
|
|
913
|
+
key: 0,
|
|
914
|
+
ref_key: "tagWrapper",
|
|
915
|
+
ref: ve,
|
|
916
|
+
class: H([J(v).e("tags"), J(v).is("validate", !!Qe.value)])
|
|
917
|
+
}, [
|
|
918
|
+
K(t.$slots, "tag", {
|
|
919
|
+
data: N.value,
|
|
920
|
+
deleteTag: ct
|
|
921
|
+
}, () => [(W(!0), L(Oe, null, Re(Ee.value, (t) => (W(), F(J(Se), {
|
|
922
|
+
key: t.key,
|
|
923
|
+
type: e.tagType,
|
|
924
|
+
size: Me.value,
|
|
925
|
+
effect: e.tagEffect,
|
|
926
|
+
hit: t.hitState,
|
|
927
|
+
closable: t.closable,
|
|
928
|
+
"disable-transitions": "",
|
|
929
|
+
onClose: (e) => ct(t)
|
|
930
|
+
}, {
|
|
931
|
+
default: X(() => [R("span", null, q(t.text), 1)]),
|
|
932
|
+
_: 2
|
|
933
|
+
}, 1032, [
|
|
934
|
+
"type",
|
|
935
|
+
"size",
|
|
936
|
+
"effect",
|
|
937
|
+
"hit",
|
|
938
|
+
"closable",
|
|
939
|
+
"onClose"
|
|
940
|
+
]))), 128))]),
|
|
941
|
+
e.collapseTags && N.value.length > e.maxCollapseTags ? (W(), F(J(ce), {
|
|
942
|
+
key: 0,
|
|
943
|
+
ref_key: "tagTooltipRef",
|
|
944
|
+
ref: ge,
|
|
945
|
+
disabled: A.value || !e.collapseTagsTooltip,
|
|
946
|
+
"fallback-placements": [
|
|
947
|
+
"bottom",
|
|
948
|
+
"top",
|
|
949
|
+
"right",
|
|
950
|
+
"left"
|
|
951
|
+
],
|
|
952
|
+
placement: "bottom",
|
|
953
|
+
"popper-class": e.popperClass,
|
|
954
|
+
"popper-style": e.popperStyle,
|
|
955
|
+
effect: e.effect,
|
|
956
|
+
persistent: e.persistent
|
|
957
|
+
}, {
|
|
958
|
+
default: X(() => [z(J(Se), {
|
|
959
|
+
closable: !1,
|
|
960
|
+
size: Me.value,
|
|
961
|
+
type: e.tagType,
|
|
962
|
+
effect: e.tagEffect,
|
|
963
|
+
"disable-transitions": ""
|
|
964
|
+
}, {
|
|
965
|
+
default: X(() => [R("span", { class: H(J(v).e("tags-text")) }, " + " + q(N.value.length - e.maxCollapseTags), 3)]),
|
|
966
|
+
_: 1
|
|
967
|
+
}, 8, [
|
|
968
|
+
"size",
|
|
969
|
+
"type",
|
|
970
|
+
"effect"
|
|
971
|
+
])]),
|
|
972
|
+
content: X(() => [z(J(ye), { "max-height": e.maxCollapseTagsTooltipHeight }, {
|
|
973
|
+
default: X(() => [R("div", { class: H(J(v).e("collapse-tags")) }, [(W(!0), L(Oe, null, Re(De.value, (t, n) => (W(), L("div", {
|
|
974
|
+
key: n,
|
|
975
|
+
class: H(J(v).e("collapse-tag"))
|
|
976
|
+
}, [(W(), F(J(Se), {
|
|
977
|
+
key: t.key,
|
|
978
|
+
class: "in-tooltip",
|
|
979
|
+
type: e.tagType,
|
|
980
|
+
size: Me.value,
|
|
981
|
+
effect: e.tagEffect,
|
|
982
|
+
hit: t.hitState,
|
|
983
|
+
closable: t.closable,
|
|
984
|
+
"disable-transitions": "",
|
|
985
|
+
onClose: (e) => ct(t)
|
|
986
|
+
}, {
|
|
987
|
+
default: X(() => [R("span", null, q(t.text), 1)]),
|
|
988
|
+
_: 2
|
|
989
|
+
}, 1032, [
|
|
990
|
+
"type",
|
|
991
|
+
"size",
|
|
992
|
+
"effect",
|
|
993
|
+
"hit",
|
|
994
|
+
"closable",
|
|
995
|
+
"onClose"
|
|
996
|
+
]))], 2))), 128))], 2)]),
|
|
997
|
+
_: 1
|
|
998
|
+
}, 8, ["max-height"])]),
|
|
999
|
+
_: 1
|
|
1000
|
+
}, 8, [
|
|
1001
|
+
"disabled",
|
|
1002
|
+
"popper-class",
|
|
1003
|
+
"popper-style",
|
|
1004
|
+
"effect",
|
|
1005
|
+
"persistent"
|
|
1006
|
+
])) : I("v-if", !0),
|
|
1007
|
+
e.filterable && !J(w) ? Ke((W(), L("input", {
|
|
1008
|
+
key: 1,
|
|
1009
|
+
"onUpdate:modelValue": n[2] || (n[2] = (e) => M.value = e),
|
|
1010
|
+
type: "text",
|
|
1011
|
+
class: H(J(v).e("search-input")),
|
|
1012
|
+
placeholder: Ze.value ? "" : B.value,
|
|
1013
|
+
onInput: n[3] || (n[3] = (e) => Et(M.value, e)),
|
|
1014
|
+
onClick: n[4] || (n[4] = Z((e) => $(!0), ["stop"])),
|
|
1015
|
+
onKeydown: qe(St, ["delete"]),
|
|
1016
|
+
onCompositionstart: n[5] || (n[5] = (...e) => J(E) && J(E)(...e)),
|
|
1017
|
+
onCompositionupdate: n[6] || (n[6] = (...e) => J(E) && J(E)(...e)),
|
|
1018
|
+
onCompositionend: n[7] || (n[7] = (...e) => J(E) && J(E)(...e))
|
|
1019
|
+
}, null, 42, wt)), [[We, M.value]]) : I("v-if", !0)
|
|
1020
|
+
], 2)) : I("v-if", !0)], 38)), [[
|
|
1021
|
+
J(xe),
|
|
1022
|
+
it,
|
|
1023
|
+
rt.value
|
|
1024
|
+
]])]),
|
|
1025
|
+
content: X(() => [
|
|
1026
|
+
t.$slots.header ? (W(), L("div", {
|
|
1027
|
+
key: 0,
|
|
1028
|
+
class: H(J(v).e("header")),
|
|
1029
|
+
onClick: n[11] || (n[11] = Z(() => {}, ["stop"]))
|
|
1030
|
+
}, [K(t.$slots, "header")], 2)) : I("v-if", !0),
|
|
1031
|
+
Ke(z(J(bt), {
|
|
1032
|
+
ref_key: "cascaderPanelRef",
|
|
1033
|
+
ref: k,
|
|
1034
|
+
modelValue: et.value,
|
|
1035
|
+
"onUpdate:modelValue": n[12] || (n[12] = (e) => et.value = e),
|
|
1036
|
+
options: e.options,
|
|
1037
|
+
props: o.props,
|
|
1038
|
+
border: !1,
|
|
1039
|
+
"render-label": t.$slots.default,
|
|
1040
|
+
onExpandChange: ht,
|
|
1041
|
+
onClose: n[13] || (n[13] = (e) => t.$nextTick(() => $(!1)))
|
|
1042
|
+
}, {
|
|
1043
|
+
empty: X(() => [K(t.$slots, "empty")]),
|
|
1044
|
+
_: 3
|
|
1045
|
+
}, 8, [
|
|
1046
|
+
"modelValue",
|
|
1047
|
+
"options",
|
|
1048
|
+
"props",
|
|
1049
|
+
"render-label"
|
|
1050
|
+
]), [[Ge, !j.value]]),
|
|
1051
|
+
e.filterable ? Ke((W(), F(J(ye), {
|
|
1052
|
+
key: 1,
|
|
1053
|
+
ref_key: "suggestionPanel",
|
|
1054
|
+
ref: be,
|
|
1055
|
+
tag: "ul",
|
|
1056
|
+
class: H(J(v).e("suggestion-panel")),
|
|
1057
|
+
"view-class": J(v).e("suggestion-list"),
|
|
1058
|
+
onKeydown: xt
|
|
1059
|
+
}, {
|
|
1060
|
+
default: X(() => [Te.value.length ? (W(!0), L(Oe, { key: 0 }, Re(Te.value, (e) => (W(), L("li", {
|
|
1061
|
+
key: e.uid,
|
|
1062
|
+
class: H([J(v).e("suggestion-item"), J(v).is("checked", e.checked)]),
|
|
1063
|
+
tabindex: -1,
|
|
1064
|
+
onClick: (t) => yt(e)
|
|
1065
|
+
}, [K(t.$slots, "suggestion-item", { item: e }, () => [R("span", null, q(e.text), 1), e.checked ? (W(), F(J(O), { key: 0 }, {
|
|
1066
|
+
default: X(() => [z(J(me))]),
|
|
1067
|
+
_: 1
|
|
1068
|
+
})) : I("v-if", !0)])], 10, Tt))), 128)) : K(t.$slots, "empty", { key: 1 }, () => [R("li", { class: H(J(v).e("empty-text")) }, q(J(ae)("el.cascader.noMatch")), 3)])]),
|
|
1069
|
+
_: 3
|
|
1070
|
+
}, 8, ["class", "view-class"])), [[Ge, j.value]]) : I("v-if", !0),
|
|
1071
|
+
t.$slots.footer ? (W(), L("div", {
|
|
1072
|
+
key: 2,
|
|
1073
|
+
class: H(J(v).e("footer")),
|
|
1074
|
+
onClick: n[14] || (n[14] = Z(() => {}, ["stop"]))
|
|
1075
|
+
}, [K(t.$slots, "footer")], 2)) : I("v-if", !0)
|
|
1076
|
+
]),
|
|
1077
|
+
_: 3
|
|
1078
|
+
}, 8, [
|
|
1079
|
+
"visible",
|
|
1080
|
+
"teleported",
|
|
1081
|
+
"popper-class",
|
|
1082
|
+
"popper-style",
|
|
1083
|
+
"fallback-placements",
|
|
1084
|
+
"placement",
|
|
1085
|
+
"transition",
|
|
1086
|
+
"effect",
|
|
1087
|
+
"persistent"
|
|
1088
|
+
]));
|
|
1089
|
+
}
|
|
1090
|
+
}))).filter((e) => ![
|
|
1091
|
+
"value",
|
|
1092
|
+
"placeholder",
|
|
1093
|
+
"disabled",
|
|
1094
|
+
"options",
|
|
1095
|
+
"showAllLevels",
|
|
1096
|
+
"show-all-levels",
|
|
1097
|
+
"separator"
|
|
1098
|
+
].includes(e)), Dt = {
|
|
1099
|
+
name: "FormCascader",
|
|
1100
|
+
mixins: [
|
|
1101
|
+
N,
|
|
1102
|
+
Te,
|
|
1103
|
+
Ee
|
|
1104
|
+
],
|
|
1105
|
+
props: {
|
|
1106
|
+
value: [
|
|
1107
|
+
String,
|
|
1108
|
+
Number,
|
|
1109
|
+
Array
|
|
1110
|
+
],
|
|
1111
|
+
options: {
|
|
1112
|
+
type: Array,
|
|
1113
|
+
default: () => []
|
|
1114
|
+
},
|
|
1115
|
+
showAllLevels: {
|
|
1116
|
+
type: Boolean,
|
|
1117
|
+
default: !0
|
|
1118
|
+
},
|
|
1119
|
+
separator: {
|
|
1120
|
+
type: String,
|
|
1121
|
+
default: "/"
|
|
1122
|
+
},
|
|
1123
|
+
last: Boolean,
|
|
1124
|
+
checkStrictly: Boolean,
|
|
1125
|
+
labelKey: {
|
|
1126
|
+
type: String,
|
|
1127
|
+
default: "label"
|
|
1128
|
+
},
|
|
1129
|
+
valueKey: {
|
|
1130
|
+
type: String,
|
|
1131
|
+
default: "value"
|
|
1132
|
+
},
|
|
1133
|
+
emitPath: {
|
|
1134
|
+
type: Boolean,
|
|
1135
|
+
default: !0
|
|
1136
|
+
},
|
|
1137
|
+
join: {
|
|
1138
|
+
type: Boolean,
|
|
1139
|
+
default: !0
|
|
1140
|
+
},
|
|
1141
|
+
idAsValue: {
|
|
1142
|
+
type: Boolean,
|
|
1143
|
+
default: !0
|
|
1144
|
+
},
|
|
1145
|
+
labelAsValue: Boolean,
|
|
1146
|
+
treeDict: {
|
|
1147
|
+
type: Boolean,
|
|
1148
|
+
default: !0
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
computed: {
|
|
1152
|
+
inputProps() {
|
|
1153
|
+
return we({
|
|
1154
|
+
...j(this.$attrs),
|
|
1155
|
+
...this.$props
|
|
1156
|
+
}, Et);
|
|
1157
|
+
},
|
|
1158
|
+
inputVal() {
|
|
1159
|
+
if (this.join) return Ye(this.value) ? this.value : Xe(this.value) ? this.value.split(this.separator) : [];
|
|
1160
|
+
if (this.last) {
|
|
1161
|
+
let [e] = Je(this.innerOptions, (e) => e[this.valueKey] === this.value), t = [];
|
|
1162
|
+
for (; e;) t.push(e[this.valueKey]), e = e.parent;
|
|
1163
|
+
return t.reverse();
|
|
1164
|
+
}
|
|
1165
|
+
return this.value;
|
|
1166
|
+
},
|
|
1167
|
+
innerOptions() {
|
|
1168
|
+
if (this.dictType) return this.dictItems;
|
|
1169
|
+
if (this.options) {
|
|
1170
|
+
let e = Qe(this.options);
|
|
1171
|
+
return this.last && Ze(e), e;
|
|
1172
|
+
} else return [];
|
|
1173
|
+
}
|
|
1174
|
+
},
|
|
1175
|
+
methods: { emitInput(e) {
|
|
1176
|
+
if (this.join && Ye(e)) this.$emit("input", e.join(this.separator));
|
|
1177
|
+
else {
|
|
1178
|
+
let t = this.last ? e[e.length - 1] : e;
|
|
1179
|
+
this.$emit("input", t);
|
|
1180
|
+
}
|
|
1181
|
+
} }
|
|
1182
|
+
};
|
|
1183
|
+
function Ot(e, t, n, r, i, a) {
|
|
1184
|
+
let o = ze("ElCascader"), s = ze("FormItem");
|
|
1185
|
+
return W(), F(s, Me(e.formItemProps, {
|
|
1186
|
+
rules: e.computeRules,
|
|
1187
|
+
disabled: e.inputDisabled
|
|
1188
|
+
}), {
|
|
1189
|
+
default: X(() => [K(e.$slots, "default", {}, () => [z(o, Me({
|
|
1190
|
+
clearable: "",
|
|
1191
|
+
style: { width: "100%" },
|
|
1192
|
+
class: { "is-readonly": e.readonly },
|
|
1193
|
+
value: a.inputVal,
|
|
1194
|
+
"show-all-levels": n.showAllLevels,
|
|
1195
|
+
separator: n.separator,
|
|
1196
|
+
readonly: e.readonly,
|
|
1197
|
+
options: a.innerOptions,
|
|
1198
|
+
props: {
|
|
1199
|
+
checkStrictly: n.checkStrictly,
|
|
1200
|
+
label: n.labelKey,
|
|
1201
|
+
value: n.valueKey,
|
|
1202
|
+
emitPath: n.emitPath,
|
|
1203
|
+
expandTrigger: "hover"
|
|
1204
|
+
},
|
|
1205
|
+
disabled: e.inputDisabled,
|
|
1206
|
+
placeholder: e.computePlaceholder
|
|
1207
|
+
}, a.inputProps, Ve(e.listeners), { onInput: a.emitInput }), null, 16, [
|
|
1208
|
+
"class",
|
|
1209
|
+
"value",
|
|
1210
|
+
"show-all-levels",
|
|
1211
|
+
"separator",
|
|
1212
|
+
"readonly",
|
|
1213
|
+
"options",
|
|
1214
|
+
"props",
|
|
1215
|
+
"disabled",
|
|
1216
|
+
"placeholder",
|
|
1217
|
+
"onInput"
|
|
1218
|
+
])])]),
|
|
1219
|
+
error: X(({ error: t }) => [K(e.$slots, "error", { error: t })]),
|
|
1220
|
+
label: X(() => [K(e.$slots, "label")]),
|
|
1221
|
+
_: 3
|
|
1222
|
+
}, 16, ["rules", "disabled"]);
|
|
1223
|
+
}
|
|
1224
|
+
var kt = /* @__PURE__ */ o(Dt, [["render", Ot]]);
|
|
1225
|
+
//#endregion
|
|
1226
|
+
export { kt as t };
|