ss-component-new 1.1.677 → 1.1.679
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{array-A9Rs-yNQ.cjs → array-CdU_LvNN.cjs} +1 -1
- package/dist/{array-Do4yDTLA.js → array-DQv6Fq_h.js} +1 -1
- package/dist/index-9Jyf7D58.cjs +11 -0
- package/dist/{index-COIRSX9x.js → index-B5HEygzc.js} +1 -1
- package/dist/{index-BCiyd8to.js → index-BEw4LLmL.js} +5 -5
- package/dist/index-BF4Csz4n.cjs +7 -0
- package/dist/index-BSgBncEa.js +98 -0
- package/dist/index-BUDh24dN.cjs +1 -0
- package/dist/index-BWlRsQ5r.cjs +1 -0
- package/dist/{index-DTtwuF-T.js → index-BfYQurjl.js} +4 -4
- package/dist/{index-C6K6sB3x.js → index-BgN6jDMZ.js} +18 -17
- package/dist/index-BlUlbXhU.cjs +1 -0
- package/dist/{index-667CFrRr.js → index-Bnm7HLEv.js} +26 -25
- package/dist/{index-BhtgGk87.js → index-BrF4RjsJ.js} +16 -15
- package/dist/{index-CSPnTQik.js → index-BslQsQTm.js} +14 -13
- package/dist/{index-B3nGITHz.js → index-By4g8tN9.js} +28 -27
- package/dist/index-By6oNrUt.js +25 -0
- package/dist/{index-IlhcobYc.js → index-BzdUYBQn.js} +29 -28
- package/dist/{index-Dr8U6syY.cjs → index-C1SB9P3G.cjs} +1 -1
- package/dist/{index-pBTmTep4.cjs → index-CHt51Uuy.cjs} +178 -178
- package/dist/{index-4itasbDU.js → index-CNsfln9_.js} +137 -136
- package/dist/index-CP8Kdm5k.cjs +1 -0
- package/dist/index-CSoCXPYP.cjs +1 -0
- package/dist/index-CZSL5wqq.cjs +1 -0
- package/dist/index-ChzV2EQu.cjs +1 -0
- package/dist/{index-BO3tcPiy.js → index-CjE1SbBl.js} +4 -4
- package/dist/{index-CKsjOlOK.js → index-CuAkYbDd.js} +8 -7
- package/dist/index-CyOqWyyR.cjs +1 -0
- package/dist/{index-B763287m.js → index-D0Hc5dzH.js} +14 -13
- package/dist/index-D27jdf3I.cjs +1 -0
- package/dist/index-D5aVobf4.cjs +1 -0
- package/dist/{index-DB4Ei-er.js → index-D7DabnbZ.js} +3 -3
- package/dist/{index-Bvfe4GiC.js → index-D7lAlQGg.js} +30 -29
- package/dist/index-D7oUNdyD.cjs +1 -0
- package/dist/index-DH8DjZyG.cjs +15 -0
- package/dist/{index-DTcyJOVb.js → index-DTyFaMiq.js} +136 -133
- package/dist/index-DYQ00qZi.cjs +1 -0
- package/dist/index-Df8fhbT0.cjs +1 -0
- package/dist/index-DjOudbez.js +8628 -0
- package/dist/{index-DQMaqq7k.cjs → index-DmNVtdMO.cjs} +1 -1
- package/dist/index-DnfBO8l9.cjs +1 -0
- package/dist/{index-DNsd4HOi.js → index-Dt7ja-ns.js} +22 -21
- package/dist/{index-DqfR7Wq0.cjs → index-DtZolPAm.cjs} +1 -1
- package/dist/{index-DsAXyci9.js → index-Dvr4jMfd.js} +1 -1
- package/dist/{index-CDw5cClx.cjs → index-Dx9M61vw.cjs} +1 -1
- package/dist/{index-B-maqhZ0.js → index-H00uQ6gy.js} +11 -10
- package/dist/{index-Bi4VVlHb.cjs → index-J-l36gix.cjs} +1 -1
- package/dist/{index-ndiM_kCU.js → index-OxYhbz5N.js} +23 -22
- package/dist/{index-DkAdCgxM.cjs → index-gX5Vhp03.cjs} +1 -1
- package/dist/{index-Diq6xjEU.js → index-hF_yFi8t.js} +15 -14
- package/dist/index-jHInPcf2.cjs +1 -0
- package/dist/{index-CJ1PSO2E.js → index-qgnz9CaI.js} +4 -4
- package/dist/index-x8sopkEo.cjs +1 -0
- package/dist/{index-D0bKFpsf.js → index-xlvAbgtJ.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CbWGQcTu.js → index.vue_vue_type_script_setup_true_lang-Dk8TVRhU.js} +16 -16
- package/dist/index.vue_vue_type_script_setup_true_lang-M1dhq2BR.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BODGdgd7.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cqc046YB.js} +90 -89
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DXrmEn89.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DvQHg_q7.cjs} +137 -137
- package/dist/{index.vue_vue_type_style_index_0_scoped_2be0f146_lang-BOdfOxLL.js → index.vue_vue_type_style_index_0_scoped_2be0f146_lang-BgtezuYN.js} +1033 -1032
- package/dist/index.vue_vue_type_style_index_0_scoped_2be0f146_lang-DeKIbKlB.cjs +56 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_c81d0427_lang-BlygzVps.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-CO9KOndR.js → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-TxkgaV1Q.js} +19 -18
- package/dist/login-Boy6Y2LE.cjs +1 -0
- package/dist/{login-DHDms8MF.js → login-Czn1jLVJ.js} +13 -12
- package/dist/{main-D1cJIt6Y.js → main-DSUsqlzt.js} +5 -5
- package/dist/{main-tHGdiDDo.cjs → main-ZfZCVP-w.cjs} +1 -1
- package/dist/menu-IwkXhFha.js +5133 -0
- package/dist/menu-mXKso_oG.cjs +11 -0
- package/dist/{modelComp-CkSDfH0-.cjs → modelComp-BSTM_xcV.cjs} +1 -1
- package/dist/{modelComp-CUhhdEAE.js → modelComp-DSmZe2d_.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +14 -13
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +23 -17
- package/dist/threeModel-3TRMDRN3.cjs +1 -0
- package/dist/{threeModel-DYRksTHO.js → threeModel-DN7wVAKn.js} +5 -4
- package/package.json +1 -1
- package/dist/index-4u6cukm_.cjs +0 -7
- package/dist/index-B6DYZeUT.cjs +0 -1
- package/dist/index-BE8DQhoN.cjs +0 -1
- package/dist/index-BKqsn-uL.cjs +0 -1
- package/dist/index-BOW7yNd6.cjs +0 -1
- package/dist/index-BPmwBpKK.cjs +0 -1
- package/dist/index-CBCVEa12.cjs +0 -1
- package/dist/index-D3Kx1prP.cjs +0 -1
- package/dist/index-D9o_-x-D.cjs +0 -1
- package/dist/index-DJ24bMHB.cjs +0 -15
- package/dist/index-D_quAavs.cjs +0 -1
- package/dist/index-DcVZqaq1.cjs +0 -1
- package/dist/index-DchvsNza.cjs +0 -1
- package/dist/index-Dj3agj2Y.cjs +0 -1
- package/dist/index-DtsQ-ZoV.cjs +0 -1
- package/dist/index-XaQuDBpe.cjs +0 -1
- package/dist/index-dLGOwGSm.cjs +0 -1
- package/dist/index-i_giarET.js +0 -24
- package/dist/index.vue_vue_type_script_setup_true_lang-BMqH2YBl.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_2be0f146_lang-CXjIx16-.cjs +0 -56
- package/dist/index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Dvmtu_2i.cjs +0 -1
- package/dist/login-9FT8kgSz.cjs +0 -1
- package/dist/menu-B_PRFK5X.js +0 -13750
- package/dist/menu-ScIJ5kqr.cjs +0 -21
- package/dist/threeModel-Da4vzHJ0.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bm as o, bn as i, bk as p } from "./index-DjOudbez.js";
|
|
2
2
|
import { ref as l } from "vue";
|
|
3
|
-
const
|
|
3
|
+
const r = (e) => {
|
|
4
4
|
const a = {};
|
|
5
5
|
for (let t in e)
|
|
6
6
|
t !== "id" && (a[t] = e[t]);
|
|
@@ -15,7 +15,7 @@ const y = (e) => {
|
|
|
15
15
|
tableData: a
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
},
|
|
18
|
+
}, y = (e) => {
|
|
19
19
|
i({
|
|
20
20
|
id: e == null ? void 0 : e.id
|
|
21
21
|
});
|
|
@@ -97,8 +97,8 @@ const b = {
|
|
|
97
97
|
]
|
|
98
98
|
};
|
|
99
99
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
r as a,
|
|
101
|
+
y as d,
|
|
102
102
|
f,
|
|
103
103
|
b as t
|
|
104
104
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),l=require("./index-9Jyf7D58.cjs"),J=require("./menu-mXKso_oG.cjs");var Xe=l.Symbol?l.Symbol.isConcatSpreadable:void 0;function tn(e){return l.isArray(e)||J.isArguments(e)||!!(Xe&&e&&e[Xe])}function Ve(e,n,o,r,s){var a=-1,i=e.length;for(o||(o=tn),s||(s=[]);++a<i;){var u=e[a];n>0&&o(u)?n>1?Ve(u,n-1,o,r,s):J.arrayPush(s,u):r||(s[s.length]=u)}return s}function ft(e){var n=e==null?0:e.length;return n?Ve(e,1):[]}function pt(e){return J.setToString(J.overRest(e,void 0,ft),e+"")}function nn(e,n){return e!=null&&n in Object(e)}function on(e,n,o){n=l.castPath(n,e);for(var r=-1,s=n.length,a=!1;++r<s;){var i=l.toKey(n[r]);if(!(a=e!=null&&o(e,i)))break;e=e[i]}return a||++r!=s?a:(s=e==null?0:e.length,!!s&&J.isLength(s)&&l.isIndex(i,s)&&(l.isArray(e)||J.isArguments(e)))}function vt(e,n){return e!=null&&on(e,n,nn)}function rn(e,n,o){for(var r=-1,s=n.length,a={};++r<s;){var i=n[r],u=l.baseGet(e,i);o(u,i)&&l.baseSet(a,l.castPath(i,e),u)}return a}function sn(e,n){return rn(e,n,function(o,r){return vt(e,r)})}var mt=pt(function(e,n){return e==null?{}:sn(e,n)});const pe="update:modelValue",Be="change",Ne="input";function an(e,n,o,r){const s=o-n;return e/=r/2,e<1?s/2*e*e*e+n:s/2*((e-=2)*e*e+2)+n}const ht=e=>l.isClient?window.requestAnimationFrame(e):setTimeout(e,16),gt=e=>l.isClient?window.cancelAnimationFrame(e):clearTimeout(e),ln=(e,n)=>{if(!l.isClient)return!1;const o={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(n)],r=l.getStyle(e,o);return["scroll","auto","overlay"].some(s=>r.includes(s))},un=(e,n)=>{if(!l.isClient)return;let o=e;for(;o;){if([window,document,document.documentElement].includes(o))return window;if(ln(o,n))return o;o=o.parentNode}return o};let ie;const bt=e=>{var n;if(!l.isClient)return 0;if(ie!==void 0)return ie;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const r=o.offsetWidth;o.style.overflow="scroll";const s=document.createElement("div");s.style.width="100%",o.appendChild(s);const a=s.offsetWidth;return(n=o.parentNode)==null||n.removeChild(o),ie=r-a,ie};function cn(e,n){if(!l.isClient)return;if(!n){e.scrollTop=0;return}const o=[];let r=n.offsetParent;for(;r!==null&&e!==r&&e.contains(r);)o.push(r),r=r.offsetParent;const s=n.offsetTop+o.reduce((p,d)=>p+d.offsetTop,0),a=s+n.offsetHeight,i=e.scrollTop,u=i+e.clientHeight;s<i?e.scrollTop=s:a>u&&(e.scrollTop=a-e.clientHeight)}function dn(e,n,o,r,s){const a=Date.now();let i;const u=()=>{const d=Date.now()-a,g=an(d>r?r:d,n,o,r);l.isWindow(e)?e.scrollTo(window.pageXOffset,g):e.scrollTop=g,d<r?i=ht(u):l.isFunction(s)&&s()};return u(),()=>{i&>(i)}}const fn=(e,n)=>l.isWindow(n)?e.ownerDocument.documentElement:n,pn=e=>l.isWindow(e)?window.scrollY:e.scrollTop,yt=()=>l.isClient&&/firefox/i.test(window.navigator.userAgent);let M;const vn={height:"0",visibility:"hidden",overflow:yt()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},mn=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function hn(e){const n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),s=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:mn.map(i=>[i,n.getPropertyValue(i)]),paddingSize:r,borderSize:s,boxSizing:o}}function Je(e,n=1,o){var r;M||(M=document.createElement("textarea"),document.body.appendChild(M));const{paddingSize:s,borderSize:a,boxSizing:i,contextStyle:u}=hn(e);u.forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S)),Object.entries(vn).forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S,"important")),M.value=e.value||e.placeholder||"";let p=M.scrollHeight;const d={};i==="border-box"?p=p+a:i==="content-box"&&(p=p-s),M.value="";const g=M.scrollHeight-s;if(l.isNumber(n)){let m=g*n;i==="border-box"&&(m=m+s+a),p=Math.max(m,p),d.minHeight=`${m}px`}if(l.isNumber(o)){let m=g*o;i==="border-box"&&(m=m+s+a),p=Math.min(m,p)}return d.height=`${p}px`,(r=M.parentNode)==null||r.removeChild(M),M=void 0,d}const gn=l.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Et=e=>mt(gn,e),Ct=l.buildProps({id:{type:String,default:void 0},size:l.useSizeProp,disabled:Boolean,modelValue:{type:l.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:l.definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:l.iconPropType},prefixIcon:{type:l.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:l.definePropType([Object,Array,String]),default:()=>l.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...Et(["ariaLabel"])}),bn={[pe]:e=>l.isString(e),input:e=>l.isString(e),change:e=>l.isString(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},yn=["class","style"],En=/^on[A-Z]/,wt=(e={})=>{const{excludeListeners:n=!1,excludeKeys:o}=e,r=t.computed(()=>((o==null?void 0:o.value)||[]).concat(yn)),s=t.getCurrentInstance();return s?t.computed(()=>{var a;return l.fromPairs(Object.entries((a=s.proxy)==null?void 0:a.$attrs).filter(([i])=>!r.value.includes(i)&&!(n&&En.test(i))))}):(l.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),t.computed(()=>({})))},Ie={prefix:Math.floor(Math.random()*1e4),current:0},Cn=Symbol("elIdInjection"),St=()=>t.getCurrentInstance()?t.inject(Cn,Ie):Ie,ve=e=>{const n=St();!l.isClient&&n===Ie&&l.debugWarn("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
2
|
+
usage: app.provide(ID_INJECTION_KEY, {
|
|
3
|
+
prefix: number,
|
|
4
|
+
current: number,
|
|
5
|
+
})`);const o=l.useGetDerivedNamespace();return l.computedEager(()=>t.unref(e)||`${o.value}-id-${n.prefix}-${n.current++}`)},me=Symbol("formContextKey"),Fe=Symbol("formItemContextKey"),Re=()=>{const e=t.inject(me,void 0),n=t.inject(Fe,void 0);return{form:e,formItem:n}},kt=(e,{formItemContext:n,disableIdGeneration:o,disableIdManagement:r})=>{o||(o=t.ref(!1)),r||(r=t.ref(!1));const s=t.ref();let a;const i=t.computed(()=>{var u;return!!(!(e.label||e.ariaLabel)&&n&&n.inputIds&&((u=n.inputIds)==null?void 0:u.length)<=1)});return t.onMounted(()=>{a=t.watch([t.toRef(e,"id"),o],([u,p])=>{const d=u??(p?void 0:ve().value);d!==s.value&&(n!=null&&n.removeInputId&&(s.value&&n.removeInputId(s.value),!(r!=null&&r.value)&&!p&&d&&n.addInputId(d)),s.value=d)},{immediate:!0})}),t.onUnmounted(()=>{a&&a(),n!=null&&n.removeInputId&&s.value&&n.removeInputId(s.value)}),{isLabeledByFormItem:i,inputId:s}},Tt=e=>{const n=t.getCurrentInstance();return t.computed(()=>{var o,r;return(r=(o=n==null?void 0:n.proxy)==null?void 0:o.$props)==null?void 0:r[e]})},Le=(e,n={})=>{const o=t.ref(void 0),r=n.prop?o:Tt("size"),s=n.global?o:l.useGlobalSize(),a=n.form?{size:void 0}:t.inject(me,void 0),i=n.formItem?{size:void 0}:t.inject(Fe,void 0);return t.computed(()=>r.value||t.unref(e)||(i==null?void 0:i.size)||(a==null?void 0:a.size)||s.value||"")},re=e=>{const n=Tt("disabled"),o=t.inject(me,void 0);return t.computed(()=>n.value||t.unref(e)||(o==null?void 0:o.disabled)||!1)},wn='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Sn=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,Ze=e=>Array.from(e.querySelectorAll(wn)).filter(n=>he(n)&&Sn(n)),he=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},kn=function(e,n,...o){let r;n.includes("mouse")||n.includes("click")?r="MouseEvents":n.includes("key")?r="KeyboardEvent":r="HTMLEvents";const s=document.createEvent(r);return s.initEvent(n,...o),e.dispatchEvent(s),e},Bt=e=>!e.getAttribute("aria-owns"),Tn=(e,n,o)=>{const{parentNode:r}=e;if(!r)return null;const s=r.querySelectorAll(o),a=Array.prototype.indexOf.call(s,e);return s[a+n]||null},Bn=e=>{e&&(e.focus(),!Bt(e)&&e.click())};function Nt(e,{beforeFocus:n,afterFocus:o,beforeBlur:r,afterBlur:s}={}){const a=t.getCurrentInstance(),{emit:i}=a,u=t.shallowRef(),p=re(),d=t.ref(!1),g=y=>{l.isFunction(n)&&n(y)||d.value||(d.value=!0,i("focus",y),o==null||o())},m=y=>{var c;l.isFunction(r)&&r(y)||y.relatedTarget&&((c=u.value)!=null&&c.contains(y.relatedTarget))||(d.value=!1,i("blur",y),s==null||s())},S=y=>{var c,b;(c=u.value)!=null&&c.contains(document.activeElement)&&u.value!==document.activeElement||he(y.target)||p.value||(b=e.value)==null||b.focus()};return t.watch([u,p],([y,c])=>{y&&(c?y.removeAttribute("tabindex"):y.setAttribute("tabindex","-1"))}),l.useEventListener(u,"focus",g,!0),l.useEventListener(u,"blur",m,!0),l.useEventListener(u,"click",S,!0),process.env.NODE_ENV==="test"&&t.onMounted(()=>{const y=l.isElement(e.value)?e.value:document.querySelector("input,textarea");y&&(l.useEventListener(y,"focus",g,!0),l.useEventListener(y,"blur",m,!0))}),{isFocused:d,wrapperRef:u,handleFocus:g,handleBlur:m}}const Nn=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function It({afterComposition:e,emit:n}){const o=t.ref(!1),r=u=>{n==null||n("compositionstart",u),o.value=!0},s=u=>{var p;n==null||n("compositionupdate",u);const d=(p=u.target)==null?void 0:p.value,g=d[d.length-1]||"";o.value=!Nn(g)},a=u=>{n==null||n("compositionend",u),o.value&&(o.value=!1,t.nextTick(()=>e(u)))};return{isComposing:o,handleComposition:u=>{u.type==="compositionend"?a(u):s(u)},handleCompositionStart:r,handleCompositionUpdate:s,handleCompositionEnd:a}}function In(e){let n;function o(){if(e.value==null)return;const{selectionStart:s,selectionEnd:a,value:i}=e.value;if(s==null||a==null)return;const u=i.slice(0,Math.max(0,s)),p=i.slice(Math.max(0,a));n={selectionStart:s,selectionEnd:a,value:i,beforeTxt:u,afterTxt:p}}function r(){if(e.value==null||n==null)return;const{value:s}=e.value,{beforeTxt:a,afterTxt:i,selectionStart:u}=n;if(a==null||i==null||u==null)return;let p=s.length;if(s.endsWith(i))p=s.length-i.length;else if(s.startsWith(a))p=a.length;else{const d=a[u-1],g=s.indexOf(d,u-1);g!==-1&&(p=g+1)}e.value.setSelectionRange(p,p)}return[o,r]}const xt="ElInput",xn=t.defineComponent({name:xt,inheritAttrs:!1}),Mn=t.defineComponent({...xn,props:Ct,emits:bn,setup(e,{expose:n,emit:o}){const r=e,s=t.useAttrs(),a=wt(),i=t.useSlots(),u=t.computed(()=>[r.type==="textarea"?b.b():c.b(),c.m(S.value),c.is("disabled",y.value),c.is("exceed",Yt.value),{[c.b("group")]:i.prepend||i.append,[c.m("prefix")]:i.prefix||r.prefixIcon,[c.m("suffix")]:i.suffix||r.suffixIcon||r.clearable||r.showPassword,[c.bm("suffix","password-clear")]:I.value&&j.value,[c.b("hidden")]:r.type==="hidden"},s.class]),p=t.computed(()=>[c.e("wrapper"),c.is("focus",R.value)]),{form:d,formItem:g}=Re(),{inputId:m}=kt(r,{formItemContext:g}),S=Le(),y=re(),c=l.useNamespace("input"),b=l.useNamespace("textarea"),v=t.shallowRef(),h=t.shallowRef(),E=t.ref(!1),T=t.ref(!1),L=t.ref(),V=t.shallowRef(r.inputStyle),F=t.computed(()=>v.value||h.value),{wrapperRef:x,isFocused:R,handleFocus:O,handleBlur:K}=Nt(F,{beforeFocus(){return y.value},afterBlur(){var f;r.validateEvent&&((f=g==null?void 0:g.validate)==null||f.call(g,"blur").catch(C=>l.debugWarn(C)))}}),H=t.computed(()=>{var f;return(f=d==null?void 0:d.statusIcon)!=null?f:!1}),B=t.computed(()=>(g==null?void 0:g.validateState)||""),se=t.computed(()=>B.value&&l.ValidateComponentsMap[B.value]),ae=t.computed(()=>T.value?l.view_default:l.hide_default),be=t.computed(()=>[s.style]),w=t.computed(()=>[r.inputStyle,V.value,{resize:r.resize}]),k=t.computed(()=>l.isNil(r.modelValue)?"":String(r.modelValue)),I=t.computed(()=>r.clearable&&!y.value&&!r.readonly&&!!k.value&&(R.value||E.value)),j=t.computed(()=>r.showPassword&&!y.value&&!!k.value),G=t.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!y.value&&!r.readonly&&!r.showPassword),ye=t.computed(()=>k.value.length),Yt=t.computed(()=>!!G.value&&ye.value>Number(r.maxlength)),jt=t.computed(()=>!!i.suffix||!!r.suffixIcon||I.value||r.showPassword||G.value||!!B.value&&H.value),[De,He]=In(v);l.useResizeObserver(h,f=>{if(Gt(),!G.value||r.resize!=="both")return;const C=f[0],{width:q}=C.contentRect;L.value={right:`calc(100% - ${q+15+6}px)`}});const Q=()=>{const{type:f,autosize:C}=r;if(!(!l.isClient||f!=="textarea"||!h.value))if(C){const q=l.isObject$1(C)?C.minRows:void 0,Ge=l.isObject$1(C)?C.maxRows:void 0,qe=Je(h.value,q,Ge);V.value={overflowY:"hidden",...qe},t.nextTick(()=>{h.value.offsetHeight,V.value=qe})}else V.value={minHeight:Je(h.value).minHeight}},Gt=(f=>{let C=!1;return()=>{var q;if(C||!r.autosize)return;((q=h.value)==null?void 0:q.offsetParent)===null||(f(),C=!0)}})(Q),ee=()=>{const f=F.value,C=r.formatter?r.formatter(k.value):k.value;!f||f.value===C||(f.value=C)},Ee=async f=>{De();let{value:C}=f.target;if(r.formatter&&r.parser&&(C=r.parser(C)),!_e.value){if(C===k.value){ee();return}o(pe,C),o(Ne,C),await t.nextTick(),ee(),He()}},$e=f=>{let{value:C}=f.target;r.formatter&&r.parser&&(C=r.parser(C)),o(Be,C)},{isComposing:_e,handleCompositionStart:Ue,handleCompositionUpdate:Ke,handleCompositionEnd:We}=It({emit:o,afterComposition:Ee}),qt=()=>{De(),T.value=!T.value,setTimeout(He)},Xt=()=>{var f;return(f=F.value)==null?void 0:f.focus()},Jt=()=>{var f;return(f=F.value)==null?void 0:f.blur()},Zt=f=>{E.value=!1,o("mouseleave",f)},Qt=f=>{E.value=!0,o("mouseenter",f)},Ye=f=>{o("keydown",f)},en=()=>{var f;(f=F.value)==null||f.select()},je=()=>{o(pe,""),o(Be,""),o("clear"),o(Ne,"")};return t.watch(()=>r.modelValue,()=>{var f;t.nextTick(()=>Q()),r.validateEvent&&((f=g==null?void 0:g.validate)==null||f.call(g,"change").catch(C=>l.debugWarn(C)))}),t.watch(k,()=>ee()),t.watch(()=>r.type,async()=>{await t.nextTick(),ee(),Q()}),t.onMounted(()=>{!r.formatter&&r.parser&&l.debugWarn(xt,"If you set the parser, you also need to set the formatter."),ee(),t.nextTick(Q)}),n({input:v,textarea:h,ref:F,textareaStyle:w,autosize:t.toRef(r,"autosize"),isComposing:_e,focus:Xt,blur:Jt,select:en,clear:je,resizeTextarea:Q}),(f,C)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(u),{[t.unref(c).bm("group","append")]:f.$slots.append,[t.unref(c).bm("group","prepend")]:f.$slots.prepend}]),style:t.normalizeStyle(t.unref(be)),onMouseenter:Qt,onMouseleave:Zt},[t.createCommentVNode(" input "),f.type!=="textarea"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createCommentVNode(" prepend slot "),f.$slots.prepend?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(c).be("group","prepend"))},[t.renderSlot(f.$slots,"prepend")],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{ref_key:"wrapperRef",ref:x,class:t.normalizeClass(t.unref(p))},[t.createCommentVNode(" prefix slot "),f.$slots.prefix||f.prefixIcon?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(t.unref(c).e("prefix"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(c).e("prefix-inner"))},[t.renderSlot(f.$slots,"prefix"),f.prefixIcon?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:0,class:t.normalizeClass(t.unref(c).e("icon"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(f.prefixIcon)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],2)],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("input",t.mergeProps({id:t.unref(m),ref_key:"input",ref:v,class:t.unref(c).e("inner")},t.unref(a),{minlength:f.minlength,maxlength:f.maxlength,type:f.showPassword?T.value?"text":"password":f.type,disabled:t.unref(y),readonly:f.readonly,autocomplete:f.autocomplete,tabindex:f.tabindex,"aria-label":f.ariaLabel,placeholder:f.placeholder,style:f.inputStyle,form:f.form,autofocus:f.autofocus,role:f.containerRole,onCompositionstart:t.unref(Ue),onCompositionupdate:t.unref(Ke),onCompositionend:t.unref(We),onInput:Ee,onChange:$e,onKeydown:Ye}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),t.createCommentVNode(" suffix slot "),t.unref(jt)?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(t.unref(c).e("suffix"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(c).e("suffix-inner"))},[!t.unref(I)||!t.unref(j)||!t.unref(G)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(f.$slots,"suffix"),f.suffixIcon?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:0,class:t.normalizeClass(t.unref(c).e("icon"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(f.suffixIcon)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],64)):t.createCommentVNode("v-if",!0),t.unref(I)?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:1,class:t.normalizeClass([t.unref(c).e("icon"),t.unref(c).e("clear")]),onMousedown:t.withModifiers(t.unref(l.NOOP),["prevent"]),onClick:je},{default:t.withCtx(()=>[t.createVNode(t.unref(l.circle_close_default))]),_:1},8,["class","onMousedown"])):t.createCommentVNode("v-if",!0),t.unref(j)?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:2,class:t.normalizeClass([t.unref(c).e("icon"),t.unref(c).e("password")]),onClick:qt},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ae))))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),t.unref(G)?(t.openBlock(),t.createElementBlock("span",{key:3,class:t.normalizeClass(t.unref(c).e("count"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(c).e("count-inner"))},t.toDisplayString(t.unref(ye))+" / "+t.toDisplayString(f.maxlength),3)],2)):t.createCommentVNode("v-if",!0),t.unref(B)&&t.unref(se)&&t.unref(H)?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:4,class:t.normalizeClass([t.unref(c).e("icon"),t.unref(c).e("validateIcon"),t.unref(c).is("loading",t.unref(B)==="validating")])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(se))))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],2)],2)):t.createCommentVNode("v-if",!0)],2),t.createCommentVNode(" append slot "),f.$slots.append?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(t.unref(c).be("group","append"))},[t.renderSlot(f.$slots,"append")],2)):t.createCommentVNode("v-if",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" textarea "),t.createElementVNode("textarea",t.mergeProps({id:t.unref(m),ref_key:"textarea",ref:h,class:[t.unref(b).e("inner"),t.unref(c).is("focus",t.unref(R))]},t.unref(a),{minlength:f.minlength,maxlength:f.maxlength,tabindex:f.tabindex,disabled:t.unref(y),readonly:f.readonly,autocomplete:f.autocomplete,style:t.unref(w),"aria-label":f.ariaLabel,placeholder:f.placeholder,form:f.form,autofocus:f.autofocus,rows:f.rows,role:f.containerRole,onCompositionstart:t.unref(Ue),onCompositionupdate:t.unref(Ke),onCompositionend:t.unref(We),onInput:Ee,onFocus:t.unref(O),onBlur:t.unref(K),onChange:$e,onKeydown:Ye}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),t.unref(G)?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(L.value),class:t.normalizeClass(t.unref(c).e("count"))},t.toDisplayString(t.unref(ye))+" / "+t.toDisplayString(f.maxlength),7)):t.createCommentVNode("v-if",!0)],64))],38))}});var An=l._export_sfc(Mn,[["__file","input.vue"]]);const Mt=l.withInstall(An),Ce="focus-trap.focus-after-trapped",we="focus-trap.focus-after-released",Vn="focus-trap.focusout-prevented",Qe={cancelable:!0,bubbles:!1},Fn={cancelable:!0,bubbles:!1},et="focusAfterTrapped",tt="focusAfterReleased",At=Symbol("elFocusTrap"),Pe=t.ref(),ge=t.ref(0),Oe=t.ref(0);let le=0;const Vt=e=>{const n=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)n.push(o.currentNode);return n},nt=(e,n)=>{for(const o of e)if(!Rn(o,n))return o},Rn=(e,n)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Ln=e=>{const n=Vt(e),o=nt(n,e),r=nt(n.reverse(),e);return[o,r]},Pn=e=>e instanceof HTMLInputElement&&"select"in e,D=(e,n)=>{if(e&&e.focus){const o=document.activeElement;let r=!1;l.isElement(e)&&!he(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),r=!0),e.focus({preventScroll:!0}),Oe.value=window.performance.now(),e!==o&&Pn(e)&&n&&e.select(),l.isElement(e)&&r&&e.removeAttribute("tabindex")}};function ot(e,n){const o=[...e],r=e.indexOf(n);return r!==-1&&o.splice(r,1),o}const On=()=>{let e=[];return{push:r=>{const s=e[0];s&&r!==s&&s.pause(),e=ot(e,r),e.unshift(r)},remove:r=>{var s,a;e=ot(e,r),(a=(s=e[0])==null?void 0:s.resume)==null||a.call(s)}}},zn=(e,n=!1)=>{const o=document.activeElement;for(const r of e)if(D(r,n),document.activeElement!==o)return},rt=On(),Dn=()=>ge.value>Oe.value,ue=()=>{Pe.value="pointer",ge.value=window.performance.now()},st=()=>{Pe.value="keyboard",ge.value=window.performance.now()},Hn=()=>(t.onMounted(()=>{le===0&&(document.addEventListener("mousedown",ue),document.addEventListener("touchstart",ue),document.addEventListener("keydown",st)),le++}),t.onBeforeUnmount(()=>{le--,le<=0&&(document.removeEventListener("mousedown",ue),document.removeEventListener("touchstart",ue),document.removeEventListener("keydown",st))}),{focusReason:Pe,lastUserFocusTimestamp:ge,lastAutomatedFocusTimestamp:Oe}),ce=e=>new CustomEvent(Vn,{...Fn,detail:e});let X=[];const at=e=>{e.code===l.EVENT_CODE.esc&&X.forEach(n=>n(e))},$n=e=>{t.onMounted(()=>{X.length===0&&document.addEventListener("keydown",at),l.isClient&&X.push(e)}),t.onBeforeUnmount(()=>{X=X.filter(n=>n!==e),X.length===0&&l.isClient&&document.removeEventListener("keydown",at)})},_n=t.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[et,tt,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const o=t.ref();let r,s;const{focusReason:a}=Hn();$n(c=>{e.trapped&&!i.paused&&n("release-requested",c)});const i={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},u=c=>{if(!e.loop&&!e.trapped||i.paused)return;const{code:b,altKey:v,ctrlKey:h,metaKey:E,currentTarget:T,shiftKey:L}=c,{loop:V}=e,F=b===l.EVENT_CODE.tab&&!v&&!h&&!E,x=document.activeElement;if(F&&x){const R=T,[O,K]=Ln(R);if(O&&K){if(!L&&x===K){const B=ce({focusReason:a.value});n("focusout-prevented",B),B.defaultPrevented||(c.preventDefault(),V&&D(O,!0))}else if(L&&[O,R].includes(x)){const B=ce({focusReason:a.value});n("focusout-prevented",B),B.defaultPrevented||(c.preventDefault(),V&&D(K,!0))}}else if(x===R){const B=ce({focusReason:a.value});n("focusout-prevented",B),B.defaultPrevented||c.preventDefault()}}};t.provide(At,{focusTrapRef:o,onKeydown:u}),t.watch(()=>e.focusTrapEl,c=>{c&&(o.value=c)},{immediate:!0}),t.watch([o],([c],[b])=>{c&&(c.addEventListener("keydown",u),c.addEventListener("focusin",g),c.addEventListener("focusout",m)),b&&(b.removeEventListener("keydown",u),b.removeEventListener("focusin",g),b.removeEventListener("focusout",m))});const p=c=>{n(et,c)},d=c=>n(tt,c),g=c=>{const b=t.unref(o);if(!b)return;const v=c.target,h=c.relatedTarget,E=v&&b.contains(v);e.trapped||h&&b.contains(h)||(r=h),E&&n("focusin",c),!i.paused&&e.trapped&&(E?s=v:D(s,!0))},m=c=>{const b=t.unref(o);if(!(i.paused||!b))if(e.trapped){const v=c.relatedTarget;!l.isNil(v)&&!b.contains(v)&&setTimeout(()=>{if(!i.paused&&e.trapped){const h=ce({focusReason:a.value});n("focusout-prevented",h),h.defaultPrevented||D(s,!0)}},0)}else{const v=c.target;v&&b.contains(v)||n("focusout",c)}};async function S(){await t.nextTick();const c=t.unref(o);if(c){rt.push(i);const b=c.contains(document.activeElement)?r:document.activeElement;if(r=b,!c.contains(b)){const h=new Event(Ce,Qe);c.addEventListener(Ce,p),c.dispatchEvent(h),h.defaultPrevented||t.nextTick(()=>{let E=e.focusStartEl;l.isString(E)||(D(E),document.activeElement!==E&&(E="first")),E==="first"&&zn(Vt(c),!0),(document.activeElement===b||E==="container")&&D(c)})}}}function y(){const c=t.unref(o);if(c){c.removeEventListener(Ce,p);const b=new CustomEvent(we,{...Qe,detail:{focusReason:a.value}});c.addEventListener(we,d),c.dispatchEvent(b),!b.defaultPrevented&&(a.value=="keyboard"||!Dn()||c.contains(document.activeElement))&&D(r??document.body),c.removeEventListener(we,d),rt.remove(i)}}return t.onMounted(()=>{e.trapped&&S(),t.watch(()=>e.trapped,c=>{c?S():y()})}),t.onBeforeUnmount(()=>{e.trapped&&y(),o.value&&(o.value.removeEventListener("keydown",u),o.value.removeEventListener("focusin",g),o.value.removeEventListener("focusout",m),o.value=void 0)}),{onKeydown:u}}});function Un(e,n,o,r,s,a){return t.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ft=l._export_sfc(_n,[["render",Un],["__file","focus-trap.vue"]]);const Rt=Symbol("buttonGroupContextKey"),Lt=({from:e,replacement:n,scope:o,version:r,ref:s,type:a="API"},i)=>{t.watch(()=>t.unref(i),u=>{u&&l.debugWarn(o,`[${a}] ${e} is about to be deprecated in version ${r}, please use ${n} instead.
|
|
6
|
+
For more detail, please visit: ${s}
|
|
7
|
+
`)},{immediate:!0})},Kn=(e,n)=>{Lt({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},t.computed(()=>e.type==="text"));const o=t.inject(Rt,void 0),r=l.useGlobalConfig("button"),{form:s}=Re(),a=Le(t.computed(()=>o==null?void 0:o.size)),i=re(),u=t.ref(),p=t.useSlots(),d=t.computed(()=>{var v;return e.type||(o==null?void 0:o.type)||((v=r.value)==null?void 0:v.type)||""}),g=t.computed(()=>{var v,h,E;return(E=(h=e.autoInsertSpace)!=null?h:(v=r.value)==null?void 0:v.autoInsertSpace)!=null?E:!1}),m=t.computed(()=>{var v,h,E;return(E=(h=e.plain)!=null?h:(v=r.value)==null?void 0:v.plain)!=null?E:!1}),S=t.computed(()=>{var v,h,E;return(E=(h=e.round)!=null?h:(v=r.value)==null?void 0:v.round)!=null?E:!1}),y=t.computed(()=>e.tag==="button"?{ariaDisabled:i.value||e.loading,disabled:i.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),c=t.computed(()=>{var v;const h=(v=p.default)==null?void 0:v.call(p);if(g.value&&(h==null?void 0:h.length)===1){const E=h[0];if((E==null?void 0:E.type)===t.Text){const T=E.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(T.trim())}}return!1});return{_disabled:i,_size:a,_type:d,_ref:u,_props:y,_plain:m,_round:S,shouldAddSpace:c,handleClick:v=>{if(i.value||e.loading){v.stopPropagation();return}e.nativeType==="reset"&&(s==null||s.resetFields()),n("click",v)}}},Pt=["default","primary","success","warning","info","danger","text",""],Wn=["button","submit","reset"],xe=l.buildProps({size:l.useSizeProp,disabled:Boolean,type:{type:String,values:Pt,default:""},icon:{type:l.iconPropType},nativeType:{type:String,values:Wn,default:"button"},loading:Boolean,loadingIcon:{type:l.iconPropType,default:()=>l.loading_default},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:l.definePropType([String,Object]),default:"button"}}),Yn={click:e=>e instanceof MouseEvent};function N(e,n){jn(e)&&(e="100%");var o=Gn(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function de(e){return Math.min(1,Math.max(0,e))}function jn(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Gn(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Ot(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fe(e){return e<=1?"".concat(Number(e)*100,"%"):e}function W(e){return e.length===1?"0"+e:String(e)}function qn(e,n,o){return{r:N(e,255)*255,g:N(n,255)*255,b:N(o,255)*255}}function it(e,n,o){e=N(e,255),n=N(n,255),o=N(o,255);var r=Math.max(e,n,o),s=Math.min(e,n,o),a=0,i=0,u=(r+s)/2;if(r===s)i=0,a=0;else{var p=r-s;switch(i=u>.5?p/(2-r-s):p/(r+s),r){case e:a=(n-o)/p+(n<o?6:0);break;case n:a=(o-e)/p+2;break;case o:a=(e-n)/p+4;break}a/=6}return{h:a,s:i,l:u}}function Se(e,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*(6*o):o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e}function Xn(e,n,o){var r,s,a;if(e=N(e,360),n=N(n,100),o=N(o,100),n===0)s=o,a=o,r=o;else{var i=o<.5?o*(1+n):o+n-o*n,u=2*o-i;r=Se(u,i,e+1/3),s=Se(u,i,e),a=Se(u,i,e-1/3)}return{r:r*255,g:s*255,b:a*255}}function lt(e,n,o){e=N(e,255),n=N(n,255),o=N(o,255);var r=Math.max(e,n,o),s=Math.min(e,n,o),a=0,i=r,u=r-s,p=r===0?0:u/r;if(r===s)a=0;else{switch(r){case e:a=(n-o)/u+(n<o?6:0);break;case n:a=(o-e)/u+2;break;case o:a=(e-n)/u+4;break}a/=6}return{h:a,s:p,v:i}}function Jn(e,n,o){e=N(e,360)*6,n=N(n,100),o=N(o,100);var r=Math.floor(e),s=e-r,a=o*(1-n),i=o*(1-s*n),u=o*(1-(1-s)*n),p=r%6,d=[o,i,a,a,u,o][p],g=[u,o,o,i,a,a][p],m=[a,a,u,o,o,i][p];return{r:d*255,g:g*255,b:m*255}}function ut(e,n,o,r){var s=[W(Math.round(e).toString(16)),W(Math.round(n).toString(16)),W(Math.round(o).toString(16))];return r&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function Zn(e,n,o,r,s){var a=[W(Math.round(e).toString(16)),W(Math.round(n).toString(16)),W(Math.round(o).toString(16)),W(Qn(r))];return s&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Qn(e){return Math.round(parseFloat(e)*255).toString(16)}function ct(e){return A(e)/255}function A(e){return parseInt(e,16)}function eo(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Me={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function to(e){var n={r:0,g:0,b:0},o=1,r=null,s=null,a=null,i=!1,u=!1;return typeof e=="string"&&(e=ro(e)),typeof e=="object"&&(z(e.r)&&z(e.g)&&z(e.b)?(n=qn(e.r,e.g,e.b),i=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):z(e.h)&&z(e.s)&&z(e.v)?(r=fe(e.s),s=fe(e.v),n=Jn(e.h,r,s),i=!0,u="hsv"):z(e.h)&&z(e.s)&&z(e.l)&&(r=fe(e.s),a=fe(e.l),n=Xn(e.h,r,a),i=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Ot(o),{ok:i,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var no="[-\\+]?\\d+%?",oo="[-\\+]?\\d*\\.\\d+%?",U="(?:".concat(oo,")|(?:").concat(no,")"),ke="[\\s|\\(]+(".concat(U,")[,|\\s]+(").concat(U,")[,|\\s]+(").concat(U,")\\s*\\)?"),Te="[\\s|\\(]+(".concat(U,")[,|\\s]+(").concat(U,")[,|\\s]+(").concat(U,")[,|\\s]+(").concat(U,")\\s*\\)?"),P={CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+ke),rgba:new RegExp("rgba"+Te),hsl:new RegExp("hsl"+ke),hsla:new RegExp("hsla"+Te),hsv:new RegExp("hsv"+ke),hsva:new RegExp("hsva"+Te),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ro(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(Me[e])e=Me[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=P.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=P.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=P.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=P.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=P.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=P.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=P.hex8.exec(e),o?{r:A(o[1]),g:A(o[2]),b:A(o[3]),a:ct(o[4]),format:n?"name":"hex8"}:(o=P.hex6.exec(e),o?{r:A(o[1]),g:A(o[2]),b:A(o[3]),format:n?"name":"hex"}:(o=P.hex4.exec(e),o?{r:A(o[1]+o[1]),g:A(o[2]+o[2]),b:A(o[3]+o[3]),a:ct(o[4]+o[4]),format:n?"name":"hex8"}:(o=P.hex3.exec(e),o?{r:A(o[1]+o[1]),g:A(o[2]+o[2]),b:A(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function z(e){return!!P.CSS_UNIT.exec(String(e))}var zt=function(){function e(n,o){n===void 0&&(n=""),o===void 0&&(o={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=eo(n)),this.originalInput=n;var s=to(n);this.originalInput=n,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:s.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),o,r,s,a=n.r/255,i=n.g/255,u=n.b/255;return a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),u<=.03928?s=u/12.92:s=Math.pow((u+.055)/1.055,2.4),.2126*o+.7152*r+.0722*s},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=Ot(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=lt(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=lt(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),s=Math.round(n.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(s,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(s,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=it(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=it(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),s=Math.round(n.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(s,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(s,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),ut(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),Zn(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(o,", ").concat(r,")"):"rgba(".concat(n,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(o){return"".concat(Math.round(N(o,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(o){return Math.round(N(o,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+ut(this.r,this.g,this.b,!1),o=0,r=Object.entries(Me);o<r.length;o++){var s=r[o],a=s[0],i=s[1];if(n===i)return a}return!1},e.prototype.toString=function(n){var o=!!n;n=n??this.format;var r=!1,s=this.a<1&&this.a>=0,a=!o&&s&&(n.startsWith("hex")||n==="name");return a?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l+=n/100,o.l=de(o.l),new e(o)},e.prototype.brighten=function(n){n===void 0&&(n=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(n/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(n/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(n/100)))),new e(o)},e.prototype.darken=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l-=n/100,o.l=de(o.l),new e(o)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s-=n/100,o.s=de(o.s),new e(o)},e.prototype.saturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s+=n/100,o.s=de(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var o=this.toHsl(),r=(o.h+n)%360;return o.h=r<0?360+r:r,new e(o)},e.prototype.mix=function(n,o){o===void 0&&(o=50);var r=this.toRgb(),s=new e(n).toRgb(),a=o/100,i={r:(s.r-r.r)*a+r.r,g:(s.g-r.g)*a+r.g,b:(s.b-r.b)*a+r.b,a:(s.a-r.a)*a+r.a};return new e(i)},e.prototype.analogous=function(n,o){n===void 0&&(n=6),o===void 0&&(o=30);var r=this.toHsl(),s=360/o,a=[this];for(r.h=(r.h-(s*n>>1)+720)%360;--n;)r.h=(r.h+s)%360,a.push(new e(r));return a},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var o=this.toHsv(),r=o.h,s=o.s,a=o.v,i=[],u=1/n;n--;)i.push(new e({h:r,s,v:a})),a=(a+u)%1;return i},e.prototype.splitcomplement=function(){var n=this.toHsl(),o=n.h;return[this,new e({h:(o+72)%360,s:n.s,l:n.l}),new e({h:(o+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var o=this.toRgb(),r=new e(n).toRgb(),s=o.a+r.a*(1-o.a);return new e({r:(o.r*o.a+r.r*r.a*(1-o.a))/s,g:(o.g*o.a+r.g*r.a*(1-o.a))/s,b:(o.b*o.a+r.b*r.a*(1-o.a))/s,a:s})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var o=this.toHsl(),r=o.h,s=[this],a=360/n,i=1;i<n;i++)s.push(new e({h:(r+i*a)%360,s:o.s,l:o.l}));return s},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}();function $(e,n=20){return e.mix("#141414",n).toString()}function so(e){const n=re(),o=l.useNamespace("button");return t.computed(()=>{let r={},s=e.color;if(s){const a=s.match(/var\((.*?)\)/);a&&(s=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const i=new zt(s),u=e.dark?i.tint(20).toString():$(i,20);if(e.plain)r=o.cssVarBlock({"bg-color":e.dark?$(i,90):i.tint(90).toString(),"text-color":s,"border-color":e.dark?$(i,50):i.tint(50).toString(),"hover-text-color":`var(${o.cssVarName("color-white")})`,"hover-bg-color":s,"hover-border-color":s,"active-bg-color":u,"active-text-color":`var(${o.cssVarName("color-white")})`,"active-border-color":u}),n.value&&(r[o.cssVarBlockName("disabled-bg-color")]=e.dark?$(i,90):i.tint(90).toString(),r[o.cssVarBlockName("disabled-text-color")]=e.dark?$(i,50):i.tint(50).toString(),r[o.cssVarBlockName("disabled-border-color")]=e.dark?$(i,80):i.tint(80).toString());else{const p=e.dark?$(i,30):i.tint(30).toString(),d=i.isDark()?`var(${o.cssVarName("color-white")})`:`var(${o.cssVarName("color-black")})`;if(r=o.cssVarBlock({"bg-color":s,"text-color":d,"border-color":s,"hover-bg-color":p,"hover-text-color":d,"hover-border-color":p,"active-bg-color":u,"active-border-color":u}),n.value){const g=e.dark?$(i,50):i.tint(50).toString();r[o.cssVarBlockName("disabled-bg-color")]=g,r[o.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${o.cssVarName("color-white")})`,r[o.cssVarBlockName("disabled-border-color")]=g}}}return r})}const ao=t.defineComponent({name:"ElButton"}),io=t.defineComponent({...ao,props:xe,emits:Yn,setup(e,{expose:n,emit:o}){const r=e,s=so(r),a=l.useNamespace("button"),{_ref:i,_size:u,_type:p,_disabled:d,_props:g,_plain:m,_round:S,shouldAddSpace:y,handleClick:c}=Kn(r,o),b=t.computed(()=>[a.b(),a.m(p.value),a.m(u.value),a.is("disabled",d.value),a.is("loading",r.loading),a.is("plain",m.value),a.is("round",S.value),a.is("circle",r.circle),a.is("text",r.text),a.is("link",r.link),a.is("has-bg",r.bg)]);return n({ref:i,size:u,type:p,disabled:d,shouldAddSpace:y}),(v,h)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(v.tag),t.mergeProps({ref_key:"_ref",ref:i},t.unref(g),{class:t.unref(b),style:t.unref(s),onClick:t.unref(c)}),{default:t.withCtx(()=>[v.loading?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[v.$slots.loading?t.renderSlot(v.$slots,"loading",{key:0}):(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:1,class:t.normalizeClass(t.unref(a).is("loading"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(v.loadingIcon)))]),_:1},8,["class"]))],64)):v.icon||v.$slots.icon?(t.openBlock(),t.createBlock(t.unref(l.ElIcon),{key:1},{default:t.withCtx(()=>[v.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(v.icon),{key:0})):t.renderSlot(v.$slots,"icon",{key:1})]),_:3})):t.createCommentVNode("v-if",!0),v.$slots.default?(t.openBlock(),t.createElementBlock("span",{key:2,class:t.normalizeClass({[t.unref(a).em("text","expand")]:t.unref(y)})},[t.renderSlot(v.$slots,"default")],2)):t.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var lo=l._export_sfc(io,[["__file","button.vue"]]);const uo={size:xe.size,type:xe.type},co=t.defineComponent({name:"ElButtonGroup"}),fo=t.defineComponent({...co,props:uo,setup(e){const n=e;t.provide(Rt,t.reactive({size:t.toRef(n,"size"),type:t.toRef(n,"type")}));const o=l.useNamespace("button");return(r,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(o).b("group"))},[t.renderSlot(r.$slots,"default")],2))}});var Dt=l._export_sfc(fo,[["__file","button-group.vue"]]);const Ht=l.withInstall(lo,{ButtonGroup:Dt}),po=l.withNoopInstall(Dt),vo="utils/vue/vnode";var ne=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(ne||{});function $t(e){return t.isVNode(e)&&e.type===t.Fragment}function mo(e){return t.isVNode(e)&&e.type===t.Comment}function ho(e){return t.isVNode(e)&&!$t(e)&&!mo(e)}const go=e=>{if(!t.isVNode(e))return l.debugWarn(vo,"[getNormalizedProps] must be a VNode"),{};const n=e.props||{},o=(t.isVNode(e.type)?e.type.props:void 0)||{},r={};return Object.keys(o).forEach(s=>{l.hasOwn(o[s],"default")&&(r[s]=o[s].default)}),Object.keys(n).forEach(s=>{r[l.camelize(s)]=n[s]}),r},bo=e=>{if(!l.isArray$1(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},te=e=>{const n=l.isArray$1(e)?e:[e],o=[];return n.forEach(r=>{var s;l.isArray$1(r)?o.push(...te(r)):t.isVNode(r)&&((s=r.component)!=null&&s.subTree)?o.push(r,...te(r.component.subTree)):t.isVNode(r)&&l.isArray$1(r.children)?o.push(...te(r.children)):t.isVNode(r)&&r.shapeFlag===2?o.push(...te(r.type())):o.push(r)}),o},ze=e=>{if(!e)return{onClick:l.NOOP,onMousedown:l.NOOP,onMouseup:l.NOOP};let n=!1,o=!1;return{onClick:i=>{n&&o&&e(i),n=o=!1},onMousedown:i=>{n=i.target===i.currentTarget},onMouseup:i=>{o=i.target===i.currentTarget}}},yo=l.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:l.definePropType([String,Array,Object])},zIndex:{type:l.definePropType([String,Number])}}),Eo={click:e=>e instanceof MouseEvent},Co="overlay";var wo=t.defineComponent({name:"ElOverlay",props:yo,emits:Eo,setup(e,{slots:n,emit:o}){const r=l.useNamespace(Co),s=p=>{o("click",p)},{onClick:a,onMousedown:i,onMouseup:u}=ze(e.customMaskEvent?void 0:s);return()=>e.mask?t.createVNode("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:a,onMousedown:i,onMouseup:u},[t.renderSlot(n,"default")],ne.STYLE|ne.CLASS|ne.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(n,"default")])}});const _t=wo,Ut=(e,n,o,r)=>{const s={offsetX:0,offsetY:0},a=(m,S)=>{if(e.value){const{offsetX:y,offsetY:c}=s,b=e.value.getBoundingClientRect(),v=b.left,h=b.top,E=b.width,T=b.height,L=document.documentElement.clientWidth,V=document.documentElement.clientHeight,F=-v+y,x=-h+c,R=L-v-E+y,O=V-h-(T<V?T:0)+c;r!=null&&r.value||(m=Math.min(Math.max(m,F),R),S=Math.min(Math.max(S,x),O)),s.offsetX=m,s.offsetY=S,e.value.style.transform=`translate(${l.addUnit(m)}, ${l.addUnit(S)})`}},i=m=>{const S=m.clientX,y=m.clientY,{offsetX:c,offsetY:b}=s,v=E=>{const T=c+E.clientX-S,L=b+E.clientY-y;a(T,L)},h=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",h)},u=()=>{n.value&&e.value&&(n.value.addEventListener("mousedown",i),window.addEventListener("resize",g))},p=()=>{n.value&&e.value&&(n.value.removeEventListener("mousedown",i),window.removeEventListener("resize",g))},d=()=>{s.offsetX=0,s.offsetY=0,e.value&&(e.value.style.transform="")},g=()=>{const{offsetX:m,offsetY:S}=s;a(m,S)};return t.onMounted(()=>{t.watchEffect(()=>{o.value?u():p()})}),t.onBeforeUnmount(()=>{p()}),{resetPosition:d,updatePosition:g}},Kt=(e,n={})=>{t.isRef(e)||l.throwError("[useLockscreen]","You need to pass a ref param to this function");const o=n.ns||l.useNamespace("popup"),r=t.computed(()=>o.bm("parent","hidden"));if(!l.isClient||l.hasClass(document.body,r.value))return;let s=0,a=!1,i="0";const u=()=>{setTimeout(()=>{typeof document>"u"||a&&document&&(document.body.style.width=i,l.removeClass(document.body,r.value))},200)};t.watch(e,p=>{if(!p){u();return}a=!l.hasClass(document.body,r.value),a&&(i=document.body.style.width,l.addClass(document.body,r.value)),s=bt(o.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,g=l.getStyle(document.body,"overflowY");s>0&&(d||g==="scroll")&&a&&(document.body.style.width=`calc(100% - ${s}px)`)}),t.onScopeDispose(()=>u())},Wt=e=>["",...l.componentSizes].includes(e),Ae="_trap-focus-children",Y=[],dt=e=>{var n;if(Y.length===0)return;const o=Y[Y.length-1][Ae];if(o.length>0&&e.code===l.EVENT_CODE.tab){if(o.length===1){e.preventDefault(),document.activeElement!==o[0]&&o[0].focus();return}const r=e.shiftKey,s=e.target===o[0],a=e.target===o[o.length-1];if(s&&r&&(e.preventDefault(),o[o.length-1].focus()),a&&!r&&(e.preventDefault(),o[0].focus()),process.env.NODE_ENV==="test"){const i=o.indexOf(e.target);i!==-1&&((n=o[r?i-1:i+1])==null||n.focus())}}},So={beforeMount(e){e[Ae]=Ze(e),Y.push(e),Y.length<=1&&document.addEventListener("keydown",dt)},updated(e){t.nextTick(()=>{e[Ae]=Ze(e)})},unmounted(){Y.shift(),Y.length===0&&document.removeEventListener("keydown",dt)}},ko=t.defineComponent({name:"ElMessageBox",directives:{TrapFocus:So},components:{ElButton:Ht,ElFocusTrap:Ft,ElInput:Mt,ElOverlay:_t,ElIcon:l.ElIcon,...l.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Wt},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:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:n}){const{locale:o,zIndex:r,ns:s,size:a}=l.useGlobalComponentSettings("message-box",t.computed(()=>e.buttonSize)),{t:i}=o,{nextZIndex:u}=r,p=t.ref(!1),d=t.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:t.markRaw(l.loading_default),cancelButtonLoadingIcon:t.markRaw(l.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:u()}),g=t.computed(()=>{const w=d.type;return{[s.bm("icon",w)]:w&&l.TypeComponentsMap[w]}}),m=ve(),S=ve(),y=t.computed(()=>{const w=d.type;return d.icon||w&&l.TypeComponentsMap[w]||""}),c=t.computed(()=>!!d.message),b=t.ref(),v=t.ref(),h=t.ref(),E=t.ref(),T=t.ref(),L=t.computed(()=>d.confirmButtonClass);t.watch(()=>d.inputValue,async w=>{await t.nextTick(),e.boxType==="prompt"&&w&&B()},{immediate:!0}),t.watch(()=>p.value,w=>{var k,I;w&&(e.boxType!=="prompt"&&(d.autofocus?h.value=(I=(k=T.value)==null?void 0:k.$el)!=null?I:b.value:h.value=b.value),d.zIndex=u()),e.boxType==="prompt"&&(w?t.nextTick().then(()=>{var j;E.value&&E.value.$el&&(d.autofocus?h.value=(j=se())!=null?j:b.value:h.value=b.value)}):(d.editorErrorMessage="",d.validateError=!1))});const V=t.computed(()=>e.draggable),F=t.computed(()=>e.overflow);Ut(b,v,V,F),t.onMounted(async()=>{await t.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",x)}),t.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",x)});function x(){p.value&&(p.value=!1,t.nextTick(()=>{d.action&&n("action",d.action)}))}const R=()=>{e.closeOnClickModal&&H(d.distinguishCancelAndClose?"close":"cancel")},O=ze(R),K=w=>{if(d.inputType!=="textarea")return w.preventDefault(),H("confirm")},H=w=>{var k;e.boxType==="prompt"&&w==="confirm"&&!B()||(d.action=w,d.beforeClose?(k=d.beforeClose)==null||k.call(d,w,d,x):x())},B=()=>{if(e.boxType==="prompt"){const w=d.inputPattern;if(w&&!w.test(d.inputValue||""))return d.editorErrorMessage=d.inputErrorMessage||i("el.messagebox.error"),d.validateError=!0,!1;const k=d.inputValidator;if(l.isFunction(k)){const I=k(d.inputValue);if(I===!1)return d.editorErrorMessage=d.inputErrorMessage||i("el.messagebox.error"),d.validateError=!0,!1;if(l.isString(I))return d.editorErrorMessage=I,d.validateError=!0,!1}}return d.editorErrorMessage="",d.validateError=!1,!0},se=()=>{var w,k;const I=(w=E.value)==null?void 0:w.$refs;return(k=I==null?void 0:I.input)!=null?k:I==null?void 0:I.textarea},ae=()=>{H("close")},be=()=>{e.closeOnPressEscape&&ae()};return e.lockScroll&&Kt(p),{...t.toRefs(d),ns:s,overlayEvent:O,visible:p,hasMessage:c,typeClass:g,contentId:m,inputId:S,btnSize:a,iconComponent:y,confirmButtonClasses:L,rootRef:b,focusStartRef:h,headerRef:v,inputRef:E,confirmRef:T,doClose:x,handleClose:ae,onCloseRequested:be,handleWrapperClick:R,handleInputEnter:K,handleAction:H,t:i}}});function To(e,n,o,r,s,a){const i=t.resolveComponent("el-icon"),u=t.resolveComponent("el-input"),p=t.resolveComponent("el-button"),d=t.resolveComponent("el-focus-trap"),g=t.resolveComponent("el-overlay");return t.openBlock(),t.createBlock(t.Transition,{name:"fade-in-linear",onAfterLeave:m=>e.$emit("vanish"),persisted:""},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(g,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:t.withCtx(()=>[t.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:t.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[t.createVNode(d,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:t.withCtx(()=>[t.createElementVNode("div",{ref:"rootRef",class:t.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:t.normalizeStyle(e.customStyle),tabindex:"-1",onClick:t.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"headerRef",class:t.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(t.openBlock(),t.createBlock(i,{key:0,class:t.normalizeClass([e.ns.e("status"),e.typeClass])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",null,t.toDisplayString(e.title),1)],2),e.showClose?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:t.withKeys(t.withModifiers(m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[t.createVNode(i,{class:t.normalizeClass(e.ns.e("close"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):t.createCommentVNode("v-if",!0)],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{id:e.contentId,class:t.normalizeClass(e.ns.e("content"))},[t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(t.openBlock(),t.createBlock(i,{key:0,class:t.normalizeClass([e.ns.e("status"),e.typeClass])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),e.hasMessage?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.ns.e("message"))},[t.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):t.createCommentVNode("v-if",!0)],2),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("input"))},[t.createVNode(u,{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:t.normalizeClass({invalid:e.validateError}),onKeydown:t.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("errormsg")),style:t.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},t.toDisplayString(e.editorErrorMessage),7)],2),[[t.vShow,e.showInput]])],10,["id"]),t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(t.openBlock(),t.createBlock(p,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:t.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:m=>e.handleAction("cancel"),onKeydown:t.withKeys(t.withModifiers(m=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):t.createCommentVNode("v-if",!0),t.withDirectives(t.createVNode(p,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:t.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:m=>e.handleAction("confirm"),onKeydown:t.withKeys(t.withModifiers(m=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[t.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"]),[[t.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var Bo=l._export_sfc(ko,[["render",To],["__file","index.vue"]]);const oe=new Map,No=e=>{let n=document.body;return e.appendTo&&(l.isString(e.appendTo)&&(n=document.querySelector(e.appendTo)),l.isElement(e.appendTo)&&(n=e.appendTo),l.isElement(n)||(l.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),n=document.body)),n},Io=(e,n,o=null)=>{const r=t.createVNode(Bo,e,l.isFunction(e.message)||t.isVNode(e.message)?{default:l.isFunction(e.message)?e.message:()=>e.message}:null);return r.appContext=o,t.render(r,n),No(e).appendChild(n.firstElementChild),r.component},xo=()=>document.createElement("div"),Mo=(e,n)=>{const o=xo();e.onVanish=()=>{t.render(null,o),oe.delete(s)},e.onAction=a=>{const i=oe.get(s);let u;e.showInput?u={value:s.inputValue,action:a}:u=a,e.callback?e.callback(u,r.proxy):a==="cancel"||a==="close"?e.distinguishCancelAndClose&&a!=="cancel"?i.reject("close"):i.reject("cancel"):i.resolve(u)};const r=Io(e,o,n),s=r.proxy;for(const a in e)l.hasOwn(e,a)&&!l.hasOwn(s.$props,a)&&(a==="closeIcon"&&l.isObject$1(e[a])?s[a]=t.markRaw(e[a]):s[a]=e[a]);return s.visible=!0,s};function Z(e,n=null){if(!l.isClient)return Promise.reject();let o;return l.isString(e)||t.isVNode(e)?e={message:e}:o=e.callback,new Promise((r,s)=>{const a=Mo(e,n??Z._context);oe.set(a,{options:e,callback:o,resolve:r,reject:s})})}const Ao=["alert","confirm","prompt"],Vo={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Ao.forEach(e=>{Z[e]=Fo(e)});function Fo(e){return(n,o,r,s)=>{let a="";return l.isObject$1(o)?(r=o,a=""):l.isUndefined(o)?a="":a=o,Z(Object.assign({title:a,message:n,type:"",...Vo[e]},r,{boxType:e}),s)}}Z.close=()=>{oe.forEach((e,n)=>{n.doClose()}),oe.clear()};Z._context=null;const _=Z;_.install=e=>{_._context=e._context,e.config.globalProperties.$msgbox=_,e.config.globalProperties.$messageBox=_,e.config.globalProperties.$alert=_.alert,e.config.globalProperties.$confirm=_.confirm,e.config.globalProperties.$prompt=_.prompt};const Ro=_;exports.CHANGE_EVENT=Be;exports.ElButton=Ht;exports.ElButtonGroup=po;exports.ElFocusTrap=Ft;exports.ElInput=Mt;exports.ElMessageBox=Ro;exports.ElOverlay=_t;exports.FOCUS_TRAP_INJECTION_KEY=At;exports.INPUT_EVENT=Ne;exports.PatchFlags=ne;exports.TinyColor=zt;exports.UPDATE_MODEL_EVENT=pe;exports.animateScrollTo=dn;exports.baseFlatten=Ve;exports.buttonTypes=Pt;exports.cAF=gt;exports.ensureOnlyChild=bo;exports.flatRest=pt;exports.flattedChildren=te;exports.flatten=ft;exports.focusNode=Bn;exports.formContextKey=me;exports.formItemContextKey=Fe;exports.getNormalizedProps=go;exports.getScrollBarWidth=bt;exports.getScrollContainer=un;exports.getScrollElement=fn;exports.getScrollTop=pn;exports.getSibling=Tn;exports.hasIn=vt;exports.inputProps=Ct;exports.isFirefox=yt;exports.isFocusable=he;exports.isFragment=$t;exports.isLeaf=Bt;exports.isValidComponentSize=Wt;exports.isValidElementNode=ho;exports.pick=mt;exports.rAF=ht;exports.scrollIntoView=cn;exports.triggerEvent=kn;exports.tryFocus=D;exports.useAriaProps=Et;exports.useAttrs=wt;exports.useComposition=It;exports.useDeprecated=Lt;exports.useDraggable=Ut;exports.useFocusController=Nt;exports.useFormDisabled=re;exports.useFormItem=Re;exports.useFormItemInputId=kt;exports.useFormSize=Le;exports.useId=ve;exports.useIdInjection=St;exports.useLockscreen=Kt;exports.useSameTarget=ze;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { defineComponent as C, reactive as f, ref as i, onMounted as E, resolveComponent as s, createElementBlock as v, openBlock as _, createElementVNode as b, createVNode as u, withCtx as c, Fragment as w, renderList as A, createBlock as B, createTextVNode as F } from "vue";
|
|
2
|
+
import { g as I, E as g } from "./index-DjOudbez.js";
|
|
3
|
+
import { useRouter as M } from "vue-router";
|
|
4
|
+
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const T = { class: "tenant-wrap" }, $ = { class: "tenant-content" }, q = /* @__PURE__ */ C({
|
|
6
|
+
__name: "index",
|
|
7
|
+
setup(D) {
|
|
8
|
+
const n = f({
|
|
9
|
+
tenantKey: ""
|
|
10
|
+
}), K = f({
|
|
11
|
+
tenantKey: [
|
|
12
|
+
{ required: !0, message: "请选择模型", trigger: "blur" }
|
|
13
|
+
]
|
|
14
|
+
}), m = i(null), y = i([]), k = M(), x = async () => {
|
|
15
|
+
var o, t;
|
|
16
|
+
try {
|
|
17
|
+
const l = await I({
|
|
18
|
+
key: {
|
|
19
|
+
layer: "superAdmin"
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
if (l.data.code === 200) {
|
|
23
|
+
const r = (t = (o = l == null ? void 0 : l.data) == null ? void 0 : o.result) == null ? void 0 : t.flatMap((e) => e == null ? void 0 : e.key), d = r == null ? void 0 : r.map((e) => ({
|
|
24
|
+
value: e == null ? void 0 : e.systemKey,
|
|
25
|
+
label: `【${e == null ? void 0 : e.systemKey}】` + ((e == null ? void 0 : e.name) ?? "未知")
|
|
26
|
+
}));
|
|
27
|
+
y.value = [...d].sort((e, p) => e.value.localeCompare(p.value));
|
|
28
|
+
} else
|
|
29
|
+
g.error("获取模型数据响应失败");
|
|
30
|
+
} catch {
|
|
31
|
+
g.error("获取模型数据失败");
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
E(() => {
|
|
35
|
+
x();
|
|
36
|
+
});
|
|
37
|
+
const V = (o) => {
|
|
38
|
+
o == null || o.validate((t) => {
|
|
39
|
+
t && (console.log("submitForm", n), sessionStorage.setItem("tenantKey", n == null ? void 0 : n.tenantKey), k.push("/login"));
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
return (o, t) => {
|
|
43
|
+
const l = s("el-option"), r = s("el-select"), d = s("el-form-item"), e = s("el-form"), p = s("el-button");
|
|
44
|
+
return _(), v("div", T, [
|
|
45
|
+
b("div", $, [
|
|
46
|
+
t[3] || (t[3] = b("div", { class: "tenant-title" }, "租户信息", -1)),
|
|
47
|
+
u(e, {
|
|
48
|
+
model: n,
|
|
49
|
+
rules: K,
|
|
50
|
+
ref_key: "formRef",
|
|
51
|
+
ref: m
|
|
52
|
+
}, {
|
|
53
|
+
default: c(() => [
|
|
54
|
+
u(d, {
|
|
55
|
+
label: "",
|
|
56
|
+
prop: "tenantKey"
|
|
57
|
+
}, {
|
|
58
|
+
default: c(() => [
|
|
59
|
+
u(r, {
|
|
60
|
+
modelValue: n.tenantKey,
|
|
61
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => n.tenantKey = a),
|
|
62
|
+
placeholder: "请选择(可搜索查询)",
|
|
63
|
+
filterable: "",
|
|
64
|
+
clearable: ""
|
|
65
|
+
}, {
|
|
66
|
+
default: c(() => [
|
|
67
|
+
(_(!0), v(w, null, A(y.value, (a) => (_(), B(l, {
|
|
68
|
+
key: a.value,
|
|
69
|
+
label: a.label,
|
|
70
|
+
value: a.value
|
|
71
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}, 8, ["modelValue"])
|
|
75
|
+
]),
|
|
76
|
+
_: 1
|
|
77
|
+
})
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
}, 8, ["model", "rules"]),
|
|
81
|
+
u(p, {
|
|
82
|
+
type: "primary",
|
|
83
|
+
onClick: t[1] || (t[1] = (a) => V(m.value))
|
|
84
|
+
}, {
|
|
85
|
+
default: c(() => t[2] || (t[2] = [
|
|
86
|
+
F(" 确认 ")
|
|
87
|
+
])),
|
|
88
|
+
_: 1,
|
|
89
|
+
__: [2]
|
|
90
|
+
})
|
|
91
|
+
])
|
|
92
|
+
]);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}), j = /* @__PURE__ */ N(q, [["__scopeId", "data-v-5d82b8dd"]]);
|
|
96
|
+
export {
|
|
97
|
+
j as default
|
|
98
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./menu-mXKso_oG.cjs"),_=require("./index-CHt51Uuy.cjs"),r=require("./index-BlUlbXhU.cjs"),C=require("./index-9Jyf7D58.cjs"),g=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),v={class:"menu-content"},x=l.defineComponent({__name:"index",setup(q){const d=u.useMenuState(u.pinia),{menus:c}=u.storeToRefs(d),p=l.ref([]),f=async()=>{var o,t,n,a;const e=await C.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey")}});if(((o=e==null?void 0:e.data)==null?void 0:o.type)==="success"){let i=(n=(t=e==null?void 0:e.data)==null?void 0:t.result)==null?void 0:n.map(s=>s);return i=(a=u.cloneDeep(i))==null?void 0:a.map(s=>{var m;const b=Object.values((m=s==null?void 0:s.value)==null?void 0:m.tableData);return b.unshift({id:s==null?void 0:s.id}),b}),i}else return[]};l.onMounted(async()=>{var n;const e=await f(),t=[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:(n=u.cloneDeep(c.value))==null?void 0:n.map(a=>({label:a==null?void 0:a.title,value:a==null?void 0:a.title})),prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}];t.push({key:"tableContents",contents:e}),p.value=t});const y=e=>{(e==null?void 0:e.buttonName)==="新增"?r.addMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="删除"?r.deleteMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="编辑"&&r.fixMenuContent(e==null?void 0:e.singleContent)};return(e,o)=>(l.openBlock(),l.createElementBlock("div",v,[l.createVNode(_.ssTable,{itemData:p.value,class:"table-content",onChange:y},null,8,["itemData"])]))}}),h=g._export_sfc(x,[["__scopeId","data-v-26f5cadc"]]);exports.default=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("vue"),T=require("./menu-mXKso_oG.cjs"),pe=require("./modelComp-BSTM_xcV.cjs"),fe=require("./index-CHt51Uuy.cjs"),ie=require("./index-DYQ00qZi.cjs"),y=require("./index-9Jyf7D58.cjs"),de=require("./login-Boy6Y2LE.cjs"),E=pe.useModelComp(T.pinia),m=fe.useUnit(T.pinia),I=T.useMenuState(T.pinia),{menus:ee,configMenu:x,activeMenuPath:$,cacheStructures:F}=T.storeToRefs(I),_=d.ref(!1),te=d.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=T.cloneDeep(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),j=d.ref([]),q=d.ref([{label:"新建"}]),ge=d.computed(()=>[{key:"extraButton",contents:q.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:j.value}]),J=d.ref([]),k=d.ref({}),ve=d.ref({}),R=d.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),O=e=>{var t;J.value=e?(t=R.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):R.value},ye=d.ref([{label:"查询"},{label:"重置"}]),be=async()=>{},le=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:le(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),g=d.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=d.ref([]),C=d.ref({}),h=d.ref(null),ae=d.ref([]),oe=d.computed(()=>{var e;return(e=le(ee.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ne=async e=>{var l,u,n,c;const t=await y.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});ae.value=r,I.setCacheStructures({key:"contentConfig",data:r})}},he=async e=>{var t;_.value=!0,h.value={...e,rootNode:de.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?q.value.splice(0):(q.value=[{label:"新建"}],U.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await I.setConfigMenu(null),await ne(e==null?void 0:e.path),await K(e)},Ce=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},Ie=async(e,t)=>{var l,u;if(!h.value)return y.ElMessage.warning("请先选择菜单");if(g.type=Ce(e),U.value=[],E.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=T.cloneDeep(t),g.type!=="delete"){switch(g.type){case"create":O(null),await I.setConfigMenu(null);break;case"update":O(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await d.nextTick(),g.title=`【${g.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,g.show=!0}else await re(C.value,g.type)},ue=d.ref(!0),ke=async e=>{var t;k.value=e,await I.setConfigMenu({...k.value,path:(t=h.value)==null?void 0:t.path}),ue.value=(e==null?void 0:e.operateType)!=="新增"};d.watch(()=>ue.value,async e=>{var t;await d.nextTick(),J.value=(t=R.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:k.value?k.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Te=d.ref(null),Me=async(e,t)=>{var r,p,f,s,b;if(g.type==="create"){const a=(p=(r=F.value)==null?void 0:r.filter(i=>(i==null?void 0:i.key)===t))==null?void 0:p.flatMap(i=>i==null?void 0:i.data);E.setItemData(a),I.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(b=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:b.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return y.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var i;return((i=a==null?void 0:a.data)==null?void 0:i.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(i=>{var M,D,N,P,A,o,B;return{id:(N=(D=(M=i==null?void 0:i.data)==null?void 0:M.result)==null?void 0:D[0])==null?void 0:N.id,...(B=(o=(A=(P=i==null?void 0:i.data)==null?void 0:P.result)==null?void 0:A[0])==null?void 0:o.value)==null?void 0:B.pageData}});E.setItemData(a),I.setCacheStructures({key:t,data:a})}},De=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Me(C.value,t);let l;(n=k.value)!=null&&n.subMenus&&((c=k.value)==null?void 0:c.subMenus.length)>0&&(l=(r=U.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=C.value)==null?void 0:p.title}));let u;g.type==="create"?u={...k.value,path:(f=h.value)==null?void 0:f.path}:g.type==="update"&&(u=x.value),await I.setConfigMenu(u),m.setSelectTitle(l),E.setIsEdit("edit")},K=async e=>{var l,u,n,c,r,p;const t=await y.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&(j.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),_.value=!1},H=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,b;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value+"/"+((u=h.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},b=y.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=y.updateInsofDataApi):t==="delete"&&(s={id:e},b=y.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw y.ElMessage.error("保存响应失败"),new Error("保存响应失败");const i=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:i,key:l}}}catch{y.ElMessage.error("保存响应失败")}},Y=(e,t)=>{var f,s,b;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(b=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:b.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},Z=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(H(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(H(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(H(s,"update",e))})),l},Se=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},we=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),b=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await d.nextTick();const a=(n=(u=(l=F.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let i=(p=(r=(c=F.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);i=[...i,...(f=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const M=Y(b,a),D=Y(s,i),N=Z("dialogConfig",M),P=Z("contentConfig",D),A=[...N,...P];await Promise.all(A).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(v=>v.status)))return;let w=(z=o==null?void 0:o.flatMap(v=>v==null?void 0:v.data))==null?void 0:z.filter(v=>(v==null?void 0:v.id)!==null&&(v==null?void 0:v.id)!==void 0);if(((G=M==null?void 0:M.updateComps)==null?void 0:G.length)===0&&g.type==="update"){const v=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(S=>(S==null?void 0:S.key)==="dialogConfig");w=[...w,...v]}if(((Q=D==null?void 0:D.updateComps)==null?void 0:Q.length)===0&&g.type==="update"){const v=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(S=>(S==null?void 0:S.key)==="contentConfig");w=[...w,...v]}const ce=Se(w);re({...t,isNotInitial:!0,structureIds:ce},g.type)}).catch(o=>{y.ElMessage.error(o)})}catch(s){throw y.ElMessage.error(s),new Error(s)}},re=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=y.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=y.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=y.batchDeleteInsofDataApi),ie.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&j.value.push({...e,id:r}),t&&r&&y.ElMessage.success("响应成功"),K(h.value)})},Ne=async()=>{var l,u,n,c,r;const e=JSON.parse(T.cloneDeep(JSON.stringify(F.value)));await d.nextTick();const t=g.type==="create"?{...x.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...x.value,rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=C.value)==null?void 0:r.id};await we(e,t),k.value={},g.show=!1,await K(h.value)},Pe=()=>{g.show=!1},se={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},Ae=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Pe,buttonValue:ye,changeTrigger:ke,changedRow:ve,clickNodeTrigger:he,clickRowButton:Ie,clickSubmitForm:Ne,clickTrigger:De,dialogInfo:g,formatFormData:O,getInitialSubStructure:ne,getTableDataAsync:K,handleItemDataChange:be,inputForm:k,menuPageData:ge,operatingForm:Te,pageData:te,renderFormData:J,tableLoading:_,tempMenuPageData:se,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=Ae;exports.tempMenuPageData=se;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as C, reactive as k, ref as v, onMounted as D, nextTick as b, resolveComponent as i, resolveDirective as T, createElementBlock as u, openBlock as m, createVNode as t, withCtx as n, withDirectives as w, createElementVNode as p, createTextVNode as _ } from "vue";
|
|
2
|
-
import { S as x } from "./index-
|
|
3
|
-
import { s as B } from "./index-
|
|
4
|
-
import { s as F, e as y } from "./index-
|
|
5
|
-
import { u as S, p as I, s as N } from "./menu-
|
|
2
|
+
import { S as x } from "./index-Bnm7HLEv.js";
|
|
3
|
+
import { s as B } from "./index-OxYhbz5N.js";
|
|
4
|
+
import { s as F, e as y } from "./index-D0Hc5dzH.js";
|
|
5
|
+
import { u as S, p as I, s as N } from "./menu-IwkXhFha.js";
|
|
6
6
|
import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const E = { class: "menu-module" }, M = {
|
|
8
8
|
class: "table-wrap",
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { resolveComponent as L, createElementBlock as _, openBlock as r, Fragment as j, renderList as q, unref as W, createElementVNode as C, createVNode as D, toDisplayString as E, ref as I, watch as A, withCtx as z, createBlock as G, resolveDynamicComponent as H, createCommentVNode as y, normalizeStyle as X, withModifiers as w } from "vue";
|
|
2
|
-
import { s as Y, g as J } from "./index-
|
|
3
|
-
import { p as B, s as V, c as v
|
|
4
|
-
import { u as S } from "./modelComp-
|
|
5
|
-
import "./array-
|
|
2
|
+
import { s as Y, g as J } from "./index-BzdUYBQn.js";
|
|
3
|
+
import { p as B, s as V, c as v } from "./menu-IwkXhFha.js";
|
|
4
|
+
import { u as S } from "./modelComp-DSmZe2d_.js";
|
|
5
|
+
import "./array-DQv6Fq_h.js";
|
|
6
6
|
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
import
|
|
8
|
-
import { b as
|
|
9
|
-
import { E as
|
|
7
|
+
import Z from "./index-CZtXRS3l.js";
|
|
8
|
+
import { b as ee } from "./index-D0Hc5dzH.js";
|
|
9
|
+
import { E as te } from "./index-CNsfln9_.js";
|
|
10
|
+
import { E as ne } from "./index-DjOudbez.js";
|
|
10
11
|
const oe = { class: "type-select" }, se = ["onClick"], ae = { class: "list-icon" }, le = {
|
|
11
12
|
__name: "index",
|
|
12
13
|
setup(M) {
|
|
@@ -40,7 +41,7 @@ const oe = { class: "type-select" }, se = ["onClick"], ae = { class: "list-icon"
|
|
|
40
41
|
]);
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
},
|
|
44
|
+
}, be = /* @__PURE__ */ b(le, [["__scopeId", "data-v-1f87163f"]]), ce = { class: "fill-content" }, ie = { class: "operate-content" }, re = { class: "collapse-title-content" }, me = { class: "collapse-title-item" }, pe = { key: 1 }, ue = ["onClick"], de = { class: "icon-content" }, ve = {
|
|
44
45
|
key: 0,
|
|
45
46
|
class: "edit-content"
|
|
46
47
|
}, _e = ["onClick"], fe = { class: "comp-child" }, he = {
|
|
@@ -83,14 +84,14 @@ const oe = { class: "type-select" }, se = ["onClick"], ae = { class: "list-icon"
|
|
|
83
84
|
content: !1
|
|
84
85
|
})), u.setOriginalData(e), u.setItemData(e);
|
|
85
86
|
}, Q = (a) => {
|
|
86
|
-
|
|
87
|
+
te.confirm("是否确认要删除", "", {
|
|
87
88
|
confirmButtonText: "确认",
|
|
88
89
|
cancelButtonText: "取消",
|
|
89
90
|
type: "warning"
|
|
90
91
|
}).then(
|
|
91
92
|
() => {
|
|
92
93
|
const s = v(c.value), n = s == null ? void 0 : s.filter((e, t) => t !== a);
|
|
93
|
-
u.setOriginalData(n), u.setItemData(n),
|
|
94
|
+
u.setOriginalData(n), u.setItemData(n), ne({
|
|
94
95
|
type: "success",
|
|
95
96
|
message: "删除成功"
|
|
96
97
|
});
|
|
@@ -103,7 +104,7 @@ const oe = { class: "type-select" }, se = ["onClick"], ae = { class: "list-icon"
|
|
|
103
104
|
return r(), _("div", ce, [
|
|
104
105
|
s[1] || (s[1] = C("div", { class: "fill-operate" }, E("操作栏"), -1)),
|
|
105
106
|
C("div", ie, [
|
|
106
|
-
D(
|
|
107
|
+
D(Z, {
|
|
107
108
|
class: "collapse-content",
|
|
108
109
|
collapseContents: f.value
|
|
109
110
|
}, {
|
|
@@ -118,7 +119,7 @@ const oe = { class: "type-select" }, se = ["onClick"], ae = { class: "list-icon"
|
|
|
118
119
|
style: X({ marginRight: e.name && e.name !== "" ? "8px" : "0px" })
|
|
119
120
|
}, E(e.name), 5)),
|
|
120
121
|
(x = (p = l.value) == null ? void 0 : p.find((i) => i.id === t)) != null && x.content ? (r(), _("div", pe, [
|
|
121
|
-
D(
|
|
122
|
+
D(ee, {
|
|
122
123
|
modelValue: e.name,
|
|
123
124
|
"onUpdate:modelValue": (i) => e.name = i,
|
|
124
125
|
onClick: s[0] || (s[0] = w(() => {
|
|
@@ -183,7 +184,7 @@ const oe = { class: "type-select" }, se = ["onClick"], ae = { class: "list-icon"
|
|
|
183
184
|
]);
|
|
184
185
|
};
|
|
185
186
|
}
|
|
186
|
-
},
|
|
187
|
+
}, Me = /* @__PURE__ */ b(he, [["__scopeId", "data-v-27bd1564"]]), Ce = {
|
|
187
188
|
key: 0,
|
|
188
189
|
class: "show-content"
|
|
189
190
|
}, ge = { style: { display: "flex" } }, ke = {
|
|
@@ -216,9 +217,9 @@ const oe = { class: "type-select" }, se = ["onClick"], ae = { class: "list-icon"
|
|
|
216
217
|
])) : y("", !0);
|
|
217
218
|
};
|
|
218
219
|
}
|
|
219
|
-
},
|
|
220
|
+
}, Oe = /* @__PURE__ */ b(ke, [["__scopeId", "data-v-bfa22d29"]]);
|
|
220
221
|
export {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
Oe as a,
|
|
223
|
+
Me as b,
|
|
224
|
+
be as m
|
|
224
225
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./index-9Jyf7D58.cjs"),o=require("vue"),i=e=>{const t={};for(let a in e)a!=="id"&&(t[a]=e[a]);const s=t==null?void 0:t.主菜单名称;n.createInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:s},value:{tableData:t}})},l=e=>{n.deleteInsofDataApi({id:e==null?void 0:e.id})},p=e=>{const t={};for(let a in e)a!=="id"&&(t[a]=e[a]);const s=t==null?void 0:t.主菜单名称;n.updateInsofDataApi({id:e==null?void 0:e.id,key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:s},value:{tableData:t}})};o.ref([]);const r={comp:"Group",name:"/平台管理/主菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:[],prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}],name:""}]}]};exports.addMenuContent=i;exports.deleteMenuContent=l;exports.fixMenuContent=p;exports.tempMainMenuPageData=r;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ref as i, computed as j, reactive as ie, nextTick as B, watch as ye } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
import { f as
|
|
6
|
-
import {
|
|
7
|
-
|
|
2
|
+
import { c as J, s as be, u as he, p as U } from "./menu-IwkXhFha.js";
|
|
3
|
+
import { u as Ce } from "./modelComp-DSmZe2d_.js";
|
|
4
|
+
import { u as Ie } from "./index-OxYhbz5N.js";
|
|
5
|
+
import { f as ke } from "./index-D7lAlQGg.js";
|
|
6
|
+
import { g as $, E as S, bm as ae, bk as oe, bn as Te, b as Me } from "./index-DjOudbez.js";
|
|
7
|
+
import { a as Se } from "./login-Czn1jLVJ.js";
|
|
8
|
+
const F = Ce(U), ne = Ie(U), C = he(U), { menus: ue, configMenu: R, activeMenuPath: q, cacheStructures: K } = be(C), z = i(!1), se = j(() => {
|
|
8
9
|
var e, t;
|
|
9
10
|
return [
|
|
10
11
|
{
|
|
@@ -58,7 +59,7 @@ const F = ke(U), ne = Te(U), C = he(U), { menus: ue, configMenu: R, activeMenuPa
|
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
key: "tableContents",
|
|
61
|
-
contents: (t = (e =
|
|
62
|
+
contents: (t = (e = J(ue.value)) == null ? void 0 : e.map((l) => ({
|
|
62
63
|
...l,
|
|
63
64
|
menuType: "系统菜单"
|
|
64
65
|
}))) == null ? void 0 : t.filter((l) => l.title !== "系统管理" && l.title !== "平台管理")
|
|
@@ -298,7 +299,7 @@ const F = ke(U), ne = Te(U), C = he(U), { menus: ue, configMenu: R, activeMenuPa
|
|
|
298
299
|
return (e = re(ue.value)) == null ? void 0 : e.filter((t) => t.title !== "系统管理" && t.title !== "平台管理");
|
|
299
300
|
}), fe = async (e) => {
|
|
300
301
|
var l, u, n, c;
|
|
301
|
-
const t = await
|
|
302
|
+
const t = await $({
|
|
302
303
|
key: {
|
|
303
304
|
type: "subStructure",
|
|
304
305
|
systemKey: sessionStorage.getItem("systemKey"),
|
|
@@ -321,7 +322,7 @@ const F = ke(U), ne = Te(U), C = he(U), { menus: ue, configMenu: R, activeMenuPa
|
|
|
321
322
|
}
|
|
322
323
|
}, Fe = async (e) => {
|
|
323
324
|
var t;
|
|
324
|
-
|
|
325
|
+
z.value = !0, b.value = {
|
|
325
326
|
...e,
|
|
326
327
|
rootNode: Se(pe.value, e.path)
|
|
327
328
|
}, C.setCacheStructures(null), (e == null ? void 0 : e.level) === 0 ? O.value.splice(0) : (O.value = [{ label: "新建" }], V.value = (t = e == null ? void 0 : e.path) == null ? void 0 : t.split("/")), await C.setConfigMenu(null), await fe(e == null ? void 0 : e.path), await H(e);
|
|
@@ -337,7 +338,7 @@ const F = ke(U), ne = Te(U), C = he(U), { menus: ue, configMenu: R, activeMenuPa
|
|
|
337
338
|
}, Be = async (e, t) => {
|
|
338
339
|
var l, u;
|
|
339
340
|
if (!b.value) return S.warning("请先选择菜单");
|
|
340
|
-
if (g.type = Ke(e), V.value = [], F.setSubmitCurStructure(!1), ne.setSelectTitle([]), h.value =
|
|
341
|
+
if (g.type = Ke(e), V.value = [], F.setSubmitCurStructure(!1), ne.setSelectTitle([]), h.value = J(t), g.type !== "delete") {
|
|
341
342
|
switch (g.type) {
|
|
342
343
|
case "create":
|
|
343
344
|
_(null), await C.setConfigMenu(null);
|
|
@@ -379,7 +380,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
379
380
|
const l = (y = (r = e == null ? void 0 : e.structureIds) == null ? void 0 : r.filter((a) => (a == null ? void 0 : a.key) === t)) == null ? void 0 : y.map((a) => a == null ? void 0 : a.id);
|
|
380
381
|
let u = l == null ? void 0 : l.map((a) => {
|
|
381
382
|
if (a)
|
|
382
|
-
return
|
|
383
|
+
return $({ id: a });
|
|
383
384
|
});
|
|
384
385
|
const n = await Promise.all(u), c = n == null ? void 0 : n.every((a) => {
|
|
385
386
|
var d;
|
|
@@ -415,11 +416,11 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
415
416
|
} : g.type === "update" && (u = R.value), await C.setConfigMenu(u), ne.setSelectTitle(l), F.setIsEdit("edit");
|
|
416
417
|
}, H = async (e) => {
|
|
417
418
|
var l, u, n, c, s, p;
|
|
418
|
-
const t = await
|
|
419
|
+
const t = await $({
|
|
419
420
|
key: {
|
|
420
421
|
type: "menuConfigData",
|
|
421
422
|
systemKey: sessionStorage.getItem("systemKey"),
|
|
422
|
-
pageKey:
|
|
423
|
+
pageKey: q.value + "/" + (e == null ? void 0 : e.path),
|
|
423
424
|
tableId: ""
|
|
424
425
|
}
|
|
425
426
|
});
|
|
@@ -429,7 +430,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
429
430
|
id: f == null ? void 0 : f.id,
|
|
430
431
|
...(r = f == null ? void 0 : f.value) == null ? void 0 : r.tableData
|
|
431
432
|
};
|
|
432
|
-
}) : []),
|
|
433
|
+
}) : []), z.value = !1;
|
|
433
434
|
}, E = async (e, t, l = "contentConfig") => {
|
|
434
435
|
var u, n, c, s, p, f;
|
|
435
436
|
try {
|
|
@@ -437,7 +438,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
437
438
|
t === "create" ? (r = {
|
|
438
439
|
key: {
|
|
439
440
|
systemKey: sessionStorage.getItem("systemKey"),
|
|
440
|
-
pageKey:
|
|
441
|
+
pageKey: q.value + "/" + ((u = b.value) == null ? void 0 : u.path),
|
|
441
442
|
type: "structure",
|
|
442
443
|
rootNodePath: (c = (n = b.value) == null ? void 0 : n.rootNode) == null ? void 0 : c.path,
|
|
443
444
|
structureBelong: l,
|
|
@@ -463,7 +464,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
463
464
|
}
|
|
464
465
|
}, y = oe) : t === "delete" && (r = {
|
|
465
466
|
id: e
|
|
466
|
-
}, y =
|
|
467
|
+
}, y = Te);
|
|
467
468
|
const a = await y(r);
|
|
468
469
|
if (((s = a == null ? void 0 : a.data) == null ? void 0 : s.code) !== 200)
|
|
469
470
|
throw S.error("保存响应失败"), new Error("保存响应失败");
|
|
@@ -542,7 +543,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
542
543
|
key: {
|
|
543
544
|
type: "menuConfigData",
|
|
544
545
|
systemKey: sessionStorage.getItem("systemKey"),
|
|
545
|
-
pageKey:
|
|
546
|
+
pageKey: q.value + "/" + ((n = b.value) == null ? void 0 : n.path),
|
|
546
547
|
tableId: "",
|
|
547
548
|
rootNodePath: e == null ? void 0 : e.rootNodePath
|
|
548
549
|
},
|
|
@@ -562,7 +563,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
562
563
|
}
|
|
563
564
|
}, u = oe) : t === "delete" && (l = {
|
|
564
565
|
ids: [e.id, ...(c = e == null ? void 0 : e.structureIds) == null ? void 0 : c.map((s) => s.id)]
|
|
565
|
-
}, u =
|
|
566
|
+
}, u = Me), ke(u, l, t).then((s) => {
|
|
566
567
|
t === "create" && G.value.push({
|
|
567
568
|
...e,
|
|
568
569
|
id: s
|
|
@@ -570,7 +571,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
570
571
|
});
|
|
571
572
|
}, _e = async () => {
|
|
572
573
|
var l, u, n, c, s;
|
|
573
|
-
const e = JSON.parse(
|
|
574
|
+
const e = JSON.parse(J(JSON.stringify(K.value)));
|
|
574
575
|
await B();
|
|
575
576
|
const t = g.type === "create" ? {
|
|
576
577
|
...R.value,
|
|
@@ -583,7 +584,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
583
584
|
await xe(e, t), I.value = {}, g.show = !1, await H(b.value);
|
|
584
585
|
}, je = () => {
|
|
585
586
|
g.show = !1;
|
|
586
|
-
},
|
|
587
|
+
}, Je = {
|
|
587
588
|
comp: "Group",
|
|
588
589
|
name: "/平台管理/菜单管理",
|
|
589
590
|
compData: [
|
|
@@ -598,7 +599,7 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
598
599
|
]
|
|
599
600
|
}
|
|
600
601
|
]
|
|
601
|
-
},
|
|
602
|
+
}, Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
602
603
|
__proto__: null,
|
|
603
604
|
beforeDialogDestroy: je,
|
|
604
605
|
buttonValue: Ne,
|
|
@@ -618,11 +619,11 @@ const Ae = i(null), Ee = async (e, t) => {
|
|
|
618
619
|
operatingForm: Ae,
|
|
619
620
|
pageData: se,
|
|
620
621
|
renderFormData: L,
|
|
621
|
-
tableLoading:
|
|
622
|
-
tempMenuPageData:
|
|
622
|
+
tableLoading: z,
|
|
623
|
+
tempMenuPageData: Je,
|
|
623
624
|
treeData: pe
|
|
624
625
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
625
626
|
export {
|
|
626
|
-
|
|
627
|
-
|
|
627
|
+
Qe as S,
|
|
628
|
+
Je as t
|
|
628
629
|
};
|