import{d as B,f as b,U as r,a2 as D,ad as g,af as o,k as e,a4 as A,G as a,a3 as T,ae as _,a5 as v,F as P}from"./vue-vendor-CxLCUzY4.js";import{C as $}from"./index-DS3utcig.js";import{bo as y,bn as w,u as L,_ as N}from"./index-CLZzJyTP.js";import{P as V}from"./index-D55rh6hR.js";import{A as E,j as k}from"./antd-vue-vendor-CahNzUUa.js";import"./index-BZbg0EjM.js";import"./index-DvqyyN77.js";import"./index-CrdW4fN1.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-DLfJuPsF.js";import"./useWindowSizeFn-D9PllI8g.js";import"./useContentViewHeight-BIb_dTbE.js";import"./usePageContext-FyDvfV_K.js";import"./injectionKey-DPVn4AgL.js";const W=B({name:"TabsDemo",components:{CollapseContainer:$,PageWrapper:V,[k.name]:k,[E.name]:E},setup(){const t=y(),u=b(""),{closeAll:C,closeLeft:c,closeRight:f,closeOther:F,closeCurrent:i,refreshPage:s,setTitle:m}=w(),{createMessage:n}=L();function p(){u.value?m(u.value):n.error("请输入要设置的Tab标题！")}function l(d){t(`/comp/basic/tabs/detail/${d}`)}return{closeAll:C,closeLeft:c,closeRight:f,closeOther:F,closeCurrent:i,toDetail:l,refreshPage:s,setTabTitle:p,title:u}}}),G={class:"mt-2 flex flex-grow-0"};function M(t,u,C,c,f,F){const i=r("a-alert"),s=r("a-button"),m=r("a-input"),n=r("CollapseContainer"),p=r("PageWrapper");return D(),g(p,{title:"标签页操作示例"},{default:o(()=>[e(n,{title:"在下面输入框输入文本,切换后回来内容会保存"},{default:o(()=>[e(i,{banner:"",message:"该操作不会影响页面标题，仅修改Tab标题"}),A("div",G,[e(s,{class:"mr-2",onClick:t.setTabTitle,type:"primary"},{default:o(()=>u[1]||(u[1]=[a(" 设置Tab标题 ")])),_:1},8,["onClick"]),e(m,{placeholder:"请输入",value:t.title,"onUpdate:value":u[0]||(u[0]=l=>t.title=l),class:"mr-4 w-12"},null,8,["value"])])]),_:1}),e(n,{class:"mt-4",title:"标签页操作"},{default:o(()=>[e(s,{class:"mr-2",onClick:t.closeAll},{default:o(()=>u[2]||(u[2]=[a(" 关闭所有 ")])),_:1},8,["onClick"]),e(s,{class:"mr-2",onClick:t.closeLeft},{default:o(()=>u[3]||(u[3]=[a(" 关闭左侧 ")])),_:1},8,["onClick"]),e(s,{class:"mr-2",onClick:t.closeRight},{default:o(()=>u[4]||(u[4]=[a(" 关闭右侧 ")])),_:1},8,["onClick"]),e(s,{class:"mr-2",onClick:t.closeOther},{default:o(()=>u[5]||(u[5]=[a(" 关闭其他 ")])),_:1},8,["onClick"]),e(s,{class:"mr-2",onClick:t.closeCurrent},{default:o(()=>u[6]||(u[6]=[a(" 关闭当前 ")])),_:1},8,["onClick"]),e(s,{class:"mr-2",onClick:t.refreshPage},{default:o(()=>u[7]||(u[7]=[a(" 刷新当前 ")])),_:1},8,["onClick"])]),_:1}),e(n,{class:"mt-4",title:"标签页复用超出限制自动关闭(使用场景: 动态路由)"},{default:o(()=>[(D(),T(P,null,_(6,l=>e(s,{key:l,class:"mr-2",onClick:d=>t.toDetail(l)},{default:o(()=>[a(" 打开"+v(l)+"详情页 ",1)]),_:2},1032,["onClick"])),64))]),_:1})]),_:1})}const h=N(W,[["render",M]]);export{h as default};
