1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| <template>
| <a-table class="mars-table" v-bind="attrs">
| <template v-for="(comp, name) in slots" :key="name" v-slot:[name]>
| <component :is="comp" />
| </template>
| </a-table>
| </template>
| <script lang="ts">
| import { useAttrs, useSlots, defineComponent } from "vue"
| export default defineComponent({
| name: "mars-table",
| inheritAttrs: false,
| setup() {
| const attrs = useAttrs()
| const slots = useSlots()
| return {
| attrs,
| slots
| }
| }
| })
| </script>
| <style lang="less" scoped></style>
|
|