mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-15 04:02:47 +00:00
2 lines
35 KiB
JavaScript
2 lines
35 KiB
JavaScript
import{_ as Me,__tla as Nt}from"./nuxt-link.13472e92.js";import{f as F,B as K,o as M,c as le,w as x,r as Y,V as Re,W as Rt,u,X as De,E as me,Y as Q,Z as ve,$ as Pe,a0 as Dt,C as I,s as Ie,G as xe,h as y,a1 as Ht,J as Wt,a2 as ie,z as ge,A as Te,a3 as Ve,a4 as He,a5 as j,a6 as oe,K as We,L as ne,M as se,F as ue,a7 as fe,a8 as Se,a9 as Fe,aa as Ft,ab as Zt,v as Ee,x as Xt,ac as Gt,ad as Jt,ae as Kt,af as Qt,ag as Yt,i as $,j as a,D as ee,I as Z,t as O,O as ea,P as Be,Q as he,ah as Ae,ai as la,k as Ze,m as g,aj as p,l as de,ak as ta,al as ze,am as aa,an as oa,ao as na,ap as sa,aq as Xe,ar as ra,as as ia,at as ua,T as Ge,U as Je,au as da,e as ca,N as pa,b as ma,__tla as va}from"./entry.ac74755d.js";import{t as be}from"./aria.bc8e8b0f.js";import{E as Ke,__tla as xa}from"./el-popper.49ef5783.js";import{T as ga,E as Qe,_ as Ye,a as $e,b as el,d as ll,u as fa,e as ha,__tla as ba}from"./index.vue.8384b162.js";import{u as ya,t as ye,E as tl,__tla as _a}from"./el-input.f84bdb48.js";import{f as wa,__tla as ka}from"./vnode.290de06f.js";import{t as al}from"./test.b3688895.js";import{b as Ca}from"./browser.a1ac24ac.js";import{_ as Oe}from"./_plugin-vue_export-helper.c27b6911.js";let Le,ol,Ma=Promise.all([(()=>{try{return Nt}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ka}catch{}})()]).then(async()=>{const nl=F({name:"ElCollapseTransition"}),sl=F({...nl,setup(e){const t=K("collapse-transition"),m={beforeEnter(l){l.dataset||(l.dataset={}),l.dataset.oldPaddingTop=l.style.paddingTop,l.dataset.oldPaddingBottom=l.style.paddingBottom,l.style.maxHeight=0,l.style.paddingTop=0,l.style.paddingBottom=0},enter(l){l.dataset.oldOverflow=l.style.overflow,l.scrollHeight!==0?(l.style.maxHeight=`${l.scrollHeight}px`,l.style.paddingTop=l.dataset.oldPaddingTop,l.style.paddingBottom=l.dataset.oldPaddingBottom):(l.style.maxHeight=0,l.style.paddingTop=l.dataset.oldPaddingTop,l.style.paddingBottom=l.dataset.oldPaddingBottom),l.style.overflow="hidden"},afterEnter(l){l.style.maxHeight="",l.style.overflow=l.dataset.oldOverflow},beforeLeave(l){l.dataset||(l.dataset={}),l.dataset.oldPaddingTop=l.style.paddingTop,l.dataset.oldPaddingBottom=l.style.paddingBottom,l.dataset.oldOverflow=l.style.overflow,l.style.maxHeight=`${l.scrollHeight}px`,l.style.overflow="hidden"},leave(l){l.scrollHeight!==0&&(l.style.maxHeight=0,l.style.paddingTop=0,l.style.paddingBottom=0)},afterLeave(l){l.style.maxHeight="",l.style.overflow=l.dataset.oldOverflow,l.style.paddingTop=l.dataset.oldPaddingTop,l.style.paddingBottom=l.dataset.oldPaddingBottom}};return(l,k)=>(M(),le(De,Re({name:u(t).b()},Rt(m)),{default:x(()=>[Y(l.$slots,"default")]),_:3},16,["name"]))}});var ce=me(sl,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);ce.install=e=>{e.component(ce.name,ce)},Le=ce;let rl=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,t=>{t.addEventListener("keydown",m=>{let l=!1;switch(m.code){case Q.down:{this.gotoSubIndex(this.subIndex+1),l=!0;break}case Q.up:{this.gotoSubIndex(this.subIndex-1),l=!0;break}case Q.tab:{be(e,"mouseleave");break}case Q.enter:case Q.space:{l=!0,m.currentTarget.click();break}}return l&&(m.preventDefault(),m.stopPropagation()),!1})})}},il=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute("tabindex","0");const t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new rl(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{let t=!1;switch(e.code){case Q.down:{be(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),t=!0;break}case Q.up:{be(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),t=!0;break}case Q.tab:{be(e.currentTarget,"mouseleave");break}case Q.enter:case Q.space:{t=!0,e.currentTarget.click();break}}t&&e.preventDefault()})}},ul=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){const t=this.domNode.childNodes;Array.from(t).forEach(m=>{m.nodeType===1&&new il(m,e)})}};const dl=F({name:"ElMenuCollapseTransition",setup(){const e=K("menu");return{listeners:{onBeforeEnter:t=>t.style.opacity="0.2",onEnter(t,m){ve(t,`${e.namespace.value}-opacity-transition`),t.style.opacity="1",m()},onAfterEnter(t){Pe(t,`${e.namespace.value}-opacity-transition`),t.style.opacity=""},onBeforeLeave(t){t.dataset||(t.dataset={}),Dt(t,e.m("collapse"))?(Pe(t,e.m("collapse")),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth.toString(),ve(t,e.m("collapse"))):(ve(t,e.m("collapse")),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth.toString(),Pe(t,e.m("collapse"))),t.style.width=`${t.scrollWidth}px`,t.style.overflow="hidden"},onLeave(t){ve(t,"horizontal-collapse-transition"),t.style.width=`${t.dataset.scrollWidth}px`}}}}});function cl(e,t,m,l,k,T){return M(),le(De,Re({mode:"out-in"},e.listeners),{default:x(()=>[Y(e.$slots,"default")]),_:3},16)}var pl=me(dl,[["render",cl],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);function qe(e,t){const m=I(()=>{let l=e.parent;const k=[t.value];for(;l.type.name!=="ElMenu";)l.props.index&&k.unshift(l.props.index),l=l.parent;return k});return{parentMenu:I(()=>{let l=e.parent;for(;l&&!["ElMenu","ElSubMenu"].includes(l.type.name);)l=l.parent;return l}),indexPath:m}}function ml(e){return I(()=>{const t=e.backgroundColor;return t?new ga(t).shade(20).toString():""})}const Ue=(e,t)=>{const m=K("menu");return I(()=>m.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":ml(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},vl=Ie({index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0},teleported:{type:Boolean,default:void 0},popperOffset:{type:Number,default:6},expandCloseIcon:{type:fe},expandOpenIcon:{type:fe},collapseCloseIcon:{type:fe},collapseOpenIcon:{type:fe}}),pe="ElSubMenu";var _e=F({name:pe,props:vl,setup(e,{slots:t,expose:m}){ya({from:"popper-append-to-body",replacement:"teleported",scope:pe,version:"2.3.0",ref:"https://element-plus.org/en-US/component/menu.html#submenu-attributes"},I(()=>e.popperAppendToBody!==void 0));const l=Se(),{indexPath:k,parentMenu:T}=qe(l,I(()=>e.index)),d=K("menu"),w=K("sub-menu"),s=xe("rootMenu");s||ye(pe,"can not inject root menu");const v=xe(`subMenu:${T.value.uid}`);v||ye(pe,"can not inject sub menu");const f=y({}),P=y({});let V;const L=y(!1),U=y(),B=y(null),N=I(()=>n.value==="horizontal"&&R.value?"bottom-start":"right-start"),X=I(()=>n.value==="horizontal"&&R.value||n.value==="vertical"&&!s.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?A.value?e.expandOpenIcon:e.expandCloseIcon:Ht:e.collapseCloseIcon&&e.collapseOpenIcon?A.value?e.collapseOpenIcon:e.collapseCloseIcon:Wt),R=I(()=>v.level===0),W=I(()=>{var _;const E=(_=e.teleported)!=null?_:e.popperAppendToBody;return E===void 0?R.value:E}),r=I(()=>s.props.collapse?`${d.namespace.value}-zoom-in-left`:`${d.namespace.value}-zoom-in-top`),b=I(()=>n.value==="horizontal"&&R.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","left-start","bottom-start","bottom-end","top-start","top-end"]),A=I(()=>s.openedMenus.includes(e.index)),z=I(()=>{let _=!1;return Object.values(f.value).forEach(E=>{E.active&&(_=!0)}),Object.values(P.value).forEach(E=>{E.active&&(_=!0)}),_}),i=I(()=>s.props.backgroundColor||""),h=I(()=>s.props.activeTextColor||""),S=I(()=>s.props.textColor||""),n=I(()=>s.props.mode),c=ie({index:e.index,indexPath:k,active:z}),o=I(()=>n.value!=="horizontal"?{color:S.value}:{borderBottomColor:z.value?s.props.activeTextColor?h.value:"":"transparent",color:z.value?h.value:S.value}),D=()=>{var _,E,q;return(q=(E=(_=B.value)==null?void 0:_.popperRef)==null?void 0:E.popperInstanceRef)==null?void 0:q.destroy()},G=_=>{_||D()},H=()=>{s.props.menuTrigger==="hover"&&s.props.mode==="horizontal"||s.props.collapse&&s.props.mode==="vertical"||e.disabled||s.handleSubMenuClick({index:e.index,indexPath:k.value,active:z.value})},C=(_,E=e.showTimeout)=>{var q;_.type!=="focus"&&(s.props.menuTrigger==="click"&&s.props.mode==="horizontal"||!s.props.collapse&&s.props.mode==="vertical"||e.disabled||(v.mouseInChild.value=!0,V==null||V(),{stop:V}=Fe(()=>{s.openMenu(e.index,k.value)},E),W.value&&((q=T.value.vnode.el)==null||q.dispatchEvent(new MouseEvent("mouseenter")))))},J=(_=!1)=>{var E,q;s.props.menuTrigger==="click"&&s.props.mode==="horizontal"||!s.props.collapse&&s.props.mode==="vertical"||(V==null||V(),v.mouseInChild.value=!1,{stop:V}=Fe(()=>!L.value&&s.closeMenu(e.index,k.value),e.hideTimeout),W.value&&_&&((E=l.parent)==null?void 0:E.type.name)==="ElSubMenu"&&((q=v.handleMouseleave)==null||q.call(v,!0)))};ge(()=>s.props.collapse,_=>G(!!_));{const _=q=>{P.value[q.index]=q},E=q=>{delete P.value[q.index]};Te(`subMenu:${l.uid}`,{addSubMenu:_,removeSubMenu:E,handleMouseleave:J,mouseInChild:L,level:v.level+1})}return m({opened:A}),Ve(()=>{s.addSubMenu(c),v.addSubMenu(c)}),He(()=>{v.removeSubMenu(c),s.removeSubMenu(c)}),()=>{var _;const E=[(_=t.title)==null?void 0:_.call(t),j(We,{class:w.e("icon-arrow"),style:{transform:A.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&s.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>oe(X.value)?j(l.appContext.components[X.value]):j(X.value)})],q=Ue(s.props,v.level+1),jt=s.isMenuPopup?j(Ke,{ref:B,visible:A.value,effect:"light",pure:!0,offset:e.popperOffset,showArrow:!1,persistent:!0,popperClass:e.popperClass,placement:N.value,teleported:W.value,fallbackPlacements:b.value,transition:r.value,gpuAcceleration:!1},{content:()=>{var re;return j("div",{class:[d.m(n.value),d.m("popup-container"),e.popperClass],onMouseenter:Ce=>C(Ce,100),onMouseleave:()=>J(!0),onFocus:Ce=>C(Ce,100)},[j("ul",{class:[d.b(),d.m("popup"),d.m(`popup-${N.value}`)],style:q.value},[(re=t.default)==null?void 0:re.call(t)])])},default:()=>j("div",{class:w.e("title"),style:[o.value,{backgroundColor:i.value}],onClick:H},E)}):j(ue,{},[j("div",{class:w.e("title"),style:[o.value,{backgroundColor:i.value}],ref:U,onClick:H},E),j(Le,{},{default:()=>{var re;return ne(j("ul",{role:"menu",class:[d.b(),d.m("inline")],style:q.value},[(re=t.default)==null?void 0:re.call(t)]),[[se,A.value]])}})]);return j("li",{class:[w.b(),w.is("active",z.value),w.is("opened",A.value),w.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:A.value,onMouseenter:C,onMouseleave:()=>J(!0),onFocus:C},[jt])}}});const xl=Ie({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:Ee(Array),default:()=>Xt([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperEffect:{type:String,values:["dark","light"],default:"dark"}}),we=e=>Array.isArray(e)&&e.every(t=>oe(t));var gl=F({name:"ElMenu",props:xl,emits:{close:(e,t)=>oe(e)&&we(t),open:(e,t)=>oe(e)&&we(t),select:(e,t,m,l)=>oe(e)&&we(t)&&Gt(m)&&(l===void 0||l instanceof Promise)},setup(e,{emit:t,slots:m,expose:l}){const k=Se(),T=k.appContext.config.globalProperties.$router,d=y(),w=K("menu"),s=K("sub-menu"),v=y(-1),f=y(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),P=y(e.defaultActive),V=y({}),L=y({}),U=I(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),B=()=>{const n=P.value&&V.value[P.value];!n||e.mode==="horizontal"||e.collapse||n.indexPath.forEach(c=>{const o=L.value[c];o&&N(c,o.indexPath)})},N=(n,c)=>{f.value.includes(n)||(e.uniqueOpened&&(f.value=f.value.filter(o=>c.includes(o))),f.value.push(n),t("open",n,c))},X=n=>{const c=f.value.indexOf(n);c!==-1&&f.value.splice(c,1)},R=(n,c)=>{X(n),t("close",n,c)},W=({index:n,indexPath:c})=>{f.value.includes(n)?R(n,c):N(n,c)},r=n=>{(e.mode==="horizontal"||e.collapse)&&(f.value=[]);const{index:c,indexPath:o}=n;if(!(c===void 0||o===void 0))if(e.router&&T){const D=n.route||c,G=T.push(D).then(H=>(H||(P.value=c),H));t("select",c,o,{index:c,indexPath:o,route:D},G)}else P.value=c,t("select",c,o,{index:c,indexPath:o})},b=n=>{const c=V.value,o=c[n]||P.value&&c[P.value]||c[e.defaultActive];o?P.value=o.index:P.value=n},A=()=>{var n,c;if(!d.value)return-1;const o=Array.from((c=(n=d.value)==null?void 0:n.childNodes)!=null?c:[]).filter(E=>E.nodeName!=="#text"||E.nodeValue),D=64,G=Number.parseInt(getComputedStyle(d.value).paddingLeft,10),H=Number.parseInt(getComputedStyle(d.value).paddingRight,10),C=d.value.clientWidth-G-H;let J=0,_=0;return o.forEach((E,q)=>{J+=E.offsetWidth||0,J<=C-D&&(_=q+1)}),_===o.length?-1:_},z=(n,c=33.34)=>{let o;return()=>{o&&clearTimeout(o),o=setTimeout(()=>{n()},c)}};let i=!0;const h=()=>{const n=()=>{v.value=-1,Kt(()=>{v.value=A()})};i?n():z(n)(),i=!1};ge(()=>e.defaultActive,n=>{V.value[n]||(P.value=""),b(n)}),ge(()=>e.collapse,n=>{n&&(f.value=[])}),ge(V.value,B);let S;Ft(()=>{e.mode==="horizontal"&&e.ellipsis?S=Jt(d,h).stop:S==null||S()});{const n=o=>{L.value[o.index]=o},c=o=>{delete L.value[o.index]};Te("rootMenu",ie({props:e,openedMenus:f,items:V,subMenus:L,activeIndex:P,isMenuPopup:U,addMenuItem:o=>{V.value[o.index]=o},removeMenuItem:o=>{delete V.value[o.index]},addSubMenu:n,removeSubMenu:c,openMenu:N,closeMenu:R,handleMenuItemClick:r,handleSubMenuClick:W})),Te(`subMenu:${k.uid}`,{addSubMenu:n,removeSubMenu:c,mouseInChild:y(!1),level:0})}return Ve(()=>{e.mode==="horizontal"&&new ul(k.vnode.el,w.namespace.value)}),l({open:n=>{const{indexPath:c}=L.value[n];c.forEach(o=>N(o,c))},close:X,handleResize:h}),()=>{var n,c;let o=(c=(n=m.default)==null?void 0:n.call(m))!=null?c:[];const D=[];if(e.mode==="horizontal"&&d.value){const C=wa(o),J=v.value===-1?C:C.slice(0,v.value),_=v.value===-1?[]:C.slice(v.value);_!=null&&_.length&&e.ellipsis&&(o=J,D.push(j(_e,{index:"sub-menu-more",class:s.e("hide-arrow")},{title:()=>j(We,{class:s.e("icon-more")},{default:()=>j(Zt)}),default:()=>_})))}const G=Ue(e,0),H=j("ul",{key:String(e.collapse),role:"menubar",ref:d,style:G.value,class:{[w.b()]:!0,[w.m(e.mode)]:!0,[w.m("collapse")]:e.collapse}},[...o,...D]);return e.collapseTransition&&e.mode==="vertical"?j(pl,()=>H):H}}});const fl=Ie({index:{type:Ee([String,null]),default:null},route:{type:Ee([String,Object])},disabled:Boolean}),hl={click:e=>oe(e.index)&&Array.isArray(e.indexPath)},ke="ElMenuItem",bl=F({name:ke,components:{ElTooltip:Ke},props:fl,emits:hl,setup(e,{emit:t}){const m=Se(),l=xe("rootMenu"),k=K("menu"),T=K("menu-item");l||ye(ke,"can not inject root menu");const{parentMenu:d,indexPath:w}=qe(m,Qt(e,"index")),s=xe(`subMenu:${d.value.uid}`);s||ye(ke,"can not inject sub menu");const v=I(()=>e.index===l.activeIndex),f=ie({index:e.index,indexPath:w,active:v}),P=()=>{e.disabled||(l.handleMenuItemClick({index:e.index,indexPath:w.value,route:e.route}),t("click",f))};return Ve(()=>{s.addSubMenu(f),l.addMenuItem(f)}),He(()=>{s.removeSubMenu(f),l.removeMenuItem(f)}),{parentMenu:d,rootMenu:l,active:v,nsMenu:k,nsMenuItem:T,handleClick:P}}});function yl(e,t,m,l,k,T){const d=Yt("el-tooltip");return M(),$("li",{class:ee([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:t[0]||(t[0]=(...w)=>e.handleClick&&e.handleClick(...w))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(M(),le(d,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:x(()=>[Y(e.$slots,"title")]),default:x(()=>[a("div",{class:ee(e.nsMenu.be("tooltip","trigger"))},[Y(e.$slots,"default")],2)]),_:3},8,["effect"])):(M(),$(ue,{key:1},[Y(e.$slots,"default"),Y(e.$slots,"title")],64))],2)}var je=me(bl,[["render",yl],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);const _l={title:String},wl="ElMenuItemGroup",kl=F({name:wl,props:_l,setup(){return{ns:K("menu-item-group")}}});function Cl(e,t,m,l,k,T){return M(),$("li",{class:ee(e.ns.b())},[a("div",{class:ee(e.ns.e("title"))},[e.$slots.title?Y(e.$slots,"title",{key:1}):(M(),$(ue,{key:0},[Z(O(e.title),1)],64))],2),a("ul",null,[Y(e.$slots,"default")])],2)}var Ne=me(kl,[["render",Cl],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);const Ml=ea(gl,{MenuItem:je,MenuItemGroup:Ne,SubMenu:_e}),Pl=Be(je);Be(Ne),Be(_e);const Il=""+new URL("logo.58dc7b81.jpg",import.meta.url).href,Tl={key:2,class:"bg-white w-full py-[60px] px-[30px] !rounded-[var(--rounded-big)]"},Vl={class:"flex items-end justify-center mb-[30px]"},Sl=["onClick"],El={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},Bl=a("span",{class:"iconfont icon-woV6xx1 !mr-[14px]"},null,-1),Al={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},zl=a("span",{class:"iconfont icon-mima !mr-[14px]"},null,-1),$l={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},Ol=a("span",{class:"iconfont icon-shoujiV6xx !mr-[14px]"},null,-1),Ll={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},ql=a("span",{class:"iconfont icon-a-zhibao5 !mr-[14px]"},null,-1),Ul={class:"flex justify-between"},jl={class:"mt-[20px]"},Nl={key:0,class:"text-[12px] leading-[24px] flex items-center w-full mt-[20px]"},Rl={class:"text-primary mx-[4px]"},Dl={class:"text-primary mx-[4px]"},Hl={key:3,class:"flex flex-col items-center py-[60px] px-[30px]"},Wl=a("div",{class:"text-[18px] cursor-pointer text-[#999] leading-[24px] oppoSans-R !text-[#333] font-600"},"\u5FAE\u4FE1\u626B\u7801\u767B\u5F55",-1),Fl={class:"qrcode p-[20px] mt-[30px] border leading-none box-content rounded-[var(--rounded-small)]"},Zl={class:"relative"},Xl={key:1,class:"w-[202px] h-[202px]"},Gl={key:2,class:"flex flex-col justify-center items-center absolute inset-0 bg-gray-50"},Jl={class:"text-xs text-gray-600"},Kl=a("div",{class:"mt-[22px] flex items-center justify-center"},[a("span",{class:"iconfont icon-weixin1 text-[#00c22c]"}),a("span",{class:"text-[14px] text-[#999] ml-[4px]"},"\u5FAE\u4FE1\u626B\u4E00\u626B")],-1),Ql=F({__name:"login",emits:["typeChange"],setup(e,{emit:t}){const m=he(),l=Ae(),k=y(""),T=y("");location.pathname.indexOf("web")!=-1?(k.value="/web/auth/agreement?key=service",T.value="/web/auth/agreement?key=privacy"):(k.value="/auth/agreement?key=service",T.value="/auth/agreement?key=privacy");let d=y(!0),w=null;const s=()=>{d.value=!d.value,d.value?clearTimeout(w):P()};la(()=>{clearTimeout(w)});const v=i=>{na({key:i}).then(h=>{let S=h.data;switch(S.status){case"wait":w=setTimeout(()=>{v(f.value.key)},1e3);break;case"success":S.login_data.token?(m.setToken(S.login_data.token),m.logClose()):(sa("openId").value=S.login_data.openid,Xe("/auth/bind"),m.logClose());break;case"fail":f.value.pastDueContent=S.fail_reason,f.value.pastDue=!0;break}}).catch(h=>{f.value.pastDue=!0,f.value.pastDueContent=h.msg})},f=y({url:"",key:"",pastDue:!1,pastDueContent:"\u4E8C\u7EF4\u7801\u751F\u6210\u5931\u8D25"}),P=async()=>{let i=await(await ta()).data;f.value.key=i.key,i.url&&(Ca.toDataURL(i.url,{errorCorrectionLevel:"L",margin:0,width:100}).then(h=>{f.value.url=h}),f.value.pastDue=!1,setTimeout(()=>{v(f.value.key)},1e3))};l.getLoginConfig();const V=I(()=>{const i=[];return l.login.is_username&&i.push({type:"username",title:p("usernameLogin")}),l.login.is_mobile&&i.push({type:"mobile",title:p("mobileLogin")}),U.value=i[0]?i[0].type:"",i}),L=y(!1),U=y(""),B=ie({username:"",password:"",mobile:"",mobile_code:"",mobile_key:""}),N=y(),X=I(()=>({username:{required:U.value=="username",message:p("usernamePlaceholder"),trigger:["blur","change"]},password:{required:U.value=="username",message:p("passwordPlaceholder"),trigger:["blur","change"]},mobile:[{required:U.value=="mobile",message:p("mobilePlaceholder"),trigger:["blur","change"]},{validator(i,h,S){return U.value!="mobile"?!0:al.mobile(h)},message:p("mobileError"),trigger:["blur"]}],mobile_code:{required:U.value=="mobile",message:p("codePlaceholder"),trigger:["change"]}})),R=y(!1),W=async()=>{var i;await((i=N.value)==null?void 0:i.validate(async(h,S)=>{if(h){if(l.login.agreement_show&&!R.value)return ze.error(p("isAgreeTips")),!1;if(L.value)return;L.value=!0,(U.value=="username"?aa:oa)(B).then(async n=>{await m.setToken(n.data.token),m.logClose()}).catch(()=>{L.value=!1})}}))},r=y(null),b=async()=>{var i;await((i=N.value)==null?void 0:i.validateField("mobile",async(h,S)=>{var n;h&&((n=r.value)==null||n.send())}))},A=()=>{t("typeChange","register")},z=y(!0);return y(!0),(i,h)=>{const S=tl,n=Qe,c=Ye,o=$e,D=Me,G=el,H=ll;return M(),$("div",null,[u(d)?(M(),$("span",{key:0,class:"iconfont icon-mianxing_denglu_erweimadenglu !text-[#333] !text-[50px] absolute top-0 right-0 cursor-pointer",onClick:s})):(M(),$("span",{key:1,class:"iconfont icon-zhanghaodenglu !text-[#333] !text-[50px] absolute top-0 right-0 cursor-pointer",onClick:s})),u(d)?(M(),$("div",Tl,[a("div",Vl,[(M(!0),$(ue,null,Ze(u(V),(C,J)=>(M(),$("div",{class:ee(["text-[18px] cursor-pointer text-[#999] leading-[24px] oppoSans-R",{"!text-[#333] font-600":U.value==C.type,"mr-[70px]":J+1!=u(V).length}]),onClick:_=>U.value=C.type},O(C.title),11,Sl))),256))]),g(G,{model:B,ref_key:"formRef",ref:N,rules:u(X),"validate-on-rule-change":!1},{default:x(()=>[ne(a("div",null,[g(n,{prop:"username"},{default:x(()=>[a("div",El,[g(S,{modelValue:B.username,"onUpdate:modelValue":h[0]||(h[0]=C=>B.username=C),placeholder:("t"in i?i.t:u(p))("usernamePlaceholder"),clearable:"","inline-message":!0,readonly:z.value,onClick:h[1]||(h[1]=C=>z.value=!1),onBlur:h[2]||(h[2]=C=>z.value=!0)},{prefix:x(()=>[Bl]),_:1},8,["modelValue","placeholder","readonly"])])]),_:1}),g(n,{prop:"password"},{default:x(()=>[a("div",Al,[g(S,{modelValue:B.password,"onUpdate:modelValue":h[3]||(h[3]=C=>B.password=C),placeholder:("t"in i?i.t:u(p))("passwordPlaceholder"),type:"password",clearable:"","show-password":""},{prefix:x(()=>[zl]),_:1},8,["modelValue","placeholder"])])]),_:1})],512),[[se,U.value=="username"]]),ne(a("div",null,[g(n,{prop:"mobile"},{default:x(()=>[a("div",$l,[g(S,{modelValue:B.mobile,"onUpdate:modelValue":h[4]||(h[4]=C=>B.mobile=C),placeholder:("t"in i?i.t:u(p))("mobilePlaceholder"),clearable:""},{prefix:x(()=>[Ol]),_:1},8,["modelValue","placeholder"])])]),_:1}),g(n,{prop:"mobile_code"},{default:x(()=>[a("div",Ll,[g(S,{modelValue:B.mobile_code,"onUpdate:modelValue":h[6]||(h[6]=C=>B.mobile_code=C),placeholder:("t"in i?i.t:u(p))("codePlaceholder")},{prefix:x(()=>[ql]),suffix:x(()=>[g(c,{mobile:B.mobile,type:"login",modelValue:B.mobile_key,"onUpdate:modelValue":h[5]||(h[5]=C=>B.mobile_key=C),onClick:b,ref_key:"smsCodeRef",ref:r},null,8,["mobile","modelValue"])]),_:1},8,["modelValue","placeholder"])])]),_:1})],512),[[se,U.value=="mobile"]]),a("div",Ul,[g(o,{type:"primary",link:"",onClick:A,class:"!text-[12px]"},{default:x(()=>[Z(O(("t"in i?i.t:u(p))("noAccount"))+"\uFF0C"+O(("t"in i?i.t:u(p))("toRegister")),1)]),_:1})]),a("div",jl,[g(o,{type:"primary",class:"w-full !h-[50px] !rounded-[8px] oppoSans-M",size:"large",onClick:W,loading:L.value},{default:x(()=>[Z(O(L.value?("t"in i?i.t:u(p))("logining"):("t"in i?i.t:u(p))("login")),1)]),_:1},8,["loading"])]),u(l).login.agreement_show?(M(),$("div",Nl,[a("span",{class:ee(["iconfont text-primary mr-[5px]",R.value?"icon-xuanze1":"icon-checkbox_nol"]),onClick:h[7]||(h[7]=C=>R.value=!R.value)},null,2),Z(" "+O(("t"in i?i.t:u(p))("agreeTips"))+" ",1),g(D,{to:k.value,target:"_blank"},{default:x(()=>[a("span",Rl,O(("t"in i?i.t:u(p))("userAgreement")),1)]),_:1},8,["to"]),Z(" "+O(("t"in i?i.t:u(p))("and"))+" ",1),g(D,{to:T.value,target:"_blank"},{default:x(()=>[a("span",Dl,O(("t"in i?i.t:u(p))("privacyAgreement")),1)]),_:1},8,["to"])])):de("",!0)]),_:1},8,["model","rules"])])):(M(),$("div",Hl,[Wl,a("div",Fl,[a("div",Zl,[f.value.url?(M(),le(H,{key:0,src:f.value.url,class:"w-[200px] h-[200px]"},null,8,["src"])):(M(),$("div",Xl)),f.value.pastDue?(M(),$("div",Gl,[a("span",Jl,O(f.value.pastDueContent),1),a("span",{onClick:h[8]||(h[8]=C=>P()),class:"text-xs cursor-pointer text-color mt-2"},"\u70B9\u51FB\u5237\u65B0")])):de("",!0)]),Kl])]))])}}}),te=e=>(Ge("data-v-f123bb88"),e=e(),Je(),e),Yl={class:"bg-white w-full py-[60px] px-[30px] !rounded-[var(--rounded-big)]"},et={class:"flex items-end justify-center mb-[30px]"},lt=["onClick"],tt={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},at=te(()=>a("span",{class:"iconfont icon-woV6xx1 !mr-[14px]"},null,-1)),ot={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},nt=te(()=>a("span",{class:"iconfont icon-mima !mr-[14px]"},null,-1)),st={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},rt=te(()=>a("span",{class:"iconfont icon-mima !mr-[14px]"},null,-1)),it={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},ut=te(()=>a("span",{class:"iconfont icon-shoujiV6xx !mr-[14px]"},null,-1)),dt={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},ct=te(()=>a("span",{class:"iconfont icon-a-zhibao5 !mr-[14px]"},null,-1)),pt={class:"flex-1 h-[50px] border-[1px] border-solid border-[#ccc] rounded-[8px] flex items-center"},mt=te(()=>a("span",{class:"iconfont icon-a-zhibao5 !mr-[14px]"},null,-1)),vt={class:"py-0 leading-none"},xt={class:"flex justify-end"},gt={class:"mt-[20px]"},ft={key:0,class:"text-[12px] leading-[24px] flex items-center w-full mt-[20px]"},ht={class:"text-primary mx-[4px]"},bt={class:"text-primary mx-[4px]"},yt=F({__name:"register",emits:["typeChange"],setup(e,{emit:t}){const m=he(),l=Ae();l.getLoginConfig();const k=y(""),T=y("");location.pathname.indexOf("web")!=-1?(k.value="/web/auth/agreement?key=service",T.value="/web/auth/agreement?key=privacy"):(k.value="/auth/agreement?key=service",T.value="/auth/agreement?key=privacy");const d=y(""),w=I(()=>{const r=[];return l.login.is_username&&r.push({type:"username",title:p("usernameRegister")}),l.login.is_mobile&&!l.login.is_bind_mobile&&r.push({type:"mobile",title:p("mobileRegister")}),d.value=r[0]?r[0].type:"",r}),s=y(!1),v=ie({username:"",password:"",confirm_password:"",mobile:"",mobile_code:"",mobile_key:"",captcha_key:"",captcha_code:""}),f=I(()=>({username:{type:"string",required:d.value=="username",message:p("usernamePlaceholder"),trigger:["blur","change"]},password:{type:"string",required:d.value=="username",message:p("passwordPlaceholder"),trigger:["blur","change"]},confirm_password:[{type:"string",required:d.value=="username",message:p("confirmPasswordPlaceholder"),trigger:["blur","change"]},{validator(r,b,A){return b==v.password},message:p("confirmPasswordError"),trigger:["change","blur"]}],mobile:[{type:"string",required:d.value=="mobile"||l.login.is_bind_mobile,message:p("mobilePlaceholder"),trigger:["blur","change"]},{validator(r,b,A){return d.value!="mobile"&&!l.login.is_bind_mobile?!0:al.mobile(b)},message:p("mobileError"),trigger:["change","blur"]}],mobile_code:{type:"string",required:d.value=="mobile"||l.login.is_bind_mobile,message:p("codePlaceholder"),trigger:["blur","change"]},captcha_code:{type:"string",required:d.value=="username",message:p("captchaPlaceholder"),trigger:["blur","change"]}})),P=y(!1),V=y(),L=async()=>{var r;await((r=V.value)==null?void 0:r.validate(async(b,A)=>{if(b){if(l.login.agreement_show&&!P.value)return ze.error(p("isAgreeTips")),!1;if(s.value)return;s.value=!0,(d.value=="username"?ra:ia)(v).then(z=>{m.setToken(z.data.token),m.logClose()}).catch(()=>{s.value=!1,B.refresh()})}}))};let U=y(!1);ua().then(r=>{U.value=r.data});const B=fa(v);B.refresh();const N=y(null),X=async()=>{var r;await((r=V.value)==null?void 0:r.validateField("mobile",async(b,A)=>{var z;b&&((z=N.value)==null||z.send())}))},R=()=>{t("typeChange","login")},W=y(!0);return y(!0),y(!0),(r,b)=>{const A=tl,z=Qe,i=Ye,h=ll,S=$e,n=Me,c=el;return M(),$("div",null,[a("div",Yl,[a("div",et,[(M(!0),$(ue,null,Ze(u(w),(o,D)=>(M(),$("div",{class:ee(["text-[18px] cursor-pointer text-[#999] leading-[24px] oppoSans-R",{"!text-[#333] font-600":d.value==o.type,"mr-[70px]":D+1!=u(w).length}]),onClick:G=>d.value=o.type},O(o.title),11,lt))),256))]),g(c,{model:v,ref_key:"formRef",ref:V,rules:u(f),"validate-on-rule-change":!1},{default:x(()=>[ne(a("div",null,[g(z,{prop:"username"},{default:x(()=>[a("div",tt,[g(A,{modelValue:v.username,"onUpdate:modelValue":b[0]||(b[0]=o=>v.username=o),placeholder:("t"in r?r.t:u(p))("usernamePlaceholder"),clearable:"","inline-message":!0,readonly:W.value,onClick:b[1]||(b[1]=o=>W.value=!1),onBlur:b[2]||(b[2]=o=>W.value=!0)},{prefix:x(()=>[at]),_:1},8,["modelValue","placeholder","readonly"])])]),_:1}),g(z,{prop:"password"},{default:x(()=>[a("div",ot,[g(A,{modelValue:v.password,"onUpdate:modelValue":b[3]||(b[3]=o=>v.password=o),placeholder:("t"in r?r.t:u(p))("passwordPlaceholder"),type:"password",clearable:"","show-password":!0},{prefix:x(()=>[nt]),_:1},8,["modelValue","placeholder"])])]),_:1}),g(z,{prop:"confirm_password"},{default:x(()=>[a("div",st,[g(A,{modelValue:v.confirm_password,"onUpdate:modelValue":b[4]||(b[4]=o=>v.confirm_password=o),placeholder:("t"in r?r.t:u(p))("confirmPasswordPlaceholder"),type:"password",clearable:"","show-password":!0},{prefix:x(()=>[rt]),_:1},8,["modelValue","placeholder"])])]),_:1})],512),[[se,d.value=="username"]]),ne(a("div",null,[g(z,{prop:"mobile"},{default:x(()=>[a("div",it,[g(A,{modelValue:v.mobile,"onUpdate:modelValue":b[5]||(b[5]=o=>v.mobile=o),placeholder:("t"in r?r.t:u(p))("mobilePlaceholder"),clearable:""},{prefix:x(()=>[ut]),_:1},8,["modelValue","placeholder"])])]),_:1}),g(z,{prop:"mobile_code"},{default:x(()=>[a("div",dt,[g(A,{modelValue:v.mobile_code,"onUpdate:modelValue":b[7]||(b[7]=o=>v.mobile_code=o),placeholder:("t"in r?r.t:u(p))("codePlaceholder")},{prefix:x(()=>[ct]),suffix:x(()=>[g(i,{mobile:v.mobile,type:"login",modelValue:v.mobile_key,"onUpdate:modelValue":b[6]||(b[6]=o=>v.mobile_key=o),onClick:X,ref_key:"smsCodeRef",ref:N},null,8,["mobile","modelValue"])]),_:1},8,["modelValue","placeholder"])])]),_:1})],512),[[se,d.value=="mobile"||u(l).login.is_bind_mobile]]),ne(a("div",null,[g(z,{prop:"captcha_code"},{default:x(()=>[a("div",pt,[g(A,{modelValue:v.captcha_code,"onUpdate:modelValue":b[9]||(b[9]=o=>v.captcha_code=o),placeholder:("t"in r?r.t:u(p))("captchaPlaceholder")},{prefix:x(()=>[mt]),suffix:x(()=>[a("div",vt,[g(h,{src:u(B).image.value,class:"h-[30px] cursor-pointer",onClick:b[8]||(b[8]=o=>u(B).refresh())},null,8,["src"])])]),_:1},8,["modelValue","placeholder"])])]),_:1})],512),[[se,d.value=="username"]]),a("div",xt,[g(S,{type:"primary",link:"",onClick:R,class:"!text-[12px]"},{default:x(()=>[Z(O(("t"in r?r.t:u(p))("haveAccount"))+"\uFF0C"+O(("t"in r?r.t:u(p))("toLogin")),1)]),_:1})]),a("div",gt,[g(S,{type:"primary",class:"w-full !h-[50px] !rounded-[8px] oppoSans-M",size:"large",onClick:L,loading:s.value},{default:x(()=>[Z(O(s.value?("t"in r?r.t:u(p))("registering"):("t"in r?r.t:u(p))("register")),1)]),_:1},8,["loading"])]),u(l).login.agreement_show?(M(),$("div",ft,[a("span",{class:ee(["iconfont text-primary mr-[5px]",P.value?"icon-xuanze1":"icon-checkbox_nol"]),onClick:b[10]||(b[10]=o=>P.value=!P.value)},null,2),Z(" "+O(("t"in r?r.t:u(p))("registerAgreeTips"))+" ",1),g(n,{to:k.value,target:"_blank"},{default:x(()=>[a("span",ht,O(("t"in r?r.t:u(p))("userAgreement")),1)]),_:1},8,["to"]),Z(" "+O(("t"in r?r.t:u(p))("and"))+" ",1),g(n,{to:T.value,target:"_blank"},{default:x(()=>[a("span",bt,O(("t"in r?r.t:u(p))("privacyAgreement")),1)]),_:1},8,["to"])])):de("",!0)]),_:1},8,["model","rules"])])])}}}),_t=Oe(yt,[["__scopeId","data-v-f123bb88"]]),wt={class:"loginPopup"},kt={class:"relative"},Ct=F({__name:"index",setup(e){const t=he(),m=I(()=>t.loginPopup),l=w=>{t.logClose(),T.value="login",w()},k=()=>{t.logClose(),T.value="login"};let T=y("login");const d=w=>{T.value=w};return(w,s)=>{const v=ha;return M(),$("div",wt,[g(v,{modelValue:u(m),"onUpdate:modelValue":s[0]||(s[0]=f=>da(m)?m.value=f:null),"align-center":"",width:"430","before-close":l,"custom-class":"login !rounded-[var(--rounded-big)]","show-close":!1,"append-to-body":""},{default:x(()=>[a("div",kt,[a("span",{class:"iconfont icon-tubiaoV6-3 absolute top-[-33px] right-[-33px] text-[#fff] !text-[24px]",onClick:k}),u(T)==="login"&&u(m)?(M(),le(Ql,{key:0,onTypeChange:d})):de("",!0),u(T)==="register"&&u(m)?(M(),le(_t,{key:1,onTypeChange:d})):de("",!0)])]),_:1},8,["modelValue"])])}}}),Mt=Oe(Ct,[["__scopeId","data-v-2b347440"]]),ae=e=>(Ge("data-v-747adf98"),e=e(),Je(),e),Pt={class:"flex h-full min-w-[1200px] bg-[#fff]"},It={class:"flex items-center ml-[20px]"},Tt=ae(()=>a("div",{class:"w-[132px] mr-[10px]"},[a("img",{src:Il})],-1)),Vt=ae(()=>a("div",{class:"hidden text-[14px] text-[#A6B0C8] xl:block"},[Z("|"),a("span",{class:"ml-[10px]"},"\u4E00\u6B3E\u5FEB\u901F\u5F00\u53D1\u591A\u5E94\u7528\u7BA1\u7406\u7CFB\u7EDF\u540E\u53F0\u6846\u67B6")],-1)),St={class:"mx-auto flex-shrink"},Et=ae(()=>a("span",{class:"text-base mx-4"},"\u9996\u9875",-1)),Bt=ae(()=>a("span",null,null,-1)),At=["onClick"],zt=ae(()=>a("span",null,null,-1)),$t={class:"flex items-center justify-end mr-[20px] ml-auto whitespace-pre-wrap"},Ot={key:0},Lt={class:"cursor-pointer"},qt=ae(()=>a("span",{class:"mx-2"},"|",-1)),Ut=F({__name:"index",setup(e){const t=Ae(),m=he(),l=I(()=>m.info),k=()=>{if(!ma()&&!t.login.is_username&&!t.login.is_mobile&&!t.login.is_bind_mobile)return ze.error("\u5546\u5BB6\u672A\u5F00\u542F\u666E\u901A\u8D26\u53F7\u767B\u5F55\u6CE8\u518C"),!1;m.logOpen()},T=()=>{m.logout(),Xe("/app/index")},d=()=>{window.open("https://www.niushop.com/bbs.html")},w=ca();return(s,v)=>{const f=Me,P=Pl,V=Ml,L=$e;return M(),$("div",Pt,[a("div",It,[g(f,{to:"/"},{default:x(()=>[Tt]),_:1}),Vt]),a("div",St,[g(V,{"default-active":u(w).route,class:"h-full",mode:"horizontal",ellipsis:!1,router:!0},{default:x(()=>[g(P,{index:"/",route:"/app/index"},{default:x(()=>[Et,Bt]),_:1}),g(P,{index:"bbs"},{default:x(()=>[a("span",{class:"text-base mx-4",onClick:pa(d,["stop"])},"\u793E\u533A",8,At),zt]),_:1})]),_:1},8,["default-active"])]),a("div",$t,[u(l)?(M(),$("div",Ot,[g(f,{to:"/app/member/center"},{default:x(()=>[a("span",Lt,O(u(l).nickname),1)]),_:1}),qt,a("span",{class:"cursor-pointer",onClick:T},"\u9000\u51FA")])):(M(),le(L,{key:1,type:"primary",link:"",onClick:k},{default:x(()=>[Z(O(("t"in s?s.t:u(p))("login"))+" / "+O(("t"in s?s.t:u(p))("register")),1)]),_:1}))]),g(Mt)])}}});ol=Oe(Ut,[["__scopeId","data-v-747adf98"]])});export{Le as _,Ma as __tla,ol as l};
|