You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.5 KiB

import{d as C,dQ as b,bY as I,m as T,f as l,u as x,e as M,aT as h,aU as m,o as i,a as k,w as v,g as c,j as w,t as D,x as g,b as E}from"./index-f4658ae7.js";import{useTabDropdown as y}from"./useTabDropdown-dc504d39.js";import"./types-577cf6cb.js";const _=C({name:"TabContent",components:{Dropdown:b,Icon:I},props:{tabItem:{type:Object,default:null},isExtra:Boolean},setup(e){const{prefixCls:t}=T("multiple-tabs-content"),{t:p}=M(),d=l(()=>{const{tabItem:{meta:s}={}}=e;return s&&p(s.title)}),o=l(()=>!e.isExtra),u=l(()=>x(o)?["contextmenu"]:["click"]),{getDropMenuList:a,handleMenuEvent:r,handleContextMenu:n}=y(e,o);function f(s){e.tabItem&&n(e.tabItem)(s)}return{prefixCls:t,getDropMenuList:a,handleMenuEvent:r,handleContext:f,getTrigger:u,getIsTabs:o,getTitle:d}}}),$={class:"ml-1"};function B(e,t,p,d,o,u){const a=m("Icon"),r=m("Dropdown");return i(),k(r,{dropMenuList:e.getDropMenuList,trigger:e.getTrigger,placement:"bottom",overlayClassName:"multiple-tabs__dropdown",onMenuEvent:e.handleMenuEvent},{default:v(()=>[e.getIsTabs?(i(),c("div",{key:0,class:g(`${e.prefixCls}__info`),onContextmenu:t[0]||(t[0]=(...n)=>e.handleContext&&e.handleContext(...n)),style:{"font-size":"14px !important"}},[w("span",$,D(e.getTitle),1)],34)):(i(),c("span",{key:1,class:g(`${e.prefixCls}__extra-quick`),onClick:t[1]||(t[1]=(...n)=>e.handleContext&&e.handleContext(...n))},[E(a,{icon:"ion:chevron-down"})],2))]),_:1},8,["dropMenuList","trigger","onMenuEvent"])}const z=h(_,[["render",B]]);export{z as default};