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.
|
|
|
<template>
|
|
|
|
<a-directory-tree
|
|
|
|
v-model:expandedKeys="expandedKeys"
|
|
|
|
v-model:selectedKeys="selectedKeys"
|
|
|
|
multiple
|
|
|
|
@test="onTest"
|
|
|
|
>
|
|
|
|
<a-tree-node key="0-0" title="parent 0">
|
|
|
|
<a-tree-node key="0-0-0" title="leaf 0-0" is-leaf />
|
|
|
|
<a-tree-node key="0-0-1" title="leaf 0-1" is-leaf />
|
|
|
|
</a-tree-node>
|
|
|
|
<a-tree-node key="0-1" title="parent 1">
|
|
|
|
<a-tree-node key="0-1-0" title="leaf 1-0" is-leaf />
|
|
|
|
<a-tree-node key="0-1-1" title="leaf 1-1" is-leaf />
|
|
|
|
</a-tree-node>
|
|
|
|
</a-directory-tree>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent, ref } from 'vue';
|
|
|
|
export default defineComponent({
|
|
|
|
setup() {
|
|
|
|
const expandedKeys = ref<string[]>(['0-0', '0-1']);
|
|
|
|
const selectedKeys = ref<string[]>([]);
|
|
|
|
return {
|
|
|
|
expandedKeys,
|
|
|
|
selectedKeys,
|
|
|
|
onTest: () => {},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|