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.
ant-design-vue/examples/App.vue

32 lines
856 B

<template>
3 years ago
<a-directory-tree
3 years ago
v-model:expandedKeys="expandedKeys"
v-model:selectedKeys="selectedKeys"
3 years ago
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>
3 years ago
<script lang="ts">
3 years ago
import { defineComponent, ref } from 'vue';
3 years ago
export default defineComponent({
setup() {
3 years ago
const expandedKeys = ref<string[]>(['0-0', '0-1']);
3 years ago
const selectedKeys = ref<string[]>([]);
3 years ago
return {
expandedKeys,
selectedKeys,
3 years ago
onTest: () => {},
3 years ago
};
},
});
</script>