st-comp 0.0.146 → 0.0.147
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/components.d.ts +0 -3
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +22 -26
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +103 -112
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +1426 -671
- package/es/KlineNew.cjs +3 -1
- package/es/KlineNew.js +2736 -314
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +96 -102
- package/es/Table.cjs +1 -1
- package/es/Table.js +60 -66
- package/es/User.cjs +1 -1
- package/es/User.js +96 -103
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +32 -41
- package/es/VirtualTable.cjs +1 -13
- package/es/VirtualTable.js +1 -2801
- package/es/_initCloneObject-7493ecd5.cjs +1 -0
- package/es/{_initCloneObject-14b53c6f.js → _initCloneObject-a8dcd058.js} +26 -26
- package/es/{base-ec05f348.cjs → base-00ce90ec.cjs} +3 -3
- package/es/{base-437d17f3.js → base-674a354a.js} +63 -64
- package/es/config-provider-419ffbf2.js +120 -0
- package/es/config-provider-68414290.cjs +3 -0
- package/es/dropdown-127a8c0d.cjs +1 -0
- package/es/{dropdown-634b5e27.js → dropdown-ce30ada6.js} +30 -31
- package/es/el-button-7b9f5933.js +745 -0
- package/es/el-button-c00975e1.cjs +1 -0
- package/es/{el-checkbox-group-e8fece80.js → el-checkbox-group-0554b352.js} +10 -10
- package/es/el-checkbox-group-7a313d34.cjs +1 -0
- package/es/{el-empty-bacc6613.js → el-empty-39b3aed7.js} +5 -5
- package/es/{el-empty-19ea04f4.cjs → el-empty-87154b6d.cjs} +1 -1
- package/es/el-form-item-7867f64d.cjs +12 -0
- package/es/{el-form-item-af1855f0.js → el-form-item-fc6f80ab.js} +78 -79
- package/es/el-input-2ff1628c.cjs +1 -0
- package/es/{el-input-4961b99f.js → el-input-d249ac86.js} +82 -84
- package/es/{el-input-number-610fc8ba.js → el-input-number-2066fbb7.js} +35 -36
- package/es/el-input-number-d6801a5c.cjs +1 -0
- package/es/{el-message-c3b3ac96.js → el-message-9859835d.js} +79 -81
- package/es/el-message-ffcf690c.cjs +1 -0
- package/es/el-overlay-91784be2.cjs +1 -0
- package/es/el-overlay-f0757cc4.js +525 -0
- package/es/el-popover-4db657e2.cjs +1 -0
- package/es/{el-popover-0aa071f2.js → el-popover-b7b43c1f.js} +18 -18
- package/es/el-scrollbar-35bac6b3.js +2452 -0
- package/es/el-scrollbar-ec09bbd3.cjs +1 -0
- package/es/el-select-0785c35a.cjs +1 -0
- package/es/{el-select-9381b156.js → el-select-bcbb7e55.js} +329 -333
- package/es/el-table-column-2478adf8.cjs +14 -0
- package/es/{el-table-column-55bffba5.js → el-table-column-c1e1a206.js} +346 -350
- package/es/el-tag-13ee17b3.cjs +1 -0
- package/es/el-tag-73372c6c.js +359 -0
- package/es/index-07b61d12.cjs +1 -0
- package/es/{index-39ec9741.js → index-45de4a12.js} +7 -7
- package/es/index-65b719a4.cjs +1 -0
- package/es/index-8b5fbc11.js +66 -0
- package/es/index-8c85d7c5.js +858 -0
- package/es/index-a49f4743.cjs +2 -0
- package/es/{scroll-387fcfdb.js → scroll-cb696ed2.js} +1 -1
- package/es/{scroll-41224831.cjs → scroll-cca17da0.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/{zh-cn-ab9a583d.cjs → zh-cn-37af467d.cjs} +1 -1
- package/es/{zh-cn-eb9c2820.js → zh-cn-ef7d7220.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +206 -206
- package/lib/{index-9b8ff62a.js → index-24f8572c.js} +31450 -33319
- package/lib/{python-a9c3d9e5.js → python-2143eee4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineSub/index.vue +17 -3
- package/packages/KlineBasic/index.vue +2 -1
- package/packages/KlineBasic/utils.js +20 -2
- package/packages/index.ts +0 -2
- package/src/pages/KlineBasic/api.js +1 -1
- package/src/router/routes.ts +0 -5
- package/es/Kline.cjs +0 -1
- package/es/Kline.js +0 -1901
- package/es/_initCloneObject-441db749.cjs +0 -1
- package/es/castArray-4251bbe4.js +0 -10
- package/es/castArray-a45823fe.cjs +0 -1
- package/es/config-provider-55482a43.js +0 -47
- package/es/config-provider-7cdfca4d.cjs +0 -1
- package/es/debounce-ac30be50.js +0 -83
- package/es/debounce-b2ff12bd.cjs +0 -1
- package/es/dropdown-d7c59a21.cjs +0 -1
- package/es/el-button-196807af.cjs +0 -1
- package/es/el-button-e1665717.js +0 -235
- package/es/el-checkbox-group-492b95cc.cjs +0 -1
- package/es/el-form-item-5bdffd07.cjs +0 -12
- package/es/el-input-23e2bac3.cjs +0 -1
- package/es/el-input-number-40a81eb5.cjs +0 -1
- package/es/el-menu-item-78b858f2.cjs +0 -1
- package/es/el-menu-item-7d04c11a.js +0 -771
- package/es/el-message-d4df8136.cjs +0 -1
- package/es/el-overlay-12dd9b35.js +0 -519
- package/es/el-overlay-bc0790a2.cjs +0 -1
- package/es/el-popover-8a77e015.cjs +0 -1
- package/es/el-popper-50100766.js +0 -2262
- package/es/el-popper-746070ba.cjs +0 -1
- package/es/el-scrollbar-562d0595.js +0 -201
- package/es/el-scrollbar-d1c3e7f7.cjs +0 -1
- package/es/el-select-b162dffc.cjs +0 -1
- package/es/el-table-column-6d761fce.cjs +0 -14
- package/es/el-tag-985d9aff.js +0 -279
- package/es/el-tag-c51a6490.cjs +0 -1
- package/es/index-09e01b1d.js +0 -81
- package/es/index-0cb48e01.js +0 -306
- package/es/index-3bf8d597.cjs +0 -1
- package/es/index-657047bb.js +0 -513
- package/es/index-8a0b1c53.cjs +0 -3
- package/es/index-a387515d.cjs +0 -1
- package/es/index-a902a0d9.js +0 -59
- package/es/index-deb8de52.cjs +0 -1
- package/es/index-eea0bcb3.cjs +0 -1
- package/es/index.esm-8d9a2abe.js +0 -2432
- package/es/index.esm-94a95a2a.cjs +0 -3
- package/es/raf-8fc301fd.cjs +0 -1
- package/es/raf-b128c7b7.js +0 -6
- package/es/typescript-7ae59c4c.js +0 -4
- package/es/typescript-b63f8e83.cjs +0 -1
- package/es/use-form-common-props-1b84d8f4.cjs +0 -2
- package/es/use-form-common-props-f377e500.js +0 -587
- package/es/vnode-7dfd4ed5.js +0 -14
- package/es/vnode-7fbc61e1.cjs +0 -1
- package/packages/Kline/components/Contextmenu/index.vue +0 -110
- package/packages/Kline/components/Tips/index.vue +0 -40
- package/packages/Kline/componentsNew/KlineSlide/index.vue +0 -155
- package/packages/Kline/componentsNew/KlineSub/index.vue +0 -297
- package/packages/Kline/componentsNew/KlineTips/index.vue +0 -66
- package/packages/Kline/componentsNew/KlineUtils/index.vue +0 -84
- package/packages/Kline/componentsNew/Tips/index.vue +0 -33
- package/packages/Kline/formatKlineData.ts +0 -109
- package/packages/Kline/images/buy.svg +0 -1
- package/packages/Kline/images/pen.png +0 -0
- package/packages/Kline/images/sell.svg +0 -1
- package/packages/Kline/images/t.svg +0 -1
- package/packages/Kline/index.ts +0 -16
- package/packages/Kline/index.vue +0 -891
- package/packages/Kline/option.ts +0 -539
- package/packages/Kline/type.d.ts +0 -219
- package/packages/Kline/utils.ts +0 -682
- package/src/pages/Kline/api.ts +0 -127
- package/src/pages/Kline/components/MultiCycleSingleVariety.vue +0 -701
- package/src/pages/Kline/components/SingleCycleSingleVariety.vue +0 -924
- package/src/pages/Kline/index.vue +0 -90
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),k=require("./el-scrollbar-d1c3e7f7.cjs"),o=require("./base-ec05f348.cjs"),v=require("./use-form-common-props-1b84d8f4.cjs"),L=require("./typescript-b63f8e83.cjs"),_=require("./index-8a0b1c53.cjs"),D=require("./index-3bf8d597.cjs"),p=require("./config-provider-7cdfca4d.cjs"),O=o.buildProps({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:o.definePropType([String,Object,Array])},offset:{type:o.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),P=e.defineComponent({name:"ElBadge"}),F=e.defineComponent({...P,props:O,setup(s,{expose:t}){const n=s,a=o.useNamespace("badge"),r=e.computed(()=>n.isDot?"":o.isNumber(n.value)&&o.isNumber(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),f=e.computed(()=>{var l,c,m,g,y;return[{backgroundColor:n.color,marginRight:o.addUnit(-((c=(l=n.offset)==null?void 0:l[0])!=null?c:0)),marginTop:o.addUnit((g=(m=n.offset)==null?void 0:m[1])!=null?g:0)},(y=n.badgeStyle)!=null?y:{}]});return t({content:r}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).b())},[e.renderSlot(l.$slots,"default"),e.createVNode(e.Transition,{name:`${e.unref(a).namespace.value}-zoom-in-center`,persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("sup",{class:e.normalizeClass([e.unref(a).e("content"),e.unref(a).em("content",l.type),e.unref(a).is("fixed",!!l.$slots.default),e.unref(a).is("dot",l.isDot),e.unref(a).is("hide-zero",!l.showZero&&n.value===0),l.badgeClass]),style:e.normalizeStyle(e.unref(f))},[e.renderSlot(l.$slots,"content",{value:e.unref(r)},()=>[e.createTextVNode(e.toDisplayString(e.unref(r)),1)])],6),[[e.vShow,!l.hidden&&(e.unref(r)||l.isDot||l.$slots.content)]])]),_:3},8,["name"])],2))}});var q=o._export_sfc(F,[["__file","badge.vue"]]);const H=o.withInstall(q),w=["success","info","warning","error"],u=L.mutable({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:o.isClient?document.body:void 0}),A=o.buildProps({customClass:{type:String,default:u.customClass},center:{type:Boolean,default:u.center},dangerouslyUseHTMLString:{type:Boolean,default:u.dangerouslyUseHTMLString},duration:{type:Number,default:u.duration},icon:{type:v.iconPropType,default:u.icon},id:{type:String,default:u.id},message:{type:o.definePropType([String,Object,Function]),default:u.message},onClose:{type:o.definePropType(Function),default:u.onClose},showClose:{type:Boolean,default:u.showClose},type:{type:String,values:w,default:u.type},plain:{type:Boolean,default:u.plain},offset:{type:Number,default:u.offset},zIndex:{type:Number,default:u.zIndex},grouping:{type:Boolean,default:u.grouping},repeatNum:{type:Number,default:u.repeatNum}}),R={destroy:()=>!0},d=e.shallowReactive([]),U=s=>{const t=d.findIndex(r=>r.id===s),n=d[t];let a;return t>0&&(a=d[t-1]),{current:n,prev:a}},Z=s=>{const{prev:t}=U(s);return t?t.vm.exposed.bottom.value:0},j=(s,t)=>d.findIndex(a=>a.id===s)>0?16:t,G=e.defineComponent({name:"ElMessage"}),W=e.defineComponent({...G,props:A,emits:R,setup(s,{expose:t}){const n=s,{Close:a}=v.TypeComponents,{ns:r,zIndex:f}=_.useGlobalComponentSettings("message"),{currentZIndex:l,nextZIndex:c}=f,m=e.ref(),g=e.ref(!1),y=e.ref(0);let b;const z=e.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),M=e.computed(()=>{const i=n.type;return{[r.bm("icon",i)]:i&&v.TypeComponentsMap[i]}}),T=e.computed(()=>n.icon||v.TypeComponentsMap[n.type]||""),$=e.computed(()=>Z(n.id)),N=e.computed(()=>j(n.id,n.offset)+$.value),I=e.computed(()=>y.value+N.value),V=e.computed(()=>({top:`${N.value}px`,zIndex:l.value}));function B(){n.duration!==0&&({stop:b}=o.useTimeoutFn(()=>{h()},n.duration))}function S(){b==null||b()}function h(){g.value=!1}function x({code:i}){i===D.EVENT_CODE.esc&&h()}return e.onMounted(()=>{B(),c(),g.value=!0}),e.watch(()=>n.repeatNum,()=>{S(),B()}),k.useEventListener(document,"keydown",x),k.useResizeObserver(m,()=>{y.value=m.value.getBoundingClientRect().height}),t({visible:g,bottom:I,close:h}),(i,ne)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(r).b("fade"),onBeforeLeave:i.onClose,onAfterLeave:oe=>i.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:i.id,ref_key:"messageRef",ref:m,class:e.normalizeClass([e.unref(r).b(),{[e.unref(r).m(i.type)]:i.type},e.unref(r).is("center",i.center),e.unref(r).is("closable",i.showClose),e.unref(r).is("plain",i.plain),i.customClass]),style:e.normalizeStyle(e.unref(V)),role:"alert",onMouseenter:S,onMouseleave:B},[i.repeatNum>1?(e.openBlock(),e.createBlock(e.unref(H),{key:0,value:i.repeatNum,type:e.unref(z),class:e.normalizeClass(e.unref(r).e("badge"))},null,8,["value","type","class"])):e.createCommentVNode("v-if",!0),e.unref(T)?(e.openBlock(),e.createBlock(e.unref(v.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(M)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(T))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.renderSlot(i.$slots,"default",{},()=>[i.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),e.createElementVNode("p",{class:e.normalizeClass(e.unref(r).e("content")),innerHTML:i.message},null,10,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(r).e("content"))},e.toDisplayString(i.message),3))]),i.showClose?(e.openBlock(),e.createBlock(e.unref(v.ElIcon),{key:2,class:e.normalizeClass(e.unref(r).e("closeBtn")),onClick:e.withModifiers(h,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(a))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],46,["id"]),[[e.vShow,g.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var J=o._export_sfc(W,[["__file","message.vue"]]);let K=1;const E=s=>{const t=!s||o.isString(s)||e.isVNode(s)||o.isFunction(s)?{message:s}:s,n={...u,...t};if(!n.appendTo)n.appendTo=document.body;else if(o.isString(n.appendTo)){let a=document.querySelector(n.appendTo);o.isElement(a)||(o.debugWarn("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body),n.appendTo=a}return o.isBoolean(p.messageConfig.grouping)&&!n.grouping&&(n.grouping=p.messageConfig.grouping),o.isNumber(p.messageConfig.duration)&&n.duration===3e3&&(n.duration=p.messageConfig.duration),o.isNumber(p.messageConfig.offset)&&n.offset===16&&(n.offset=p.messageConfig.offset),o.isBoolean(p.messageConfig.showClose)&&!n.showClose&&(n.showClose=p.messageConfig.showClose),n},Q=s=>{const t=d.indexOf(s);if(t===-1)return;d.splice(t,1);const{handler:n}=s;n.close()},X=({appendTo:s,...t},n)=>{const a=`message_${K++}`,r=t.onClose,f=document.createElement("div"),l={...t,id:a,onClose:()=>{r==null||r(),Q(y)},onDestroy:()=>{e.render(null,f)}},c=e.createVNode(J,l,o.isFunction(l.message)||e.isVNode(l.message)?{default:o.isFunction(l.message)?l.message:()=>l.message}:null);c.appContext=n||C._context,e.render(c,f),s.appendChild(f.firstElementChild);const m=c.component,y={id:a,vnode:c,vm:m,handler:{close:()=>{m.exposed.visible.value=!1}},props:c.component.props};return y},C=(s={},t)=>{if(!o.isClient)return{close:()=>{}};const n=E(s);if(n.grouping&&d.length){const r=d.find(({vnode:f})=>{var l;return((l=f.props)==null?void 0:l.message)===n.message});if(r)return r.props.repeatNum+=1,r.props.type=n.type,r.handler}if(o.isNumber(p.messageConfig.max)&&d.length>=p.messageConfig.max)return{close:()=>{}};const a=X(n,t);return d.push(a),a.handler};w.forEach(s=>{C[s]=(t={},n)=>{const a=E(t);return C({...a,type:s},n)}});function Y(s){for(const t of d)(!s||s===t.props.type)&&t.handler.close()}C.closeAll=Y;C._context=null;const ee=o.withInstallFunction(C,"$message");exports.ElMessage=ee;
|
|
@@ -1,519 +0,0 @@
|
|
|
1
|
-
import { defineComponent as U, createVNode as R, renderSlot as b, h as de, onMounted as te, watchEffect as fe, onBeforeUnmount as me, inject as Q, computed as k, openBlock as z, createElementBlock as j, unref as o, normalizeClass as E, normalizeStyle as le, createElementVNode as V, toDisplayString as ve, withCtx as w, createBlock as W, resolveDynamicComponent as ye, createCommentVNode as q, isRef as pe, watch as J, onScopeDispose as ge, getCurrentInstance as Ce, ref as A, nextTick as be, useSlots as he, provide as Ee, Transition as we, withDirectives as ke, mergeProps as Se, createSlots as Me, vShow as Te } from "vue";
|
|
2
|
-
import { U as H, b as G, d as X, u as _, y as Z, h as Be, x as De, _ as ne, c as Ie, t as Le, j as se, o as x, n as Pe, A as Ae, r as Fe, e as ee, V as Oe, p as oe, w as $e } from "./base-437d17f3.js";
|
|
3
|
-
import { P as K } from "./vnode-7dfd4ed5.js";
|
|
4
|
-
import { F as ze, U as ae, i as Ne, b as Ye, a as Re } from "./index-0cb48e01.js";
|
|
5
|
-
import { j as Ue, E as Ve, J as Xe, K as je } from "./use-form-common-props-f377e500.js";
|
|
6
|
-
import { g as He } from "./scroll-387fcfdb.js";
|
|
7
|
-
import { b as Ke, a as We } from "./index-09e01b1d.js";
|
|
8
|
-
const re = (e) => {
|
|
9
|
-
if (!e)
|
|
10
|
-
return { onClick: H, onMousedown: H, onMouseup: H };
|
|
11
|
-
let l = !1, n = !1;
|
|
12
|
-
return { onClick: (r) => {
|
|
13
|
-
l && n && e(r), l = n = !1;
|
|
14
|
-
}, onMousedown: (r) => {
|
|
15
|
-
l = r.target === r.currentTarget;
|
|
16
|
-
}, onMouseup: (r) => {
|
|
17
|
-
n = r.target === r.currentTarget;
|
|
18
|
-
} };
|
|
19
|
-
}, qe = G({
|
|
20
|
-
mask: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: !0
|
|
23
|
-
},
|
|
24
|
-
customMaskEvent: Boolean,
|
|
25
|
-
overlayClass: {
|
|
26
|
-
type: X([
|
|
27
|
-
String,
|
|
28
|
-
Array,
|
|
29
|
-
Object
|
|
30
|
-
])
|
|
31
|
-
},
|
|
32
|
-
zIndex: {
|
|
33
|
-
type: X([String, Number])
|
|
34
|
-
}
|
|
35
|
-
}), Je = {
|
|
36
|
-
click: (e) => e instanceof MouseEvent
|
|
37
|
-
}, Ze = "overlay";
|
|
38
|
-
var Ge = U({
|
|
39
|
-
name: "ElOverlay",
|
|
40
|
-
props: qe,
|
|
41
|
-
emits: Je,
|
|
42
|
-
setup(e, { slots: l, emit: n }) {
|
|
43
|
-
const d = _(Ze), s = (a) => {
|
|
44
|
-
n("click", a);
|
|
45
|
-
}, { onClick: u, onMousedown: r, onMouseup: f } = re(e.customMaskEvent ? void 0 : s);
|
|
46
|
-
return () => e.mask ? R("div", {
|
|
47
|
-
class: [d.b(), e.overlayClass],
|
|
48
|
-
style: {
|
|
49
|
-
zIndex: e.zIndex
|
|
50
|
-
},
|
|
51
|
-
onClick: u,
|
|
52
|
-
onMousedown: r,
|
|
53
|
-
onMouseup: f
|
|
54
|
-
}, [b(l, "default")], K.STYLE | K.CLASS | K.PROPS, ["onClick", "onMouseup", "onMousedown"]) : de("div", {
|
|
55
|
-
class: e.overlayClass,
|
|
56
|
-
style: {
|
|
57
|
-
zIndex: e.zIndex,
|
|
58
|
-
position: "fixed",
|
|
59
|
-
top: "0px",
|
|
60
|
-
right: "0px",
|
|
61
|
-
bottom: "0px",
|
|
62
|
-
left: "0px"
|
|
63
|
-
}
|
|
64
|
-
}, [b(l, "default")]);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
const _e = Ge, ie = Symbol("dialogInjectionKey"), ue = G({
|
|
68
|
-
center: Boolean,
|
|
69
|
-
alignCenter: Boolean,
|
|
70
|
-
closeIcon: {
|
|
71
|
-
type: Ue
|
|
72
|
-
},
|
|
73
|
-
draggable: Boolean,
|
|
74
|
-
overflow: Boolean,
|
|
75
|
-
fullscreen: Boolean,
|
|
76
|
-
headerClass: String,
|
|
77
|
-
bodyClass: String,
|
|
78
|
-
footerClass: String,
|
|
79
|
-
showClose: {
|
|
80
|
-
type: Boolean,
|
|
81
|
-
default: !0
|
|
82
|
-
},
|
|
83
|
-
title: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: ""
|
|
86
|
-
},
|
|
87
|
-
ariaLevel: {
|
|
88
|
-
type: String,
|
|
89
|
-
default: "2"
|
|
90
|
-
}
|
|
91
|
-
}), Qe = {
|
|
92
|
-
close: () => !0
|
|
93
|
-
}, xe = (e, l, n, d) => {
|
|
94
|
-
let s = {
|
|
95
|
-
offsetX: 0,
|
|
96
|
-
offsetY: 0
|
|
97
|
-
};
|
|
98
|
-
const u = (c) => {
|
|
99
|
-
const y = c.clientX, C = c.clientY, { offsetX: g, offsetY: m } = s, v = e.value.getBoundingClientRect(), h = v.left, i = v.top, F = v.width, S = v.height, N = document.documentElement.clientWidth, Y = document.documentElement.clientHeight, O = -h + g, M = -i + m, T = N - h - F + g, B = Y - i - S + m, D = (t) => {
|
|
100
|
-
let L = g + t.clientX - y, $ = m + t.clientY - C;
|
|
101
|
-
d != null && d.value || (L = Math.min(Math.max(L, O), T), $ = Math.min(Math.max($, M), B)), s = {
|
|
102
|
-
offsetX: L,
|
|
103
|
-
offsetY: $
|
|
104
|
-
}, e.value && (e.value.style.transform = `translate(${Z(L)}, ${Z($)})`);
|
|
105
|
-
}, I = () => {
|
|
106
|
-
document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", I);
|
|
107
|
-
};
|
|
108
|
-
document.addEventListener("mousemove", D), document.addEventListener("mouseup", I);
|
|
109
|
-
}, r = () => {
|
|
110
|
-
l.value && e.value && l.value.addEventListener("mousedown", u);
|
|
111
|
-
}, f = () => {
|
|
112
|
-
l.value && e.value && l.value.removeEventListener("mousedown", u);
|
|
113
|
-
}, a = () => {
|
|
114
|
-
s = {
|
|
115
|
-
offsetX: 0,
|
|
116
|
-
offsetY: 0
|
|
117
|
-
}, e.value && (e.value.style.transform = "none");
|
|
118
|
-
};
|
|
119
|
-
return te(() => {
|
|
120
|
-
fe(() => {
|
|
121
|
-
n.value ? r() : f();
|
|
122
|
-
});
|
|
123
|
-
}), me(() => {
|
|
124
|
-
f();
|
|
125
|
-
}), {
|
|
126
|
-
resetPosition: a
|
|
127
|
-
};
|
|
128
|
-
}, eo = (...e) => (l) => {
|
|
129
|
-
e.forEach((n) => {
|
|
130
|
-
Be(n) ? n(l) : n.value = l;
|
|
131
|
-
});
|
|
132
|
-
}, oo = U({ name: "ElDialogContent" }), to = /* @__PURE__ */ U({
|
|
133
|
-
...oo,
|
|
134
|
-
props: ue,
|
|
135
|
-
emits: Qe,
|
|
136
|
-
setup(e, { expose: l }) {
|
|
137
|
-
const n = e, { t: d } = De(), { Close: s } = Xe, { dialogRef: u, headerRef: r, bodyId: f, ns: a, style: c } = Q(ie), { focusTrapRef: y } = Q(ze), C = k(() => [
|
|
138
|
-
a.b(),
|
|
139
|
-
a.is("fullscreen", n.fullscreen),
|
|
140
|
-
a.is("draggable", n.draggable),
|
|
141
|
-
a.is("align-center", n.alignCenter),
|
|
142
|
-
{ [a.m("center")]: n.center }
|
|
143
|
-
]), g = eo(y, u), m = k(() => n.draggable), v = k(() => n.overflow), { resetPosition: h } = xe(u, r, m, v);
|
|
144
|
-
return l({
|
|
145
|
-
resetPosition: h
|
|
146
|
-
}), (i, F) => (z(), j("div", {
|
|
147
|
-
ref: o(g),
|
|
148
|
-
class: E(o(C)),
|
|
149
|
-
style: le(o(c)),
|
|
150
|
-
tabindex: "-1"
|
|
151
|
-
}, [
|
|
152
|
-
V("header", {
|
|
153
|
-
ref_key: "headerRef",
|
|
154
|
-
ref: r,
|
|
155
|
-
class: E([o(a).e("header"), i.headerClass, { "show-close": i.showClose }])
|
|
156
|
-
}, [
|
|
157
|
-
b(i.$slots, "header", {}, () => [
|
|
158
|
-
V("span", {
|
|
159
|
-
role: "heading",
|
|
160
|
-
"aria-level": i.ariaLevel,
|
|
161
|
-
class: E(o(a).e("title"))
|
|
162
|
-
}, ve(i.title), 11, ["aria-level"])
|
|
163
|
-
]),
|
|
164
|
-
i.showClose ? (z(), j("button", {
|
|
165
|
-
key: 0,
|
|
166
|
-
"aria-label": o(d)("el.dialog.close"),
|
|
167
|
-
class: E(o(a).e("headerbtn")),
|
|
168
|
-
type: "button",
|
|
169
|
-
onClick: (S) => i.$emit("close")
|
|
170
|
-
}, [
|
|
171
|
-
R(o(Ve), {
|
|
172
|
-
class: E(o(a).e("close"))
|
|
173
|
-
}, {
|
|
174
|
-
default: w(() => [
|
|
175
|
-
(z(), W(ye(i.closeIcon || o(s))))
|
|
176
|
-
]),
|
|
177
|
-
_: 1
|
|
178
|
-
}, 8, ["class"])
|
|
179
|
-
], 10, ["aria-label", "onClick"])) : q("v-if", !0)
|
|
180
|
-
], 2),
|
|
181
|
-
V("div", {
|
|
182
|
-
id: o(f),
|
|
183
|
-
class: E([o(a).e("body"), i.bodyClass])
|
|
184
|
-
}, [
|
|
185
|
-
b(i.$slots, "default")
|
|
186
|
-
], 10, ["id"]),
|
|
187
|
-
i.$slots.footer ? (z(), j("footer", {
|
|
188
|
-
key: 0,
|
|
189
|
-
class: E([o(a).e("footer"), i.footerClass])
|
|
190
|
-
}, [
|
|
191
|
-
b(i.$slots, "footer")
|
|
192
|
-
], 2)) : q("v-if", !0)
|
|
193
|
-
], 6));
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
var lo = /* @__PURE__ */ ne(to, [["__file", "dialog-content.vue"]]);
|
|
197
|
-
const no = G({
|
|
198
|
-
...ue,
|
|
199
|
-
appendToBody: Boolean,
|
|
200
|
-
appendTo: {
|
|
201
|
-
type: X([String, Object]),
|
|
202
|
-
default: "body"
|
|
203
|
-
},
|
|
204
|
-
beforeClose: {
|
|
205
|
-
type: X(Function)
|
|
206
|
-
},
|
|
207
|
-
destroyOnClose: Boolean,
|
|
208
|
-
closeOnClickModal: {
|
|
209
|
-
type: Boolean,
|
|
210
|
-
default: !0
|
|
211
|
-
},
|
|
212
|
-
closeOnPressEscape: {
|
|
213
|
-
type: Boolean,
|
|
214
|
-
default: !0
|
|
215
|
-
},
|
|
216
|
-
lockScroll: {
|
|
217
|
-
type: Boolean,
|
|
218
|
-
default: !0
|
|
219
|
-
},
|
|
220
|
-
modal: {
|
|
221
|
-
type: Boolean,
|
|
222
|
-
default: !0
|
|
223
|
-
},
|
|
224
|
-
openDelay: {
|
|
225
|
-
type: Number,
|
|
226
|
-
default: 0
|
|
227
|
-
},
|
|
228
|
-
closeDelay: {
|
|
229
|
-
type: Number,
|
|
230
|
-
default: 0
|
|
231
|
-
},
|
|
232
|
-
top: {
|
|
233
|
-
type: String
|
|
234
|
-
},
|
|
235
|
-
modelValue: Boolean,
|
|
236
|
-
modalClass: String,
|
|
237
|
-
headerClass: String,
|
|
238
|
-
bodyClass: String,
|
|
239
|
-
footerClass: String,
|
|
240
|
-
width: {
|
|
241
|
-
type: [String, Number]
|
|
242
|
-
},
|
|
243
|
-
zIndex: {
|
|
244
|
-
type: Number
|
|
245
|
-
},
|
|
246
|
-
trapFocus: Boolean,
|
|
247
|
-
headerAriaLevel: {
|
|
248
|
-
type: String,
|
|
249
|
-
default: "2"
|
|
250
|
-
}
|
|
251
|
-
}), so = {
|
|
252
|
-
open: () => !0,
|
|
253
|
-
opened: () => !0,
|
|
254
|
-
close: () => !0,
|
|
255
|
-
closed: () => !0,
|
|
256
|
-
[ae]: (e) => Ie(e),
|
|
257
|
-
openAutoFocus: () => !0,
|
|
258
|
-
closeAutoFocus: () => !0
|
|
259
|
-
}, ao = (e, l = {}) => {
|
|
260
|
-
pe(e) || Le("[useLockscreen]", "You need to pass a ref param to this function");
|
|
261
|
-
const n = l.ns || _("popup"), d = k(() => n.bm("parent", "hidden"));
|
|
262
|
-
if (!se || x(document.body, d.value))
|
|
263
|
-
return;
|
|
264
|
-
let s = 0, u = !1, r = "0";
|
|
265
|
-
const f = () => {
|
|
266
|
-
setTimeout(() => {
|
|
267
|
-
typeof document > "u" || u && document && (document.body.style.width = r, Fe(document.body, d.value));
|
|
268
|
-
}, 200);
|
|
269
|
-
};
|
|
270
|
-
J(e, (a) => {
|
|
271
|
-
if (!a) {
|
|
272
|
-
f();
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
u = !x(document.body, d.value), u && (r = document.body.style.width, Pe(document.body, d.value)), s = He(n.namespace.value);
|
|
276
|
-
const c = document.documentElement.clientHeight < document.body.scrollHeight, y = Ae(document.body, "overflowY");
|
|
277
|
-
s > 0 && (c || y === "scroll") && u && (document.body.style.width = `calc(100% - ${s}px)`);
|
|
278
|
-
}), ge(() => f());
|
|
279
|
-
}, ro = (e, l) => {
|
|
280
|
-
var n;
|
|
281
|
-
const s = Ce().emit, { nextZIndex: u } = je();
|
|
282
|
-
let r = "";
|
|
283
|
-
const f = ee(), a = ee(), c = A(!1), y = A(!1), C = A(!1), g = A((n = e.zIndex) != null ? n : u());
|
|
284
|
-
let m, v;
|
|
285
|
-
const h = Ke("namespace", Oe), i = k(() => {
|
|
286
|
-
const p = {}, P = `--${h.value}-dialog`;
|
|
287
|
-
return e.fullscreen || (e.top && (p[`${P}-margin-top`] = e.top), e.width && (p[`${P}-width`] = Z(e.width))), p;
|
|
288
|
-
}), F = k(() => e.alignCenter ? { display: "flex" } : {});
|
|
289
|
-
function S() {
|
|
290
|
-
s("opened");
|
|
291
|
-
}
|
|
292
|
-
function N() {
|
|
293
|
-
s("closed"), s(ae, !1), e.destroyOnClose && (C.value = !1);
|
|
294
|
-
}
|
|
295
|
-
function Y() {
|
|
296
|
-
s("close");
|
|
297
|
-
}
|
|
298
|
-
function O() {
|
|
299
|
-
v == null || v(), m == null || m(), e.openDelay && e.openDelay > 0 ? { stop: m } = oe(() => D(), e.openDelay) : D();
|
|
300
|
-
}
|
|
301
|
-
function M() {
|
|
302
|
-
m == null || m(), v == null || v(), e.closeDelay && e.closeDelay > 0 ? { stop: v } = oe(() => I(), e.closeDelay) : I();
|
|
303
|
-
}
|
|
304
|
-
function T() {
|
|
305
|
-
function p(P) {
|
|
306
|
-
P || (y.value = !0, c.value = !1);
|
|
307
|
-
}
|
|
308
|
-
e.beforeClose ? e.beforeClose(p) : M();
|
|
309
|
-
}
|
|
310
|
-
function B() {
|
|
311
|
-
e.closeOnClickModal && T();
|
|
312
|
-
}
|
|
313
|
-
function D() {
|
|
314
|
-
se && (c.value = !0);
|
|
315
|
-
}
|
|
316
|
-
function I() {
|
|
317
|
-
c.value = !1;
|
|
318
|
-
}
|
|
319
|
-
function t() {
|
|
320
|
-
s("openAutoFocus");
|
|
321
|
-
}
|
|
322
|
-
function L() {
|
|
323
|
-
s("closeAutoFocus");
|
|
324
|
-
}
|
|
325
|
-
function $(p) {
|
|
326
|
-
var P;
|
|
327
|
-
((P = p.detail) == null ? void 0 : P.focusReason) === "pointer" && p.preventDefault();
|
|
328
|
-
}
|
|
329
|
-
e.lockScroll && ao(c);
|
|
330
|
-
function ce() {
|
|
331
|
-
e.closeOnPressEscape && T();
|
|
332
|
-
}
|
|
333
|
-
return J(() => e.modelValue, (p) => {
|
|
334
|
-
p ? (y.value = !1, O(), C.value = !0, g.value = Ne(e.zIndex) ? u() : g.value++, be(() => {
|
|
335
|
-
s("open"), l.value && (l.value.parentElement.scrollTop = 0, l.value.parentElement.scrollLeft = 0, l.value.scrollTop = 0);
|
|
336
|
-
})) : c.value && M();
|
|
337
|
-
}), J(() => e.fullscreen, (p) => {
|
|
338
|
-
l.value && (p ? (r = l.value.style.transform, l.value.style.transform = "") : l.value.style.transform = r);
|
|
339
|
-
}), te(() => {
|
|
340
|
-
e.modelValue && (c.value = !0, C.value = !0, O());
|
|
341
|
-
}), {
|
|
342
|
-
afterEnter: S,
|
|
343
|
-
afterLeave: N,
|
|
344
|
-
beforeLeave: Y,
|
|
345
|
-
handleClose: T,
|
|
346
|
-
onModalClick: B,
|
|
347
|
-
close: M,
|
|
348
|
-
doClose: I,
|
|
349
|
-
onOpenAutoFocus: t,
|
|
350
|
-
onCloseAutoFocus: L,
|
|
351
|
-
onCloseRequested: ce,
|
|
352
|
-
onFocusoutPrevented: $,
|
|
353
|
-
titleId: f,
|
|
354
|
-
bodyId: a,
|
|
355
|
-
closed: y,
|
|
356
|
-
style: i,
|
|
357
|
-
overlayDialogStyle: F,
|
|
358
|
-
rendered: C,
|
|
359
|
-
visible: c,
|
|
360
|
-
zIndex: g
|
|
361
|
-
};
|
|
362
|
-
}, io = U({
|
|
363
|
-
name: "ElDialog",
|
|
364
|
-
inheritAttrs: !1
|
|
365
|
-
}), uo = /* @__PURE__ */ U({
|
|
366
|
-
...io,
|
|
367
|
-
props: no,
|
|
368
|
-
emits: so,
|
|
369
|
-
setup(e, { expose: l }) {
|
|
370
|
-
const n = e, d = he();
|
|
371
|
-
We({
|
|
372
|
-
scope: "el-dialog",
|
|
373
|
-
from: "the title slot",
|
|
374
|
-
replacement: "the header slot",
|
|
375
|
-
version: "3.0.0",
|
|
376
|
-
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
377
|
-
}, k(() => !!d.title));
|
|
378
|
-
const s = _("dialog"), u = A(), r = A(), f = A(), {
|
|
379
|
-
visible: a,
|
|
380
|
-
titleId: c,
|
|
381
|
-
bodyId: y,
|
|
382
|
-
style: C,
|
|
383
|
-
overlayDialogStyle: g,
|
|
384
|
-
rendered: m,
|
|
385
|
-
zIndex: v,
|
|
386
|
-
afterEnter: h,
|
|
387
|
-
afterLeave: i,
|
|
388
|
-
beforeLeave: F,
|
|
389
|
-
handleClose: S,
|
|
390
|
-
onModalClick: N,
|
|
391
|
-
onOpenAutoFocus: Y,
|
|
392
|
-
onCloseAutoFocus: O,
|
|
393
|
-
onCloseRequested: M,
|
|
394
|
-
onFocusoutPrevented: T
|
|
395
|
-
} = ro(n, u);
|
|
396
|
-
Ee(ie, {
|
|
397
|
-
dialogRef: u,
|
|
398
|
-
headerRef: r,
|
|
399
|
-
bodyId: y,
|
|
400
|
-
ns: s,
|
|
401
|
-
rendered: m,
|
|
402
|
-
style: C
|
|
403
|
-
});
|
|
404
|
-
const B = re(N), D = k(() => n.draggable && !n.fullscreen);
|
|
405
|
-
return l({
|
|
406
|
-
visible: a,
|
|
407
|
-
dialogContentRef: f,
|
|
408
|
-
resetPosition: () => {
|
|
409
|
-
var t;
|
|
410
|
-
(t = f.value) == null || t.resetPosition();
|
|
411
|
-
}
|
|
412
|
-
}), (t, L) => (z(), W(o(Ye), {
|
|
413
|
-
to: t.appendTo,
|
|
414
|
-
disabled: t.appendTo !== "body" ? !1 : !t.appendToBody
|
|
415
|
-
}, {
|
|
416
|
-
default: w(() => [
|
|
417
|
-
R(we, {
|
|
418
|
-
name: "dialog-fade",
|
|
419
|
-
onAfterEnter: o(h),
|
|
420
|
-
onAfterLeave: o(i),
|
|
421
|
-
onBeforeLeave: o(F),
|
|
422
|
-
persisted: ""
|
|
423
|
-
}, {
|
|
424
|
-
default: w(() => [
|
|
425
|
-
ke(R(o(_e), {
|
|
426
|
-
"custom-mask-event": "",
|
|
427
|
-
mask: t.modal,
|
|
428
|
-
"overlay-class": t.modalClass,
|
|
429
|
-
"z-index": o(v)
|
|
430
|
-
}, {
|
|
431
|
-
default: w(() => [
|
|
432
|
-
V("div", {
|
|
433
|
-
role: "dialog",
|
|
434
|
-
"aria-modal": "true",
|
|
435
|
-
"aria-label": t.title || void 0,
|
|
436
|
-
"aria-labelledby": t.title ? void 0 : o(c),
|
|
437
|
-
"aria-describedby": o(y),
|
|
438
|
-
class: E(`${o(s).namespace.value}-overlay-dialog`),
|
|
439
|
-
style: le(o(g)),
|
|
440
|
-
onClick: o(B).onClick,
|
|
441
|
-
onMousedown: o(B).onMousedown,
|
|
442
|
-
onMouseup: o(B).onMouseup
|
|
443
|
-
}, [
|
|
444
|
-
R(o(Re), {
|
|
445
|
-
loop: "",
|
|
446
|
-
trapped: o(a),
|
|
447
|
-
"focus-start-el": "container",
|
|
448
|
-
onFocusAfterTrapped: o(Y),
|
|
449
|
-
onFocusAfterReleased: o(O),
|
|
450
|
-
onFocusoutPrevented: o(T),
|
|
451
|
-
onReleaseRequested: o(M)
|
|
452
|
-
}, {
|
|
453
|
-
default: w(() => [
|
|
454
|
-
o(m) ? (z(), W(lo, Se({
|
|
455
|
-
key: 0,
|
|
456
|
-
ref_key: "dialogContentRef",
|
|
457
|
-
ref: f
|
|
458
|
-
}, t.$attrs, {
|
|
459
|
-
center: t.center,
|
|
460
|
-
"align-center": t.alignCenter,
|
|
461
|
-
"close-icon": t.closeIcon,
|
|
462
|
-
draggable: o(D),
|
|
463
|
-
overflow: t.overflow,
|
|
464
|
-
fullscreen: t.fullscreen,
|
|
465
|
-
"header-class": t.headerClass,
|
|
466
|
-
"body-class": t.bodyClass,
|
|
467
|
-
"footer-class": t.footerClass,
|
|
468
|
-
"show-close": t.showClose,
|
|
469
|
-
title: t.title,
|
|
470
|
-
"aria-level": t.headerAriaLevel,
|
|
471
|
-
onClose: o(S)
|
|
472
|
-
}), Me({
|
|
473
|
-
header: w(() => [
|
|
474
|
-
t.$slots.title ? b(t.$slots, "title", { key: 1 }) : b(t.$slots, "header", {
|
|
475
|
-
key: 0,
|
|
476
|
-
close: o(S),
|
|
477
|
-
titleId: o(c),
|
|
478
|
-
titleClass: o(s).e("title")
|
|
479
|
-
})
|
|
480
|
-
]),
|
|
481
|
-
default: w(() => [
|
|
482
|
-
b(t.$slots, "default")
|
|
483
|
-
]),
|
|
484
|
-
_: 2
|
|
485
|
-
}, [
|
|
486
|
-
t.$slots.footer ? {
|
|
487
|
-
name: "footer",
|
|
488
|
-
fn: w(() => [
|
|
489
|
-
b(t.$slots, "footer")
|
|
490
|
-
])
|
|
491
|
-
} : void 0
|
|
492
|
-
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : q("v-if", !0)
|
|
493
|
-
]),
|
|
494
|
-
_: 3
|
|
495
|
-
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
496
|
-
], 46, ["aria-label", "aria-labelledby", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
|
|
497
|
-
]),
|
|
498
|
-
_: 3
|
|
499
|
-
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
500
|
-
[Te, o(a)]
|
|
501
|
-
])
|
|
502
|
-
]),
|
|
503
|
-
_: 3
|
|
504
|
-
}, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
|
505
|
-
]),
|
|
506
|
-
_: 3
|
|
507
|
-
}, 8, ["to", "disabled"]));
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
var co = /* @__PURE__ */ ne(uo, [["__file", "dialog.vue"]]);
|
|
511
|
-
const bo = $e(co);
|
|
512
|
-
export {
|
|
513
|
-
bo as E,
|
|
514
|
-
_e as a,
|
|
515
|
-
ao as b,
|
|
516
|
-
re as c,
|
|
517
|
-
eo as d,
|
|
518
|
-
xe as u
|
|
519
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),t=require("./base-ec05f348.cjs"),$=require("./vnode-7fbc61e1.cjs"),O=require("./index-3bf8d597.cjs"),A=require("./use-form-common-props-1b84d8f4.cjs"),W=require("./scroll-41224831.cjs"),V=require("./index-8a0b1c53.cjs"),z=o=>{if(!o)return{onClick:t.NOOP,onMousedown:t.NOOP,onMouseup:t.NOOP};let l=!1,s=!1;return{onClick:i=>{l&&s&&o(i),l=s=!1},onMousedown:i=>{l=i.target===i.currentTarget},onMouseup:i=>{s=i.target===i.currentTarget}}},x=t.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:t.definePropType([String,Array,Object])},zIndex:{type:t.definePropType([String,Number])}}),K={click:o=>o instanceof MouseEvent},_="overlay";var Z=e.defineComponent({name:"ElOverlay",props:x,emits:K,setup(o,{slots:l,emit:s}){const f=t.useNamespace(_),a=r=>{s("click",r)},{onClick:c,onMousedown:i,onMouseup:m}=z(o.customMaskEvent?void 0:a);return()=>o.mask?e.createVNode("div",{class:[f.b(),o.overlayClass],style:{zIndex:o.zIndex},onClick:c,onMousedown:i,onMouseup:m},[e.renderSlot(l,"default")],$.PatchFlags.STYLE|$.PatchFlags.CLASS|$.PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):e.h("div",{class:o.overlayClass,style:{zIndex:o.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[e.renderSlot(l,"default")])}});const Y=Z,q=Symbol("dialogInjectionKey"),R=t.buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:A.iconPropType},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),G={close:()=>!0},U=(o,l,s,f)=>{let a={offsetX:0,offsetY:0};const c=d=>{const y=d.clientX,h=d.clientY,{offsetX:g,offsetY:v}=a,p=o.value.getBoundingClientRect(),b=p.left,u=p.top,D=p.width,E=p.height,N=document.documentElement.clientWidth,F=document.documentElement.clientHeight,L=-b+g,w=-u+v,k=N-b-D+g,S=F-u-E+v,T=n=>{let P=g+n.clientX-y,I=v+n.clientY-h;f!=null&&f.value||(P=Math.min(Math.max(P,L),k),I=Math.min(Math.max(I,w),S)),a={offsetX:P,offsetY:I},o.value&&(o.value.style.transform=`translate(${t.addUnit(P)}, ${t.addUnit(I)})`)},B=()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",B)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",B)},i=()=>{l.value&&o.value&&l.value.addEventListener("mousedown",c)},m=()=>{l.value&&o.value&&l.value.removeEventListener("mousedown",c)},r=()=>{a={offsetX:0,offsetY:0},o.value&&(o.value.style.transform="none")};return e.onMounted(()=>{e.watchEffect(()=>{s.value?i():m()})}),e.onBeforeUnmount(()=>{m()}),{resetPosition:r}},X=(...o)=>l=>{o.forEach(s=>{t.isFunction(s)?s(l):s.value=l})},J=e.defineComponent({name:"ElDialogContent"}),Q=e.defineComponent({...J,props:R,emits:G,setup(o,{expose:l}){const s=o,{t:f}=t.useLocale(),{Close:a}=A.CloseComponents,{dialogRef:c,headerRef:i,bodyId:m,ns:r,style:d}=e.inject(q),{focusTrapRef:y}=e.inject(O.FOCUS_TRAP_INJECTION_KEY),h=e.computed(()=>[r.b(),r.is("fullscreen",s.fullscreen),r.is("draggable",s.draggable),r.is("align-center",s.alignCenter),{[r.m("center")]:s.center}]),g=X(y,c),v=e.computed(()=>s.draggable),p=e.computed(()=>s.overflow),{resetPosition:b}=U(c,i,v,p);return l({resetPosition:b}),(u,D)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(g),class:e.normalizeClass(e.unref(h)),style:e.normalizeStyle(e.unref(d)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:i,class:e.normalizeClass([e.unref(r).e("header"),u.headerClass,{"show-close":u.showClose}])},[e.renderSlot(u.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":u.ariaLevel,class:e.normalizeClass(e.unref(r).e("title"))},e.toDisplayString(u.title),11,["aria-level"])]),u.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(f)("el.dialog.close"),class:e.normalizeClass(e.unref(r).e("headerbtn")),type:"button",onClick:E=>u.$emit("close")},[e.createVNode(e.unref(A.ElIcon),{class:e.normalizeClass(e.unref(r).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.closeIcon||e.unref(a))))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(m),class:e.normalizeClass([e.unref(r).e("body"),u.bodyClass])},[e.renderSlot(u.$slots,"default")],10,["id"]),u.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass([e.unref(r).e("footer"),u.footerClass])},[e.renderSlot(u.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var ee=t._export_sfc(Q,[["__file","dialog-content.vue"]]);const oe=t.buildProps({...R,appendToBody:Boolean,appendTo:{type:t.definePropType([String,Object]),default:"body"},beforeClose:{type:t.definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},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"}}),te={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[O.UPDATE_MODEL_EVENT]:o=>t.isBoolean(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},H=(o,l={})=>{e.isRef(o)||t.throwError("[useLockscreen]","You need to pass a ref param to this function");const s=l.ns||t.useNamespace("popup"),f=e.computed(()=>s.bm("parent","hidden"));if(!t.isClient||t.hasClass(document.body,f.value))return;let a=0,c=!1,i="0";const m=()=>{setTimeout(()=>{typeof document>"u"||c&&document&&(document.body.style.width=i,t.removeClass(document.body,f.value))},200)};e.watch(o,r=>{if(!r){m();return}c=!t.hasClass(document.body,f.value),c&&(i=document.body.style.width,t.addClass(document.body,f.value)),a=W.getScrollBarWidth(s.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,y=t.getStyle(document.body,"overflowY");a>0&&(d||y==="scroll")&&c&&(document.body.style.width=`calc(100% - ${a}px)`)}),e.onScopeDispose(()=>m())},ne=(o,l)=>{var s;const a=e.getCurrentInstance().emit,{nextZIndex:c}=A.useZIndex();let i="";const m=t.useId(),r=t.useId(),d=e.ref(!1),y=e.ref(!1),h=e.ref(!1),g=e.ref((s=o.zIndex)!=null?s:c());let v,p;const b=V.useGlobalConfig("namespace",t.defaultNamespace),u=e.computed(()=>{const C={},M=`--${b.value}-dialog`;return o.fullscreen||(o.top&&(C[`${M}-margin-top`]=o.top),o.width&&(C[`${M}-width`]=t.addUnit(o.width))),C}),D=e.computed(()=>o.alignCenter?{display:"flex"}:{});function E(){a("opened")}function N(){a("closed"),a(O.UPDATE_MODEL_EVENT,!1),o.destroyOnClose&&(h.value=!1)}function F(){a("close")}function L(){p==null||p(),v==null||v(),o.openDelay&&o.openDelay>0?{stop:v}=t.useTimeoutFn(()=>T(),o.openDelay):T()}function w(){v==null||v(),p==null||p(),o.closeDelay&&o.closeDelay>0?{stop:p}=t.useTimeoutFn(()=>B(),o.closeDelay):B()}function k(){function C(M){M||(y.value=!0,d.value=!1)}o.beforeClose?o.beforeClose(C):w()}function S(){o.closeOnClickModal&&k()}function T(){t.isClient&&(d.value=!0)}function B(){d.value=!1}function n(){a("openAutoFocus")}function P(){a("closeAutoFocus")}function I(C){var M;((M=C.detail)==null?void 0:M.focusReason)==="pointer"&&C.preventDefault()}o.lockScroll&&H(d);function j(){o.closeOnPressEscape&&k()}return e.watch(()=>o.modelValue,C=>{C?(y.value=!1,L(),h.value=!0,g.value=O.isUndefined(o.zIndex)?c():g.value++,e.nextTick(()=>{a("open"),l.value&&(l.value.parentElement.scrollTop=0,l.value.parentElement.scrollLeft=0,l.value.scrollTop=0)})):d.value&&w()}),e.watch(()=>o.fullscreen,C=>{l.value&&(C?(i=l.value.style.transform,l.value.style.transform=""):l.value.style.transform=i)}),e.onMounted(()=>{o.modelValue&&(d.value=!0,h.value=!0,L())}),{afterEnter:E,afterLeave:N,beforeLeave:F,handleClose:k,onModalClick:S,close:w,doClose:B,onOpenAutoFocus:n,onCloseAutoFocus:P,onCloseRequested:j,onFocusoutPrevented:I,titleId:m,bodyId:r,closed:y,style:u,overlayDialogStyle:D,rendered:h,visible:d,zIndex:g}},le=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),se=e.defineComponent({...le,props:oe,emits:te,setup(o,{expose:l}){const s=o,f=e.useSlots();V.useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},e.computed(()=>!!f.title));const a=t.useNamespace("dialog"),c=e.ref(),i=e.ref(),m=e.ref(),{visible:r,titleId:d,bodyId:y,style:h,overlayDialogStyle:g,rendered:v,zIndex:p,afterEnter:b,afterLeave:u,beforeLeave:D,handleClose:E,onModalClick:N,onOpenAutoFocus:F,onCloseAutoFocus:L,onCloseRequested:w,onFocusoutPrevented:k}=ne(s,c);e.provide(q,{dialogRef:c,headerRef:i,bodyId:y,ns:a,rendered:v,style:h});const S=z(N),T=e.computed(()=>s.draggable&&!s.fullscreen);return l({visible:r,dialogContentRef:m,resetPosition:()=>{var n;(n=m.value)==null||n.resetPosition()}}),(n,P)=>(e.openBlock(),e.createBlock(e.unref(O.ElTeleport),{to:n.appendTo,disabled:n.appendTo!=="body"?!1:!n.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"dialog-fade",onAfterEnter:e.unref(b),onAfterLeave:e.unref(u),onBeforeLeave:e.unref(D),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(Y),{"custom-mask-event":"",mask:n.modal,"overlay-class":n.modalClass,"z-index":e.unref(p)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":n.title||void 0,"aria-labelledby":n.title?void 0:e.unref(d),"aria-describedby":e.unref(y),class:e.normalizeClass(`${e.unref(a).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(g)),onClick:e.unref(S).onClick,onMousedown:e.unref(S).onMousedown,onMouseup:e.unref(S).onMouseup},[e.createVNode(e.unref(O.ElFocusTrap),{loop:"",trapped:e.unref(r),"focus-start-el":"container",onFocusAfterTrapped:e.unref(F),onFocusAfterReleased:e.unref(L),onFocusoutPrevented:e.unref(k),onReleaseRequested:e.unref(w)},{default:e.withCtx(()=>[e.unref(v)?(e.openBlock(),e.createBlock(ee,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:m},n.$attrs,{center:n.center,"align-center":n.alignCenter,"close-icon":n.closeIcon,draggable:e.unref(T),overflow:n.overflow,fullscreen:n.fullscreen,"header-class":n.headerClass,"body-class":n.bodyClass,"footer-class":n.footerClass,"show-close":n.showClose,title:n.title,"aria-level":n.headerAriaLevel,onClose:e.unref(E)}),e.createSlots({header:e.withCtx(()=>[n.$slots.title?e.renderSlot(n.$slots,"title",{key:1}):e.renderSlot(n.$slots,"header",{key:0,close:e.unref(E),titleId:e.unref(d),titleClass:e.unref(a).e("title")})]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:2},[n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):e.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[e.vShow,e.unref(r)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ae=t._export_sfc(se,[["__file","dialog.vue"]]);const re=t.withInstall(ae);exports.ElDialog=re;exports.ElOverlay=Y;exports.composeRefs=X;exports.useDraggable=U;exports.useLockscreen=H;exports.useSameTarget=z;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),l=require("./el-button-196807af.cjs"),c=require("./use-form-common-props-1b84d8f4.cjs"),p=require("./el-popper-746070ba.cjs"),o=require("./base-ec05f348.cjs"),v=o.buildProps({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:l.buttonTypes,default:"primary"},cancelButtonType:{type:String,values:l.buttonTypes,default:"text"},icon:{type:c.iconPropType,default:()=>c.question_filled_default},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:p.useTooltipContentProps.teleported,persistent:p.useTooltipContentProps.persistent,width:{type:[String,Number],default:150}}),h={confirm:n=>n instanceof MouseEvent,cancel:n=>n instanceof MouseEvent},g=e.defineComponent({name:"ElPopconfirm"}),P=e.defineComponent({...g,props:v,emits:h,setup(n,{emit:a}){const i=n,{t:u}=o.useLocale(),r=o.useNamespace("popconfirm"),f=e.ref(),m=()=>{var t,s;(s=(t=f.value)==null?void 0:t.onClose)==null||s.call(t)},B=e.computed(()=>({width:o.addUnit(i.width)})),d=t=>{a("confirm",t),m()},y=t=>{a("cancel",t),m()},T=e.computed(()=>i.confirmButtonText||u("el.popconfirm.confirmButtonText")),C=e.computed(()=>i.cancelButtonText||u("el.popconfirm.cancelButtonText"));return(t,s)=>(e.openBlock(),e.createBlock(e.unref(p.ElTooltip),e.mergeProps({ref_key:"tooltipRef",ref:f,trigger:"click",effect:"light"},t.$attrs,{"popper-class":`${e.unref(r).namespace.value}-popover`,"popper-style":e.unref(B),teleported:t.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":t.hideAfter,persistent:t.persistent}),{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("main"))},[!t.hideIcon&&t.icon?(e.openBlock(),e.createBlock(e.unref(c.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).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(r).e("action"))},[e.renderSlot(t.$slots,"actions",{confirm:d,cancel:y},()=>[e.createVNode(e.unref(l.ElButton),{size:"small",type:t.cancelButtonType==="text"?"":t.cancelButtonType,text:t.cancelButtonType==="text",onClick:y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(C)),1)]),_:1},8,["type","text"]),e.createVNode(e.unref(l.ElButton),{size:"small",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(T)),1)]),_:1},8,["type","text"])])],2)],2)]),default:e.withCtx(()=>[t.$slots.reference?e.renderSlot(t.$slots,"reference",{key:0}):e.createCommentVNode("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var k=o._export_sfc(P,[["__file","popconfirm.vue"]]);const E=o.withInstall(k);exports.ElPopconfirm=E;
|