UNPKG

ll-package

Version:

2 lines (1 loc) 1.03 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),v=require("../TabContext.js"),m=require("../../../_util/vnode.js"),b=a.defineComponent({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(s){const{tabs:i,prefixCls:c}=v.useInjectTabs();return()=>{const{id:d,activeKey:o,animated:l,tabPosition:u,rtl:y,destroyInactiveTabPane:p}=s,n=l.tabPane,t=c.value,r=i.value.findIndex(e=>e.key===o);return a.createVNode("div",{class:`${t}-content-holder`},[a.createVNode("div",{class:[`${t}-content`,`${t}-content-${u}`,{[`${t}-content-animated`]:n}],style:r&&n?{[y?"marginRight":"marginLeft"]:`-${r}00%`}:null},[i.value.map(e=>m.cloneElement(e.node,{key:e.key,prefixCls:t,tabKey:e.key,id:d,animated:n,active:e.key===o,destroyInactiveTabPane:p}))])])}}});exports.default=b;