<template>
  <div>
    <a-tabs default-active-key="1" @change="callback">
      <a-tab-pane key="1">
        <a-button slot="tab" type="primary"> Primary </a-button>
      </a-tab-pane>
      <a-tab-pane key="2" tab="Tab 2"> Content of Tab Pane 2 </a-tab-pane>
      <a-tab-pane key="3" tab="Tab 3"> Content of Tab Pane 3 </a-tab-pane>
    </a-tabs>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  methods: {
    callback(key) {
      console.log(key);
    },
  },
  
  created() {},
};
</script>
// TabBarTabsNode.js 80行
在 a-tab-pane 中使用插槽 名称必须是tab因为源码中写死了 
Logo

前往低代码交流专区

更多推荐