<template> <ykc-tabs :tabList="tabList" :active="activeName" @tabClick="tabClick"> <div slot="first">1111111</div> <div slot="second">222222</div> <div slot="third">3333333</div> </ykc-tabs> </template> <script> export default { data() { return { tabList: [ { label: '第一个', name: 'first', }, { label: '第二个', name: 'second', }, { label: '第三个', name: 'third', }, ], activeName: 'first', }; }, methods: { tabClick(e) { console.log(e); }, } }; </script>
← detail