222
schangxiang@126.com
2025-05-08 961b4e2cd6d9621b5090fc3477615b649bb05737
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { defineComponent, SetupContext, PropType } from 'vue'
import styles from './Tab.module.scss'
 
export default defineComponent({
  name: 'TabPane',
  props: {
    label: {
      type: String as PropType<string>,
    },
    name: {
      type: String as PropType<string>,
    },
    // 添加其他属性
  },
  setup(props: any, ctx: SetupContext) {
    return () => (
      <el-tab-pane class={styles.pane} label={props.label} name={props.name}>
        {ctx.slots.default && ctx.slots.default()}
      </el-tab-pane>
    )
  },
})