tg_web_dist/js/profile.BUqM-G71.js

2 lines
12 KiB
JavaScript
Raw Normal View History

2025-07-09 19:14:31 +08:00
import{X as e,aX as a,bO as l,b as t,A as s,h as o,_ as r,d as n,j as i,I as u,a as d,r as c,D as p,ag as v,aW as b,aw as m,c as f,e as h,a0 as g,n as y,g as w,k as _,bP as k,bQ as P,bR as x,F as C,o as F,bS as $,O as N,E as T,bT as B,M as V,aj as S,Z as E,y as R,x as A,p as U,f as q,bU as L,aS as j,U as K,aq as W,bV as z,ae as I,bW as M,S as O,ah as X,V as D,v as H,s as Q,a_ as Y,bf as Z,a$ as G,b3 as J,b7 as ee,aB as ae,w as le,l as te,P as se,t as oe,bx as re,bz as ne,ak as ie,al as ue,bB as de,by as ce}from"./index.pkwn57tR.js";import{E as pe}from"./el-card.D7fC5_K-.js";const ve=(t,s)=>{const o={},r=e([]);return{children:r,addChild:e=>{o[e.uid]=e,r.value=((e,t,s)=>a(e.subTree).filter((e=>{var a;return l(e)&&(null==(a=e.type)?void 0:a.name)===t&&!!e.component})).map((e=>e.component.uid)).map((e=>s[e])).filter((e=>!!e)))(t,s,o)},removeChild:e=>{delete o[e],r.value=r.value.filter((a=>a.uid!==e))}}},be=Symbol("tabsRootContextKey"),me=t({tabs:{type:o(Array),default:()=>s([])}}),fe="ElTabBar",he=n({name:fe});var ge=r(n({...he,props:me,setup(e,{expose:a}){const l=e,t=_(),s=i(be);s||u(fe,"<el-tabs><el-tab-bar /></el-tabs>");const o=d("tabs"),r=c(),n=c(),P=()=>n.value=(()=>{let e=0,a=0;const o=["top","bottom"].includes(s.props.tabPosition)?"width":"height",r="width"===o?"x":"y",n="x"===r?"left":"top";return l.tabs.every((l=>{var s,r;const i=null==(r=null==(s=t.parent)?void 0:s.refs)?void 0:r[`tab-${l.uid}`];if(!i)return!1;if(!l.active)return!0;e=i[`offset${k(n)}`],a=i[`client${k(o)}`];const u=window.getComputedStyle(i);return"width"===o&&(a-=Number.parseFloat(u.paddingLeft)+Number.parseFloat(u.paddingRight),e+=Number.parseFloat(u.paddingLeft)),!1})),{[o]:`${a}px`,transform:`translate${k(r)}(${e}px)`}})(),x=[];p((()=>l.tabs),(async()=>{await v(),P(),(()=>{var e;x.forEach((e=>e.stop())),x.length=0;const a=null==(e=t.parent)?void 0:e.refs;if(a)for(const l in a)if(l.startsWith("tab-")){const e=a[l];e&&x.push(b(e,P))}})()}),{immediate:!0});const C=b(r,(()=>P()));return m((()=>{x.forEach((e=>e.stop())),x.length=0,C.stop()})),a({ref:r,update:P}),(e,a)=>(h(),f("div",{ref_key:"barRef",ref:r,class:y([w(o).e("active-bar"),w(o).is(w(s).props.tabPosition)]),style:g(n.value)},null,6))}}),[["__file","tab-bar.vue"]]);const ye=t({panes:{type:o(Array),default:()=>s([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),we="ElTabNav",_e=n({name:we,props:ye,emits:{tabClick:(e,a,l)=>l instanceof Event,tabRemove:(e,a)=>a instanceof Event},setup(e,{expose:a,emit:l}){const t=i(be);t||u(we,"<el-tabs><tab-nav /></el-tabs>");const s=d("tabs"),o=P(),r=x(),n=c(),m=c(),f=c(),h=c(),g=c(!1),y=c(0),w=c(!1),_=c(!0),R=C((()=>["top","bottom"].includes(t.props.tabPosition)?"width":"height")),A=C((()=>({transform:`translate${"width"===R.value?"X":"Y"}(-${y.value}px)`}))),U=()=>{if(!n.value)return;const e=n.value[`offset${k(R.value)}`],a=y.value;if(!a)return;const l=a>e?a-e:0;y.value=l},q=()=>{if(!n.value||!m.value)return;const e=m.value[`offset${k(R.value)}`],a=n.value[`offset${k(R.value)}`],l=y.value;if(e-l<=a)return;const t=e-l>2*a?l+a:e-a;y.value=t},L=async()=>{const e=m.value;if(!(g.value&&f.value&&n.value&&e))return;await v();const a=f.value.querySelector(".is-active");if(!a)return;const l=n.value,s=["top","bottom"].includes(t.props.tabPosition),o=a.getBoundingClientRect(),r=l.getBoundingClientRect(),i=s?e.offsetWidth-r.width:e.offsetHeight-r.height,u=y.value;let d=u;s?(o.left<r.left&&(d=u-(r.left-o.left)),o.right>r.right&&(d=u+o.right-r.right)):(o.top<r.top&&(d=u-(r.top-o.top)),o.bottom>r.bottom&&(d=u+(o.bottom-r.bottom))),d=Math.max(d,0),y.value=Math.min(d,i)},j=()=>{var a;if(!m.value||!n.value)return;e.stretch&&(null==(a=h.value)||a.update());const l=m.value[`offset${k(R.value)}`],t=n.value[`offset${k(R.value)}`],s=y.value;t<l?(g.value=g.value||{},g.value.prev=s,g.value.next=s+t<l,l-s<t&&(y.value=l-t)):(g.value=!1,s>0&&(y.value=0))},K=e=>{let a=0;switch(e.code){case E.left:case E.up:a=-1;break;case E.right:case E.down:a=1;break;default:return}const l=Array.from(