mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 00:42:59 +08:00
1 line
1.3 KiB
JavaScript
1 line
1.3 KiB
JavaScript
import{d as b,r as f,x as u,V as h,z as y,o as t,c as i,e as g,b as d,F as x,E as k,I as T,t as C,A as D,b4 as F,b5 as w,aI as B,D as z,k as I}from"./index-e62f5c21.js";const V={class:"col-span-12"},q={class:"bg-white shadow-md mt-2"},A={class:"-mb-px flex justify-start"},E=["onClick"],N=b({__name:"FelTabs",props:{tabs:{type:Array,required:!0},initialTab:{type:String,required:!1}},emits:["tab-change"],setup(p,{emit:m}){const o=p,s=f(o.initialTab||o.tabs[0]?.id),n=u(()=>o.tabs.filter(e=>!e.hidden)),r=u(()=>n.value.find(e=>e.id===s.value)),_=m,l=e=>{s.value=e,_("tab-change",e)};return h(n,e=>{!e.some(c=>c.id===s.value)&&e.length>0&&l(e[0].id)},{immediate:!0}),(e,c)=>{const v=y("motion-slide-left");return t(),i("section",V,[g((t(),i("nav",q,[d("div",A,[(t(!0),i(x,null,k(n.value,a=>(t(),i("a",{key:a.id,class:T(["no-underline text-gray-500 uppercase tracking-wide font-bold text-xs py-1 px-4","tab hover:bg-sky-600 hover:text-gray-200 cursor-pointer",{"tab-active":s.value===a.id}]),onClick:P=>l(a.id)},C(a.label),11,E))),128))])])),[[v]]),d("div",null,[r.value?(t(),D(B(r.value.component),F(w({key:0},r.value.props||{})),null,16)):z("",!0)])])}}});const j=I(N,[["__scopeId","data-v-38432961"],["__file","/home/aurthurm/Documents/Development/felicity/felicity-lims/webapp/components/ui/tabs/FelTabs.vue"]]);export{j as default};
|