st-comp 0.0.262 → 0.0.266
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/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +31 -31
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +37 -36
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +839 -1593
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +1198 -1
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +89 -89
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +17 -17
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +20 -20
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +25 -25
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +113 -113
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +29 -29
- package/es/User.cjs +1 -1
- package/es/User.js +25 -25
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +27 -27
- package/es/VarietyAiHelper.cjs +3 -3
- package/es/VarietyAiHelper.js +324 -283
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +11 -11
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +56 -55
- package/es/{VarietySelect-faef4799.js → VarietySelect-1ac10ec2.js} +4 -4
- package/es/{VarietySelect-5c845562.cjs → VarietySelect-639a8d9a.cjs} +1 -1
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +13 -13
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +14 -14
- package/es/{_initCloneObject-009eedf8.js → _initCloneObject-6b8c230e.js} +7 -7
- package/es/{_initCloneObject-2b82e9f7.cjs → _initCloneObject-9eddcb0c.cjs} +1 -1
- package/es/aiTools-6c9c58bd.cjs +4 -0
- package/es/aiTools-ab67ffa0.js +149 -0
- package/es/aiTools.js +92 -1
- package/es/{base-7ff209fc.js → base-29f73b05.js} +40 -40
- package/es/{castArray-b9f1609f.js → castArray-609a313e.js} +1 -1
- package/es/{config-provider-071b8bec.js → config-provider-56193d47.js} +6 -6
- package/es/{config-provider-2ae47cc8.cjs → config-provider-ea286661.cjs} +1 -1
- package/es/{debounce-23c2f7e1.js → debounce-a09ce9a3.js} +1 -1
- package/es/{dropdown-9941f401.js → dropdown-4e541d60.js} +4 -4
- package/es/{dropdown-eba9eaf5.cjs → dropdown-f30148cc.cjs} +1 -1
- package/es/{el-autocomplete-b59eb529.cjs → el-autocomplete-3949e68c.cjs} +1 -1
- package/es/{el-autocomplete-43f205b0.js → el-autocomplete-4b521c83.js} +17 -17
- package/es/{el-button-7f58608d.js → el-button-4f201000.js} +33 -33
- package/es/{el-button-974ff9e9.cjs → el-button-dd065de0.cjs} +1 -1
- package/es/{el-checkbox-08185353.cjs → el-checkbox-02ce40f0.cjs} +1 -1
- package/es/{el-checkbox-40664b27.js → el-checkbox-33cb73db.js} +17 -17
- package/es/el-checkbox-group-0ea8fbf8.cjs +1 -0
- package/es/el-checkbox-group-4ed993c7.js +1 -0
- package/es/{el-dialog-2f10a2f4.js → el-dialog-1939f7c5.js} +15 -15
- package/es/{el-dialog-1b185570.cjs → el-dialog-6501a151.cjs} +1 -1
- package/es/{el-divider-4e66c835.js → el-divider-523e5874.js} +1 -1
- package/es/{el-empty-e0d826de.js → el-empty-f5a1607a.js} +5 -5
- package/es/{el-form-item-c997b4fa.cjs → el-form-item-316b35d8.cjs} +1 -1
- package/es/{el-form-item-2b68cdf5.js → el-form-item-ea11211d.js} +36 -36
- package/es/{el-input-fa18ef84.cjs → el-input-094afbe2.cjs} +1 -1
- package/es/{el-input-31a818d4.js → el-input-58786d42.js} +43 -43
- package/es/{el-checkbox-group-f775e73f.cjs → el-input-number-a609a5e3.cjs} +1 -1
- package/es/{el-checkbox-group-3ddad0d7.js → el-input-number-a7971697.js} +30 -30
- package/es/{el-loading-969a79ca.cjs → el-loading-d171ce64.cjs} +1 -1
- package/es/{el-loading-3e350f5e.js → el-loading-f3815921.js} +5 -5
- package/es/el-menu-item-3d1e0aff.cjs +1 -0
- package/es/el-menu-item-a166b997.js +769 -0
- package/es/{el-message-box-31e0aa98.cjs → el-message-box-b8ffcf34.cjs} +1 -1
- package/es/{el-message-box-a3aa9b89.js → el-message-box-f2b667e9.js} +11 -11
- package/es/{el-overlay-4e9a99e0.js → el-overlay-1dfe3675.js} +59 -59
- package/es/{el-overlay-ea65cb05.cjs → el-overlay-a94f8a98.cjs} +1 -1
- package/es/{el-popconfirm-9e232436.cjs → el-popconfirm-70e2849c.cjs} +1 -1
- package/es/{el-popconfirm-c2896741.js → el-popconfirm-ca31ceea.js} +12 -12
- package/es/{el-popper-2d3914e4.cjs → el-popper-ce575c12.cjs} +1 -1
- package/es/{el-popper-003b3af7.js → el-popper-db6c599f.js} +177 -177
- package/es/{el-segmented-140ac042.cjs → el-segmented-4d50b63f.cjs} +1 -1
- package/es/{el-segmented-4ae54e6a.js → el-segmented-741f2252.js} +8 -8
- package/es/{el-select-19ee0e79.js → el-select-086bcb6c.js} +65 -65
- package/es/{el-select-a11f33e8.cjs → el-select-2ebc8380.cjs} +1 -1
- package/es/{el-table-column-98570a4d.cjs → el-table-column-2f07fbdb.cjs} +1 -1
- package/es/{el-table-column-3be856d7.js → el-table-column-8a15378a.js} +16 -16
- package/es/{el-tag-19cc5b59.js → el-tag-65a99986.js} +14 -14
- package/es/{el-tag-6d8e653e.cjs → el-tag-f48b1190.cjs} +1 -1
- package/es/{el-text-a18106cb.cjs → el-text-33359f44.cjs} +1 -1
- package/es/{el-text-9a7a4f0f.js → el-text-cbb693f2.js} +2 -2
- package/es/{index-99abf4ff.js → index-072c4a65.js} +17 -17
- package/es/{index-299ee017.cjs → index-0f767104.cjs} +1 -1
- package/es/{index-eb99b188.cjs → index-18565979.cjs} +1 -1
- package/es/{index-19ac550e.js → index-1955f23d.js} +49 -49
- package/es/{index-6917da9d.js → index-1e91e986.js} +43 -43
- package/es/{index-6ca95c8a.cjs → index-21e8d2bc.cjs} +1 -1
- package/es/{index-33f80550.cjs → index-3792552a.cjs} +1 -1
- package/es/{index-7dce9f59.cjs → index-4f900527.cjs} +1 -1
- package/es/{index-308aab33.js → index-57d82da0.js} +34 -34
- package/es/{index-e8eeea22.cjs → index-5b546f7d.cjs} +1 -1
- package/es/{index-808db9b4.js → index-7db02db7.js} +11 -11
- package/es/{index-37b8d3c6.cjs → index-7eb88616.cjs} +1 -1
- package/es/{index-d898531c.js → index-8391a3df.js} +37 -37
- package/es/{index-6b99def3.cjs → index-8439d2f9.cjs} +1 -1
- package/es/{index-40f05e2c.cjs → index-8b055879.cjs} +2 -2
- package/es/{index-f3799536.js → index-a4e252a0.js} +2 -2
- package/es/{index-b56d81e8.js → index-b51915a2.js} +3 -3
- package/es/{index-28e03bad.cjs → index-bf98dd03.cjs} +1 -1
- package/es/{index-e17987ac.js → index-ca91ac68.js} +83 -68
- package/es/{index-41dd5a1c.js → index-d857270a.js} +10 -10
- package/es/{index-f402d1da.js → index-de24705f.js} +1 -1
- package/es/{index-6d530e54.js → index-ff26b1a6.js} +13 -13
- package/es/{python-02c3937a.cjs → python-5b5c9c58.cjs} +1 -1
- package/es/{python-be79c7c1.js → python-ad9239f9.js} +25 -25
- package/es/raf-744cf95a.js +6 -0
- package/es/{scroll-8642151c.js → scroll-6799bafc.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-d3ed62c6.cjs → use-form-common-props-00ec25ac.cjs} +1 -1
- package/es/{use-form-common-props-d170ccfd.js → use-form-common-props-c14990b9.js} +65 -65
- package/es/{use-global-config-c80f33a4.cjs → use-global-config-28efb416.cjs} +1 -1
- package/es/{use-global-config-74436b92.js → use-global-config-a01b5ce1.js} +14 -14
- package/es/{validator-07160325.cjs → validator-119fdaf4.cjs} +1 -1
- package/es/{validator-672bad4a.js → validator-65de1caf.js} +1 -1
- package/es/{vnode-6d2615f0.js → vnode-a83e6de8.js} +1 -1
- package/es/{zh-cn-6a0f844c.cjs → zh-cn-9fb29a39.cjs} +1 -1
- package/es/{zh-cn-ed10eeb1.js → zh-cn-c1c28e70.js} +2 -2
- package/lib/aiTools.js +92 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +182 -181
- package/lib/{index-c3ddbee7.js → index-53b3465c.js} +18966 -18852
- package/lib/{python-da8fd227.js → python-4a270481.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/index.vue +1 -1
- package/packages/VarietyAiHelper/index.vue +271 -290
- package/public/aiTools.js +92 -1
- package/es/aiTools-2e1f92d2.cjs +0 -3
- package/es/aiTools-faa0a14d.js +0 -90
- package/es/raf-ba3dfafe.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("vue"),Q=require("./el-button-974ff9e9.cjs"),Y=require("./el-input-fa18ef84.cjs"),V=require("./el-overlay-ea65cb05.cjs"),I=require("./index-33f80550.cjs"),M=require("./index-28e03bad.cjs"),c=require("./base-ef747d02.cjs"),T=require("./use-form-common-props-d3ed62c6.cjs"),x=require("./validator-07160325.cjs"),_=require("./use-global-config-c80f33a4.cjs"),L=require("./index-9780a537.cjs"),ee=require("./el-dialog-1b185570.cjs"),z="_trap-focus-children",C=[],q=e=>{if(C.length===0)return;const t=C[C.length-1][z];if(t.length>0&&e.code===M.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const a=e.shiftKey,i=e.target===t[0],r=e.target===t[t.length-1];i&&a&&(e.preventDefault(),t[t.length-1].focus()),r&&!a&&(e.preventDefault(),t[0].focus())}},ne={beforeMount(e){e[z]=M.obtainAllFocusableElements(e),C.push(e),C.length<=1&&document.addEventListener("keydown",q)},updated(e){n.nextTick(()=>{e[z]=M.obtainAllFocusableElements(e)})},unmounted(){C.shift(),C.length===0&&document.removeEventListener("keydown",q)}},oe=n.defineComponent({name:"ElMessageBox",directives:{TrapFocus:ne},components:{ElButton:Q.ElButton,ElFocusTrap:M.ElFocusTrap,ElInput:Y.ElInput,ElOverlay:V.ElOverlay,ElIcon:I.ElIcon,...T.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:x.isValidComponentSize},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,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:a,zIndex:i,ns:r,size:l}=_.useGlobalComponentSettings("message-box",n.computed(()=>e.buttonSize)),{t:u}=a,{nextZIndex:p}=i,g=n.ref(!1),o=n.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:n.markRaw(I.loading_default),cancelButtonLoadingIcon:n.markRaw(I.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:p()}),S=n.computed(()=>{const s=o.type;return{[r.bm("icon",s)]:s&&T.TypeComponentsMap[s]}}),m=L.useId(),P=L.useId(),F=n.computed(()=>{const s=o.type;return o.icon||s&&T.TypeComponentsMap[s]||""}),K=n.computed(()=>!!o.message),h=n.ref(),N=n.ref(),b=n.ref(),w=n.ref(),A=n.ref(),U=n.computed(()=>o.confirmButtonClass);n.watch(()=>o.inputValue,async s=>{await n.nextTick(),e.boxType==="prompt"&&s&&O()},{immediate:!0}),n.watch(()=>g.value,s=>{var d,f;s&&(e.boxType!=="prompt"&&(o.autofocus?b.value=(f=(d=A.value)==null?void 0:d.$el)!=null?f:h.value:b.value=h.value),o.zIndex=p()),e.boxType==="prompt"&&(s?n.nextTick().then(()=>{var $;w.value&&w.value.$el&&(o.autofocus?b.value=($=Z())!=null?$:h.value:b.value=h.value)}):(o.editorErrorMessage="",o.validateError=!1))});const H=n.computed(()=>e.draggable),j=n.computed(()=>e.overflow),{isDragging:G}=ee.useDraggable(h,N,H,j);n.onMounted(async()=>{await n.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",B)}),n.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",B)});function B(){g.value&&(g.value=!1,n.nextTick(()=>{o.action&&t("action",o.action)}))}const D=()=>{e.closeOnClickModal&&k(o.distinguishCancelAndClose?"close":"cancel")},X=V.useSameTarget(D),W=s=>{if(o.inputType!=="textarea")return s.preventDefault(),k("confirm")},k=s=>{var d;e.boxType==="prompt"&&s==="confirm"&&!O()||(o.action=s,o.beforeClose?(d=o.beforeClose)==null||d.call(o,s,o,B):B())},O=()=>{if(e.boxType==="prompt"){const s=o.inputPattern;if(s&&!s.test(o.inputValue||""))return o.editorErrorMessage=o.inputErrorMessage||u("el.messagebox.error"),o.validateError=!0,!1;const d=o.inputValidator;if(c.isFunction(d)){const f=d(o.inputValue);if(f===!1)return o.editorErrorMessage=o.inputErrorMessage||u("el.messagebox.error"),o.validateError=!0,!1;if(c.isString(f))return o.editorErrorMessage=f,o.validateError=!0,!1}}return o.editorErrorMessage="",o.validateError=!1,!0},Z=()=>{var s,d;const f=(s=w.value)==null?void 0:s.$refs;return(d=f==null?void 0:f.input)!=null?d:f==null?void 0:f.textarea},R=()=>{k("close")},J=()=>{e.closeOnPressEscape&&R()};return e.lockScroll&&V.useLockscreen(g),{...n.toRefs(o),ns:r,overlayEvent:X,visible:g,hasMessage:K,typeClass:S,contentId:m,inputId:P,btnSize:l,iconComponent:F,confirmButtonClasses:U,rootRef:h,focusStartRef:b,headerRef:N,inputRef:w,isDragging:G,confirmRef:A,doClose:B,handleClose:R,onCloseRequested:J,handleWrapperClick:D,handleInputEnter:W,handleAction:k,t:u}}});function te(e,t,a,i,r,l){const u=n.resolveComponent("el-icon"),p=n.resolveComponent("el-input"),g=n.resolveComponent("el-button"),o=n.resolveComponent("el-focus-trap"),S=n.resolveComponent("el-overlay");return n.openBlock(),n.createBlock(n.Transition,{name:"fade-in-linear",onAfterLeave:m=>e.$emit("vanish"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(S,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:n.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[n.createVNode(o,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"rootRef",class:n.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:n.normalizeStyle(e.customStyle),tabindex:"-1",onClick:n.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"headerRef",class:n.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(n.openBlock(),n.createBlock(u,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.createElementVNode("span",null,n.toDisplayString(e.title),1)],2),e.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:n.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[n.createVNode(u,{class:n.normalizeClass(e.ns.e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):n.createCommentVNode("v-if",!0)],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{id:e.contentId,class:n.normalizeClass(e.ns.e("content"))},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(n.openBlock(),n.createBlock(u,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.hasMessage?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.e("message"))},[n.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:n.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):n.createCommentVNode("v-if",!0)],2),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("input"))},[n.createVNode(p,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":m=>e.inputValue=m,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:n.normalizeClass({invalid:e.validateError}),onKeydown:n.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("errormsg")),style:n.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},n.toDisplayString(e.editorErrorMessage),7)],2),[[n.vShow,e.showInput]])],10,["id"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(n.openBlock(),n.createBlock(g,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:n.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:m=>e.handleAction("cancel"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(g,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:n.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:m=>e.handleAction("confirm"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[n.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[n.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var le=c._export_sfc(oe,[["render",te],["__file","index.vue"]]);const E=new Map,se=e=>{let t=document.body;return e.appendTo&&(c.isString(e.appendTo)&&(t=document.querySelector(e.appendTo)),c.isElement(e.appendTo)&&(t=e.appendTo),c.isElement(t)||(t=document.body)),t},ae=(e,t,a=null)=>{const i=n.createVNode(le,e,c.isFunction(e.message)||n.isVNode(e.message)?{default:c.isFunction(e.message)?e.message:()=>e.message}:null);return i.appContext=a,n.render(i,t),se(e).appendChild(t.firstElementChild),i.component},re=()=>document.createElement("div"),ie=(e,t)=>{const a=re();e.onVanish=()=>{n.render(null,a),E.delete(r)},e.onAction=l=>{const u=E.get(r);let p;e.showInput?p={value:r.inputValue,action:l}:p=l,e.callback?e.callback(p,i.proxy):l==="cancel"||l==="close"?e.distinguishCancelAndClose&&l!=="cancel"?u.reject("close"):u.reject("cancel"):u.resolve(p)};const i=ae(e,a,t),r=i.proxy;for(const l in e)c.hasOwn(e,l)&&!c.hasOwn(r.$props,l)&&(l==="closeIcon"&&c.isObject(e[l])?r[l]=n.markRaw(e[l]):r[l]=e[l]);return r.visible=!0,r};function y(e,t=null){if(!c.isClient)return Promise.reject();let a;return c.isString(e)||n.isVNode(e)?e={message:e}:a=e.callback,new Promise((i,r)=>{const l=ie(e,t??y._context);E.set(l,{options:e,callback:a,resolve:i,reject:r})})}const ce=["alert","confirm","prompt"],ue={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};ce.forEach(e=>{y[e]=de(e)});function de(e){return(t,a,i,r)=>{let l="";return c.isObject(a)?(i=a,l=""):c.isUndefined(a)?l="":l=a,y(Object.assign({title:l,message:t,type:"",...ue[e]},i,{boxType:e}),r)}}y.close=()=>{E.forEach((e,t)=>{t.doClose()}),E.clear()};y._context=null;const v=y;v.install=e=>{v._context=e._context,e.config.globalProperties.$msgbox=v,e.config.globalProperties.$messageBox=v,e.config.globalProperties.$alert=v.alert,e.config.globalProperties.$confirm=v.confirm,e.config.globalProperties.$prompt=v.prompt};const fe=v;exports.ElMessageBox=fe;
|
|
1
|
+
"use strict";const n=require("vue"),Q=require("./el-button-dd065de0.cjs"),Y=require("./el-input-094afbe2.cjs"),V=require("./el-overlay-a94f8a98.cjs"),I=require("./index-3792552a.cjs"),M=require("./index-bf98dd03.cjs"),c=require("./base-ef747d02.cjs"),T=require("./use-form-common-props-00ec25ac.cjs"),x=require("./validator-119fdaf4.cjs"),_=require("./use-global-config-28efb416.cjs"),L=require("./index-9780a537.cjs"),ee=require("./el-dialog-6501a151.cjs"),z="_trap-focus-children",C=[],q=e=>{if(C.length===0)return;const t=C[C.length-1][z];if(t.length>0&&e.code===M.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const a=e.shiftKey,i=e.target===t[0],r=e.target===t[t.length-1];i&&a&&(e.preventDefault(),t[t.length-1].focus()),r&&!a&&(e.preventDefault(),t[0].focus())}},ne={beforeMount(e){e[z]=M.obtainAllFocusableElements(e),C.push(e),C.length<=1&&document.addEventListener("keydown",q)},updated(e){n.nextTick(()=>{e[z]=M.obtainAllFocusableElements(e)})},unmounted(){C.shift(),C.length===0&&document.removeEventListener("keydown",q)}},oe=n.defineComponent({name:"ElMessageBox",directives:{TrapFocus:ne},components:{ElButton:Q.ElButton,ElFocusTrap:M.ElFocusTrap,ElInput:Y.ElInput,ElOverlay:V.ElOverlay,ElIcon:I.ElIcon,...T.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:x.isValidComponentSize},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,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:a,zIndex:i,ns:r,size:l}=_.useGlobalComponentSettings("message-box",n.computed(()=>e.buttonSize)),{t:u}=a,{nextZIndex:p}=i,g=n.ref(!1),o=n.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:n.markRaw(I.loading_default),cancelButtonLoadingIcon:n.markRaw(I.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:p()}),S=n.computed(()=>{const s=o.type;return{[r.bm("icon",s)]:s&&T.TypeComponentsMap[s]}}),m=L.useId(),P=L.useId(),F=n.computed(()=>{const s=o.type;return o.icon||s&&T.TypeComponentsMap[s]||""}),K=n.computed(()=>!!o.message),h=n.ref(),N=n.ref(),b=n.ref(),w=n.ref(),A=n.ref(),U=n.computed(()=>o.confirmButtonClass);n.watch(()=>o.inputValue,async s=>{await n.nextTick(),e.boxType==="prompt"&&s&&O()},{immediate:!0}),n.watch(()=>g.value,s=>{var d,f;s&&(e.boxType!=="prompt"&&(o.autofocus?b.value=(f=(d=A.value)==null?void 0:d.$el)!=null?f:h.value:b.value=h.value),o.zIndex=p()),e.boxType==="prompt"&&(s?n.nextTick().then(()=>{var $;w.value&&w.value.$el&&(o.autofocus?b.value=($=Z())!=null?$:h.value:b.value=h.value)}):(o.editorErrorMessage="",o.validateError=!1))});const H=n.computed(()=>e.draggable),j=n.computed(()=>e.overflow),{isDragging:G}=ee.useDraggable(h,N,H,j);n.onMounted(async()=>{await n.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",B)}),n.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",B)});function B(){g.value&&(g.value=!1,n.nextTick(()=>{o.action&&t("action",o.action)}))}const D=()=>{e.closeOnClickModal&&k(o.distinguishCancelAndClose?"close":"cancel")},X=V.useSameTarget(D),W=s=>{if(o.inputType!=="textarea")return s.preventDefault(),k("confirm")},k=s=>{var d;e.boxType==="prompt"&&s==="confirm"&&!O()||(o.action=s,o.beforeClose?(d=o.beforeClose)==null||d.call(o,s,o,B):B())},O=()=>{if(e.boxType==="prompt"){const s=o.inputPattern;if(s&&!s.test(o.inputValue||""))return o.editorErrorMessage=o.inputErrorMessage||u("el.messagebox.error"),o.validateError=!0,!1;const d=o.inputValidator;if(c.isFunction(d)){const f=d(o.inputValue);if(f===!1)return o.editorErrorMessage=o.inputErrorMessage||u("el.messagebox.error"),o.validateError=!0,!1;if(c.isString(f))return o.editorErrorMessage=f,o.validateError=!0,!1}}return o.editorErrorMessage="",o.validateError=!1,!0},Z=()=>{var s,d;const f=(s=w.value)==null?void 0:s.$refs;return(d=f==null?void 0:f.input)!=null?d:f==null?void 0:f.textarea},R=()=>{k("close")},J=()=>{e.closeOnPressEscape&&R()};return e.lockScroll&&V.useLockscreen(g),{...n.toRefs(o),ns:r,overlayEvent:X,visible:g,hasMessage:K,typeClass:S,contentId:m,inputId:P,btnSize:l,iconComponent:F,confirmButtonClasses:U,rootRef:h,focusStartRef:b,headerRef:N,inputRef:w,isDragging:G,confirmRef:A,doClose:B,handleClose:R,onCloseRequested:J,handleWrapperClick:D,handleInputEnter:W,handleAction:k,t:u}}});function te(e,t,a,i,r,l){const u=n.resolveComponent("el-icon"),p=n.resolveComponent("el-input"),g=n.resolveComponent("el-button"),o=n.resolveComponent("el-focus-trap"),S=n.resolveComponent("el-overlay");return n.openBlock(),n.createBlock(n.Transition,{name:"fade-in-linear",onAfterLeave:m=>e.$emit("vanish"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(S,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:n.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[n.createVNode(o,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"rootRef",class:n.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:n.normalizeStyle(e.customStyle),tabindex:"-1",onClick:n.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"headerRef",class:n.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(n.openBlock(),n.createBlock(u,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.createElementVNode("span",null,n.toDisplayString(e.title),1)],2),e.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:n.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[n.createVNode(u,{class:n.normalizeClass(e.ns.e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):n.createCommentVNode("v-if",!0)],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{id:e.contentId,class:n.normalizeClass(e.ns.e("content"))},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(n.openBlock(),n.createBlock(u,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.hasMessage?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.e("message"))},[n.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:n.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):n.createCommentVNode("v-if",!0)],2),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("input"))},[n.createVNode(p,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":m=>e.inputValue=m,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:n.normalizeClass({invalid:e.validateError}),onKeydown:n.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("errormsg")),style:n.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},n.toDisplayString(e.editorErrorMessage),7)],2),[[n.vShow,e.showInput]])],10,["id"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(n.openBlock(),n.createBlock(g,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:n.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:m=>e.handleAction("cancel"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(g,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:n.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:m=>e.handleAction("confirm"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[n.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[n.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var le=c._export_sfc(oe,[["render",te],["__file","index.vue"]]);const E=new Map,se=e=>{let t=document.body;return e.appendTo&&(c.isString(e.appendTo)&&(t=document.querySelector(e.appendTo)),c.isElement(e.appendTo)&&(t=e.appendTo),c.isElement(t)||(t=document.body)),t},ae=(e,t,a=null)=>{const i=n.createVNode(le,e,c.isFunction(e.message)||n.isVNode(e.message)?{default:c.isFunction(e.message)?e.message:()=>e.message}:null);return i.appContext=a,n.render(i,t),se(e).appendChild(t.firstElementChild),i.component},re=()=>document.createElement("div"),ie=(e,t)=>{const a=re();e.onVanish=()=>{n.render(null,a),E.delete(r)},e.onAction=l=>{const u=E.get(r);let p;e.showInput?p={value:r.inputValue,action:l}:p=l,e.callback?e.callback(p,i.proxy):l==="cancel"||l==="close"?e.distinguishCancelAndClose&&l!=="cancel"?u.reject("close"):u.reject("cancel"):u.resolve(p)};const i=ae(e,a,t),r=i.proxy;for(const l in e)c.hasOwn(e,l)&&!c.hasOwn(r.$props,l)&&(l==="closeIcon"&&c.isObject(e[l])?r[l]=n.markRaw(e[l]):r[l]=e[l]);return r.visible=!0,r};function y(e,t=null){if(!c.isClient)return Promise.reject();let a;return c.isString(e)||n.isVNode(e)?e={message:e}:a=e.callback,new Promise((i,r)=>{const l=ie(e,t??y._context);E.set(l,{options:e,callback:a,resolve:i,reject:r})})}const ce=["alert","confirm","prompt"],ue={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};ce.forEach(e=>{y[e]=de(e)});function de(e){return(t,a,i,r)=>{let l="";return c.isObject(a)?(i=a,l=""):c.isUndefined(a)?l="":l=a,y(Object.assign({title:l,message:t,type:"",...ue[e]},i,{boxType:e}),r)}}y.close=()=>{E.forEach((e,t)=>{t.doClose()}),E.clear()};y._context=null;const v=y;v.install=e=>{v._context=e._context,e.config.globalProperties.$msgbox=v,e.config.globalProperties.$messageBox=v,e.config.globalProperties.$alert=v.alert,e.config.globalProperties.$confirm=v.confirm,e.config.globalProperties.$prompt=v.prompt};const fe=v;exports.ElMessageBox=fe;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { nextTick as V, defineComponent as Be, computed as b, ref as w, reactive as we, markRaw as N, watch as _, onMounted as Me, onBeforeUnmount as ke, toRefs as Ie, resolveComponent as A, openBlock as u, createBlock as g, Transition as Te, withCtx as C, withDirectives as K, createVNode as k, createElementVNode as v, normalizeClass as r, normalizeStyle as x, withModifiers as D, createElementBlock as U, resolveDynamicComponent as L, createCommentVNode as M, toDisplayString as R, withKeys as P, renderSlot as Se, vShow as H, createTextVNode as ee, isVNode as ie, render as ue } from "vue";
|
|
2
|
-
import { E as Ae } from "./el-button-
|
|
3
|
-
import { E as Le } from "./el-input-
|
|
4
|
-
import { E as Re,
|
|
5
|
-
import { E as Oe, l as ne } from "./index-
|
|
6
|
-
import { o as oe,
|
|
7
|
-
import {
|
|
8
|
-
import { T as Ue, m as ae } from "./use-form-common-props-
|
|
9
|
-
import { i as He } from "./validator-
|
|
10
|
-
import { u as Ne } from "./use-global-config-
|
|
11
|
-
import { u as le } from "./index-
|
|
12
|
-
import { u as je } from "./el-dialog-
|
|
2
|
+
import { E as Ae } from "./el-button-4f201000.js";
|
|
3
|
+
import { E as Le } from "./el-input-58786d42.js";
|
|
4
|
+
import { E as Re, b as Ve, c as $e } from "./el-overlay-1dfe3675.js";
|
|
5
|
+
import { E as Oe, l as ne } from "./index-ca91ac68.js";
|
|
6
|
+
import { o as oe, E as ze, c as De } from "./index-1955f23d.js";
|
|
7
|
+
import { x as j, c as G, _ as Pe, s as Fe, y as se, f as ce, i as Ke, z as te } from "./base-29f73b05.js";
|
|
8
|
+
import { T as Ue, m as ae } from "./use-form-common-props-c14990b9.js";
|
|
9
|
+
import { i as He } from "./validator-65de1caf.js";
|
|
10
|
+
import { u as Ne } from "./use-global-config-a01b5ce1.js";
|
|
11
|
+
import { u as le } from "./index-8391a3df.js";
|
|
12
|
+
import { u as je } from "./el-dialog-1939f7c5.js";
|
|
13
13
|
const q = "_trap-focus-children", E = [], re = (e) => {
|
|
14
14
|
if (E.length === 0)
|
|
15
15
|
return;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ce, createVNode as de, renderSlot as Y, h as fe, isRef as ve, computed as d, watch as
|
|
2
|
-
import { N as
|
|
3
|
-
import { P } from "./vnode-
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
import { g as Ae } from "./scroll-
|
|
7
|
-
import { u as
|
|
8
|
-
import { a as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as ce, createVNode as de, renderSlot as Y, h as fe, isRef as ve, computed as d, watch as E, onScopeDispose as ye, getCurrentInstance as me, ref as S, nextTick as ge, onMounted as be } from "vue";
|
|
2
|
+
import { N as P, b as D, e as _, u as Z, o as Ce, s as q, h as $, a as pe, t as he, r as Se, E as Ee, n as _e, f as we, j as xe, x as K, d as W } from "./base-29f73b05.js";
|
|
3
|
+
import { P as k } from "./vnode-a83e6de8.js";
|
|
4
|
+
import { i as Be, w as Oe } from "./use-form-common-props-c14990b9.js";
|
|
5
|
+
import { j as Ie, U as J, a as Te } from "./index-1955f23d.js";
|
|
6
|
+
import { g as Ae } from "./scroll-6799bafc.js";
|
|
7
|
+
import { u as G } from "./index-8391a3df.js";
|
|
8
|
+
import { a as Le } from "./use-global-config-a01b5ce1.js";
|
|
9
|
+
const Me = (e) => {
|
|
10
10
|
if (!e)
|
|
11
|
-
return { onClick:
|
|
11
|
+
return { onClick: P, onMousedown: P, onMouseup: P };
|
|
12
12
|
let t = !1, s = !1;
|
|
13
13
|
return { onClick: (l) => {
|
|
14
14
|
t && s && e(l), t = s = !1;
|
|
@@ -17,33 +17,33 @@ const Le = (e) => {
|
|
|
17
17
|
}, onMouseup: (l) => {
|
|
18
18
|
s = l.target === l.currentTarget;
|
|
19
19
|
} };
|
|
20
|
-
},
|
|
20
|
+
}, Pe = D({
|
|
21
21
|
mask: {
|
|
22
22
|
type: Boolean,
|
|
23
23
|
default: !0
|
|
24
24
|
},
|
|
25
25
|
customMaskEvent: Boolean,
|
|
26
26
|
overlayClass: {
|
|
27
|
-
type:
|
|
27
|
+
type: _([
|
|
28
28
|
String,
|
|
29
29
|
Array,
|
|
30
30
|
Object
|
|
31
31
|
])
|
|
32
32
|
},
|
|
33
33
|
zIndex: {
|
|
34
|
-
type:
|
|
34
|
+
type: _([String, Number])
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), ke = {
|
|
37
37
|
click: (e) => e instanceof MouseEvent
|
|
38
38
|
}, De = "overlay";
|
|
39
39
|
var Fe = ce({
|
|
40
40
|
name: "ElOverlay",
|
|
41
|
-
props:
|
|
42
|
-
emits:
|
|
41
|
+
props: Pe,
|
|
42
|
+
emits: ke,
|
|
43
43
|
setup(e, { slots: t, emit: s }) {
|
|
44
|
-
const f =
|
|
44
|
+
const f = Z(De), a = (y) => {
|
|
45
45
|
s("click", y);
|
|
46
|
-
}, { onClick: u, onMousedown: l, onMouseup: v } =
|
|
46
|
+
}, { onClick: u, onMousedown: l, onMouseup: v } = Me(e.customMaskEvent ? void 0 : a);
|
|
47
47
|
return () => e.mask ? de("div", {
|
|
48
48
|
class: [f.b(), e.overlayClass],
|
|
49
49
|
style: {
|
|
@@ -52,7 +52,7 @@ var Fe = ce({
|
|
|
52
52
|
onClick: u,
|
|
53
53
|
onMousedown: l,
|
|
54
54
|
onMouseup: v
|
|
55
|
-
}, [Y(t, "default")],
|
|
55
|
+
}, [Y(t, "default")], k.STYLE | k.CLASS | k.PROPS, ["onClick", "onMouseup", "onMousedown"]) : fe("div", {
|
|
56
56
|
class: e.overlayClass,
|
|
57
57
|
style: {
|
|
58
58
|
zIndex: e.zIndex,
|
|
@@ -65,14 +65,14 @@ var Fe = ce({
|
|
|
65
65
|
}, [Y(t, "default")]);
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
const
|
|
68
|
+
const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
69
69
|
center: Boolean,
|
|
70
70
|
alignCenter: {
|
|
71
71
|
type: Boolean,
|
|
72
72
|
default: void 0
|
|
73
73
|
},
|
|
74
74
|
closeIcon: {
|
|
75
|
-
type:
|
|
75
|
+
type: Be
|
|
76
76
|
},
|
|
77
77
|
draggable: {
|
|
78
78
|
type: Boolean,
|
|
@@ -98,7 +98,7 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
98
98
|
type: String,
|
|
99
99
|
default: "2"
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
101
|
+
}), qe = {
|
|
102
102
|
close: () => !0
|
|
103
103
|
}, Je = D({
|
|
104
104
|
...Ne,
|
|
@@ -108,7 +108,7 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
108
108
|
default: "body"
|
|
109
109
|
},
|
|
110
110
|
beforeClose: {
|
|
111
|
-
type:
|
|
111
|
+
type: _(Function)
|
|
112
112
|
},
|
|
113
113
|
destroyOnClose: Boolean,
|
|
114
114
|
closeOnClickModal: {
|
|
@@ -156,7 +156,7 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
156
156
|
default: "2"
|
|
157
157
|
},
|
|
158
158
|
transition: {
|
|
159
|
-
type:
|
|
159
|
+
type: _([String, Object]),
|
|
160
160
|
default: void 0
|
|
161
161
|
}
|
|
162
162
|
}), Qe = {
|
|
@@ -169,8 +169,8 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
169
169
|
closeAutoFocus: () => !0
|
|
170
170
|
}, ze = (e, t = {}) => {
|
|
171
171
|
ve(e) || Te("[useLockscreen]", "You need to pass a ref param to this function");
|
|
172
|
-
const s = t.ns ||
|
|
173
|
-
if (!
|
|
172
|
+
const s = t.ns || Z("popup"), f = d(() => s.bm("parent", "hidden"));
|
|
173
|
+
if (!q || $(document.body, f.value))
|
|
174
174
|
return;
|
|
175
175
|
let a = 0, u = !1, l = "0";
|
|
176
176
|
const v = () => {
|
|
@@ -178,7 +178,7 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
178
178
|
typeof document > "u" || u && document && (document.body.style.width = l, Se(document.body, f.value));
|
|
179
179
|
}, 200);
|
|
180
180
|
};
|
|
181
|
-
|
|
181
|
+
E(e, (y) => {
|
|
182
182
|
if (!y) {
|
|
183
183
|
v();
|
|
184
184
|
return;
|
|
@@ -191,17 +191,17 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
191
191
|
var s;
|
|
192
192
|
const a = me().emit, { nextZIndex: u } = Oe();
|
|
193
193
|
let l = "";
|
|
194
|
-
const v =
|
|
194
|
+
const v = G(), y = G(), i = S(!1), m = S(!1), C = S(!1), w = S((s = e.zIndex) != null ? s : u());
|
|
195
195
|
let g, b;
|
|
196
|
-
const F =
|
|
196
|
+
const F = Le(), Q = d(() => {
|
|
197
197
|
var o, n;
|
|
198
|
-
return (n = (o = F.value) == null ? void 0 : o.namespace) != null ? n :
|
|
198
|
+
return (n = (o = F.value) == null ? void 0 : o.namespace) != null ? n : Ee;
|
|
199
199
|
}), p = d(() => {
|
|
200
200
|
var o;
|
|
201
201
|
return (o = F.value) == null ? void 0 : o.dialog;
|
|
202
202
|
}), X = d(() => {
|
|
203
203
|
const o = {}, n = `--${Q.value}-dialog`;
|
|
204
|
-
return e.fullscreen || (e.top && (o[`${n}-margin-top`] = e.top), e.width && (o[`${n}-width`] =
|
|
204
|
+
return e.fullscreen || (e.top && (o[`${n}-margin-top`] = e.top), e.width && (o[`${n}-width`] = _e(e.width))), o;
|
|
205
205
|
}), R = d(() => {
|
|
206
206
|
var o, n, r;
|
|
207
207
|
return ((r = (n = e.draggable) != null ? n : (o = p.value) == null ? void 0 : o.draggable) != null ? r : !1) && !e.fullscreen;
|
|
@@ -213,26 +213,26 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
213
213
|
return (r = (n = e.overflow) != null ? n : (o = p.value) == null ? void 0 : o.overflow) != null ? r : !1;
|
|
214
214
|
}), oe = d(() => N.value ? { display: "flex" } : {}), ne = d(() => {
|
|
215
215
|
var o, n, r;
|
|
216
|
-
const
|
|
217
|
-
name:
|
|
218
|
-
onAfterEnter:
|
|
216
|
+
const L = (r = (n = e.transition) != null ? n : (o = p.value) == null ? void 0 : o.transition) != null ? r : H, re = {
|
|
217
|
+
name: L,
|
|
218
|
+
onAfterEnter: x,
|
|
219
219
|
onBeforeLeave: O,
|
|
220
|
-
onAfterLeave:
|
|
220
|
+
onAfterLeave: B
|
|
221
221
|
};
|
|
222
|
-
if (
|
|
223
|
-
const c = { ...
|
|
224
|
-
|
|
222
|
+
if (we(L)) {
|
|
223
|
+
const c = { ...L }, M = (h, ie) => (V) => {
|
|
224
|
+
xe(h) ? h.forEach((U) => {
|
|
225
225
|
K(U) && U(V);
|
|
226
226
|
}) : K(h) && h(V), ie();
|
|
227
227
|
};
|
|
228
|
-
return c.onAfterEnter =
|
|
228
|
+
return c.onAfterEnter = M(c.onAfterEnter, x), c.onBeforeLeave = M(c.onBeforeLeave, O), c.onAfterLeave = M(c.onAfterLeave, B), c.name || (c.name = H), c;
|
|
229
229
|
}
|
|
230
230
|
return re;
|
|
231
231
|
});
|
|
232
|
-
function
|
|
232
|
+
function x() {
|
|
233
233
|
a("opened");
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function B() {
|
|
236
236
|
a("closed"), a(J, !1), e.destroyOnClose && (C.value = !1);
|
|
237
237
|
}
|
|
238
238
|
function O() {
|
|
@@ -254,7 +254,7 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
254
254
|
e.closeOnClickModal && T();
|
|
255
255
|
}
|
|
256
256
|
function j() {
|
|
257
|
-
|
|
257
|
+
q && (i.value = !0);
|
|
258
258
|
}
|
|
259
259
|
function A() {
|
|
260
260
|
i.value = !1;
|
|
@@ -273,21 +273,21 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
273
273
|
function ue() {
|
|
274
274
|
e.closeOnPressEscape && T();
|
|
275
275
|
}
|
|
276
|
-
return
|
|
276
|
+
return E(() => e.zIndex, () => {
|
|
277
277
|
var o;
|
|
278
|
-
|
|
279
|
-
}),
|
|
278
|
+
w.value = (o = e.zIndex) != null ? o : u();
|
|
279
|
+
}), E(() => e.modelValue, (o) => {
|
|
280
280
|
var n;
|
|
281
|
-
o ? (m.value = !1, z(), C.value = !0,
|
|
281
|
+
o ? (m.value = !1, z(), C.value = !0, w.value = (n = e.zIndex) != null ? n : u(), ge(() => {
|
|
282
282
|
a("open"), t.value && (t.value.parentElement.scrollTop = 0, t.value.parentElement.scrollLeft = 0, t.value.scrollTop = 0);
|
|
283
283
|
})) : i.value && I();
|
|
284
|
-
}),
|
|
284
|
+
}), E(() => e.fullscreen, (o) => {
|
|
285
285
|
t.value && (o ? (l = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = l);
|
|
286
286
|
}), be(() => {
|
|
287
287
|
e.modelValue && (i.value = !0, C.value = !0, z());
|
|
288
288
|
}), {
|
|
289
|
-
afterEnter:
|
|
290
|
-
afterLeave:
|
|
289
|
+
afterEnter: x,
|
|
290
|
+
afterLeave: B,
|
|
291
291
|
beforeLeave: O,
|
|
292
292
|
handleClose: T,
|
|
293
293
|
onModalClick: te,
|
|
@@ -304,7 +304,7 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
304
304
|
overlayDialogStyle: oe,
|
|
305
305
|
rendered: C,
|
|
306
306
|
visible: i,
|
|
307
|
-
zIndex:
|
|
307
|
+
zIndex: w,
|
|
308
308
|
transitionConfig: ne,
|
|
309
309
|
_draggable: R,
|
|
310
310
|
_alignCenter: N,
|
|
@@ -312,13 +312,13 @@ const Ge = Fe, He = Symbol("dialogInjectionKey"), G = "dialog-fade", Ne = D({
|
|
|
312
312
|
};
|
|
313
313
|
};
|
|
314
314
|
export {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
315
|
+
He as E,
|
|
316
|
+
Qe as a,
|
|
317
|
+
ze as b,
|
|
318
|
+
Me as c,
|
|
319
|
+
Je as d,
|
|
320
|
+
Ne as e,
|
|
321
|
+
qe as f,
|
|
322
|
+
Ze as g,
|
|
323
|
+
Xe as u
|
|
324
324
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),n=require("./base-ef747d02.cjs"),L=require("./vnode-b906ae6d.cjs"),V=require("./use-form-common-props-
|
|
1
|
+
"use strict";const t=require("vue"),n=require("./base-ef747d02.cjs"),L=require("./vnode-b906ae6d.cjs"),V=require("./use-form-common-props-00ec25ac.cjs"),P=require("./index-bf98dd03.cjs"),le=require("./scroll-b108dabd.cjs"),q=require("./index-9780a537.cjs"),ae=require("./use-global-config-28efb416.cjs"),$=e=>{if(!e)return{onClick:n.NOOP,onMousedown:n.NOOP,onMouseup:n.NOOP};let a=!1,i=!1;return{onClick:s=>{a&&i&&e(s),a=i=!1},onMousedown:s=>{a=s.target===s.currentTarget},onMouseup:s=>{i=s.target===s.currentTarget}}},se=n.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:n.definePropType([String,Array,Object])},zIndex:{type:n.definePropType([String,Number])}}),ue={click:e=>e instanceof MouseEvent},ie="overlay";var re=t.defineComponent({name:"ElOverlay",props:se,emits:ue,setup(e,{slots:a,emit:i}){const v=n.useNamespace(ie),u=m=>{i("click",m)},{onClick:r,onMousedown:s,onMouseup:y}=$(e.customMaskEvent?void 0:u);return()=>e.mask?t.createVNode("div",{class:[v.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:r,onMousedown:s,onMouseup:y},[t.renderSlot(a,"default")],L.PatchFlags.STYLE|L.PatchFlags.CLASS|L.PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):t.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[t.renderSlot(a,"default")])}});const ce=re,de=Symbol("dialogInjectionKey"),j="dialog-fade",K=n.buildProps({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:V.iconPropType},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),fe={close:()=>!0},ve=n.buildProps({...K,appendToBody:Boolean,appendTo:{type:P.teleportProps.to.type,default:"body"},beforeClose:{type:n.definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:n.definePropType([String,Object]),default:void 0}}),ye={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[P.UPDATE_MODEL_EVENT]:e=>n.isBoolean(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},U=(e,a={})=>{t.isRef(e)||P.throwError("[useLockscreen]","You need to pass a ref param to this function");const i=a.ns||n.useNamespace("popup"),v=t.computed(()=>i.bm("parent","hidden"));if(!n.isClient||n.hasClass(document.body,v.value))return;let u=0,r=!1,s="0";const y=()=>{setTimeout(()=>{typeof document>"u"||r&&document&&(document.body.style.width=s,n.removeClass(document.body,v.value))},200)};t.watch(e,m=>{if(!m){y();return}r=!n.hasClass(document.body,v.value),r&&(s=document.body.style.width,n.addClass(document.body,v.value)),u=le.getScrollBarWidth(i.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,g=n.getStyle(document.body,"overflowY");u>0&&(d||g==="scroll")&&r&&(document.body.style.width=`calc(100% - ${u}px)`)}),t.onScopeDispose(()=>y())},me=(e,a)=>{var i;const u=t.getCurrentInstance().emit,{nextZIndex:r}=V.useZIndex();let s="";const y=q.useId(),m=q.useId(),d=t.ref(!1),g=t.ref(!1),b=t.ref(!1),S=t.ref((i=e.zIndex)!=null?i:r());let p,C;const M=ae.useGlobalConfig(),Y=t.computed(()=>{var o,l;return(l=(o=M.value)==null?void 0:o.namespace)!=null?l:n.defaultNamespace}),h=t.computed(()=>{var o;return(o=M.value)==null?void 0:o.dialog}),G=t.computed(()=>{const o={},l=`--${Y.value}-dialog`;return e.fullscreen||(e.top&&(o[`${l}-margin-top`]=e.top),e.width&&(o[`${l}-width`]=n.addUnit(e.width))),o}),W=t.computed(()=>{var o,l,c;return((c=(l=e.draggable)!=null?l:(o=h.value)==null?void 0:o.draggable)!=null?c:!1)&&!e.fullscreen}),k=t.computed(()=>{var o,l,c;return(c=(l=e.alignCenter)!=null?l:(o=h.value)==null?void 0:o.alignCenter)!=null?c:!1}),H=t.computed(()=>{var o,l,c;return(c=(l=e.overflow)!=null?l:(o=h.value)==null?void 0:o.overflow)!=null?c:!1}),Z=t.computed(()=>k.value?{display:"flex"}:{}),J=t.computed(()=>{var o,l,c;const I=(c=(l=e.transition)!=null?l:(o=h.value)==null?void 0:o.transition)!=null?c:j,ne={name:I,onAfterEnter:O,onBeforeLeave:_,onAfterLeave:T};if(n.isObject(I)){const f={...I},A=(E,te)=>N=>{n.isArray(E)?E.forEach(z=>{n.isFunction(z)&&z(N)}):n.isFunction(E)&&E(N),te()};return f.onAfterEnter=A(f.onAfterEnter,O),f.onBeforeLeave=A(f.onBeforeLeave,_),f.onAfterLeave=A(f.onAfterLeave,T),f.name||(f.name=j),f}return ne});function O(){u("opened")}function T(){u("closed"),u(P.UPDATE_MODEL_EVENT,!1),e.destroyOnClose&&(b.value=!1)}function _(){u("close")}function D(){C==null||C(),p==null||p(),e.openDelay&&e.openDelay>0?{stop:p}=n.useTimeoutFn(()=>F(),e.openDelay):F()}function w(){p==null||p(),C==null||C(),e.closeDelay&&e.closeDelay>0?{stop:C}=n.useTimeoutFn(()=>B(),e.closeDelay):B()}function x(){function o(l){l||(g.value=!0,d.value=!1)}e.beforeClose?e.beforeClose(o):w()}function Q(){e.closeOnClickModal&&x()}function F(){n.isClient&&(d.value=!0)}function B(){d.value=!1}function X(){u("openAutoFocus")}function R(){u("closeAutoFocus")}function ee(o){var l;((l=o.detail)==null?void 0:l.focusReason)==="pointer"&&o.preventDefault()}e.lockScroll&&U(d);function oe(){e.closeOnPressEscape&&x()}return t.watch(()=>e.zIndex,()=>{var o;S.value=(o=e.zIndex)!=null?o:r()}),t.watch(()=>e.modelValue,o=>{var l;o?(g.value=!1,D(),b.value=!0,S.value=(l=e.zIndex)!=null?l:r(),t.nextTick(()=>{u("open"),a.value&&(a.value.parentElement.scrollTop=0,a.value.parentElement.scrollLeft=0,a.value.scrollTop=0)})):d.value&&w()}),t.watch(()=>e.fullscreen,o=>{a.value&&(o?(s=a.value.style.transform,a.value.style.transform=""):a.value.style.transform=s)}),t.onMounted(()=>{e.modelValue&&(d.value=!0,b.value=!0,D())}),{afterEnter:O,afterLeave:T,beforeLeave:_,handleClose:x,onModalClick:Q,close:w,doClose:B,onOpenAutoFocus:X,onCloseAutoFocus:R,onCloseRequested:oe,onFocusoutPrevented:ee,titleId:y,bodyId:m,closed:g,style:G,overlayDialogStyle:Z,rendered:b,visible:d,zIndex:S,transitionConfig:J,_draggable:W,_alignCenter:k,_overflow:H}};exports.ElOverlay=ce;exports.dialogContentEmits=fe;exports.dialogContentProps=K;exports.dialogEmits=ye;exports.dialogInjectionKey=de;exports.dialogProps=ve;exports.useDialog=me;exports.useLockscreen=U;exports.useSameTarget=$;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),c=require("./el-button-
|
|
1
|
+
"use strict";const e=require("vue"),c=require("./el-button-dd065de0.cjs"),y=require("./index-3792552a.cjs"),s=require("./el-popper-ce575c12.cjs"),r=require("./base-ef747d02.cjs"),P=require("./use-form-common-props-00ec25ac.cjs"),g=require("./index-bf98dd03.cjs"),N=require("./index-bb833443.cjs"),k=r.buildProps({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:c.buttonTypes,default:"primary"},cancelButtonType:{type:String,values:c.buttonTypes,default:"text"},icon:{type:P.iconPropType,default:()=>y.question_filled_default},iconColor:{type:String,default:"#f90"},hideIcon:Boolean,hideAfter:{type:Number,default:200},effect:{...s.useTooltipContentProps.effect,default:"light"},teleported:s.useTooltipContentProps.teleported,persistent:s.useTooltipContentProps.persistent,width:{type:[String,Number],default:150},closeOnPressEscape:{type:Boolean,default:!0}}),S={confirm:o=>o instanceof MouseEvent,cancel:o=>o instanceof MouseEvent||o instanceof KeyboardEvent},x=e.defineComponent({name:"ElPopconfirm"}),b=e.defineComponent({...x,props:k,emits:S,setup(o,{expose:B,emit:f}){const l=o,{t:d}=N.useLocale(),n=r.useNamespace("popconfirm"),i=e.ref(),C=e.computed(()=>{var t;return(t=e.unref(i))==null?void 0:t.popperRef}),p=()=>{var t,u;(u=(t=i.value)==null?void 0:t.onClose)==null||u.call(t)},T=e.computed(()=>({width:r.addUnit(l.width)})),m=t=>{f("confirm",t),p()},a=t=>{f("cancel",t),p()},v=t=>{l.closeOnPressEscape&&a(t)},h=e.computed(()=>l.confirmButtonText||d("el.popconfirm.confirmButtonText")),E=e.computed(()=>l.cancelButtonText||d("el.popconfirm.cancelButtonText"));return B({popperRef:C,hide:p}),(t,u)=>(e.openBlock(),e.createBlock(e.unref(s.ElTooltip),e.mergeProps({ref_key:"tooltipRef",ref:i,trigger:"click",effect:t.effect},t.$attrs,{"popper-class":`${e.unref(n).namespace.value}-popover`,"popper-style":e.unref(T),teleported:t.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":t.hideAfter,persistent:t.persistent}),{content:e.withCtx(()=>[e.createVNode(e.unref(g.ElFocusTrap),{loop:"",trapped:"",onReleaseRequested:v},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("main"))},[!t.hideIcon&&t.icon?(e.openBlock(),e.createBlock(e.unref(y.ElIcon),{key:0,class:e.normalizeClass(e.unref(n).e("icon")),style:e.normalizeStyle({color:t.iconColor})},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))]),_:1},8,["class","style"])):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(t.title),1)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("action"))},[e.renderSlot(t.$slots,"actions",{confirm:m,cancel:a},()=>[e.createVNode(e.unref(c.ElButton),{size:"small",type:t.cancelButtonType==="text"?"":t.cancelButtonType,text:t.cancelButtonType==="text",onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(E)),1)]),_:1},8,["type","text"]),e.createVNode(e.unref(c.ElButton),{size:"small",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)),1)]),_:1},8,["type","text"])])],2)],2)]),_:3})]),default:e.withCtx(()=>[t.$slots.reference?e.renderSlot(t.$slots,"reference",{key:0}):e.createCommentVNode("v-if",!0)]),_:3},16,["effect","popper-class","popper-style","teleported","hide-after","persistent"]))}});var q=r._export_sfc(b,[["__file","popconfirm.vue"]]);const V=r.withInstall(q);exports.ElPopconfirm=V;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as k, ref as z, computed as l, unref as t, openBlock as u, createBlock as m, mergeProps as I, withCtx as n, createVNode as d, createElementVNode as y, normalizeClass as p, normalizeStyle as V, resolveDynamicComponent as x, createCommentVNode as g, createTextVNode as T, toDisplayString as v, renderSlot as P } from "vue";
|
|
2
|
-
import { b, E as S } from "./el-button-
|
|
3
|
-
import { q as A, E as D } from "./index-
|
|
4
|
-
import { u as B, E as M } from "./el-popper-
|
|
5
|
-
import { b as O, u as
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
8
|
-
import { u as H } from "./index-
|
|
2
|
+
import { b, E as S } from "./el-button-4f201000.js";
|
|
3
|
+
import { q as A, E as D } from "./index-ca91ac68.js";
|
|
4
|
+
import { u as B, E as M } from "./el-popper-db6c599f.js";
|
|
5
|
+
import { b as O, u as F, n as K, _ as L, w as U } from "./base-29f73b05.js";
|
|
6
|
+
import { i as j } from "./use-form-common-props-c14990b9.js";
|
|
7
|
+
import { c as G } from "./index-1955f23d.js";
|
|
8
|
+
import { u as H } from "./index-de24705f.js";
|
|
9
9
|
const J = O({
|
|
10
10
|
title: String,
|
|
11
11
|
confirmButtonText: String,
|
|
@@ -21,7 +21,7 @@ const J = O({
|
|
|
21
21
|
default: "text"
|
|
22
22
|
},
|
|
23
23
|
icon: {
|
|
24
|
-
type:
|
|
24
|
+
type: j,
|
|
25
25
|
default: () => A
|
|
26
26
|
},
|
|
27
27
|
iconColor: {
|
|
@@ -57,14 +57,14 @@ const J = O({
|
|
|
57
57
|
props: J,
|
|
58
58
|
emits: Q,
|
|
59
59
|
setup(o, { expose: N, emit: E }) {
|
|
60
|
-
const s = o, { t: h } = H(), r =
|
|
60
|
+
const s = o, { t: h } = H(), r = F("popconfirm"), i = z(), R = l(() => {
|
|
61
61
|
var e;
|
|
62
62
|
return (e = t(i)) == null ? void 0 : e.popperRef;
|
|
63
63
|
}), a = () => {
|
|
64
64
|
var e, f;
|
|
65
65
|
(f = (e = i.value) == null ? void 0 : e.onClose) == null || f.call(e);
|
|
66
66
|
}, w = l(() => ({
|
|
67
|
-
width:
|
|
67
|
+
width: K(s.width)
|
|
68
68
|
})), C = (e) => {
|
|
69
69
|
E("confirm", e), a();
|
|
70
70
|
}, c = (e) => {
|
|
@@ -156,8 +156,8 @@ const J = O({
|
|
|
156
156
|
}, 16, ["effect", "popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
|
-
var Y = /* @__PURE__ */
|
|
160
|
-
const pe =
|
|
159
|
+
var Y = /* @__PURE__ */ L(X, [["__file", "popconfirm.vue"]]);
|
|
160
|
+
const pe = U(Y);
|
|
161
161
|
export {
|
|
162
162
|
pe as E
|
|
163
163
|
};
|