You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
552 B
23 lines
552 B
7 months ago
|
<template>
|
||
|
<a-tree v-bind="getBindValue">
|
||
|
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
||
|
<slot :name="item" v-bind="data || {}"></slot>
|
||
|
</template>
|
||
|
</a-tree>
|
||
|
</template>
|
||
|
<script lang="ts">
|
||
|
import { computed, defineComponent } from 'vue';
|
||
|
|
||
|
export default defineComponent({
|
||
|
name: 'NsTree',
|
||
|
setup(props, { attrs }) {
|
||
|
const getBindValue = computed(() => ({
|
||
|
...attrs,
|
||
|
...props,
|
||
|
}));
|
||
|
return { getBindValue };
|
||
|
},
|
||
|
});
|
||
|
</script>
|
||
|
<style lang="less" scoped></style>
|