he-tree-vue
he-tree-vue copied to clipboard
Multiple `foldingTransition` warnings
Adding a Tree
with v-slot
results in multiple foldingTransition
warnings. Is this the correct way to customize how the tree is displayed with Vue 3?
https://he-tree-vue.phphe.com/guide.html#custom-display-through-default-slot
Here's a minimal implementation of the problem, adding the Tree
to a HelloWorld
component built with the Vue Cli:
<template>
<Tree :value="treeData" v-slot="{ node, index, path, tree }">
<span>
<b>{{ index }}</b>
Title: {{ node.title }} - path: <i>{{ path.join(",") }}</i>
</span>
</Tree>
...
</template>
<script>
import { Tree } from "he-tree-vue";
export default {
...
components: { Tree },
data() {
return {
treeData: [
{ title: "node 1" },
{ title: "node 2", children: [{ title: "node 2-1" }] },
],
};
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
...
</style>
foldingTransition belongs to fold plugin. You can mixin fold plugin in your use.
How come the warnings show up even though I'm not using the plugin? I don't intend to either. Shouldn't the warnings be suppressed by default, i.e. not using the plugin?