vue-tree树状图,横向树状图,流程图
soucegit:https://github.com/zhuyuhaoliar/vue-tree-rightnpm:https://www.npmjs.com/package/vue-tree-rightvue-tree-rightUsagenpm install vue-tree-right1.import TreeRight from "vue-tree-right"2.components
·
source
git:vue-tree-right
npm:vue-tree-right
vue-tree-right
Usage
npm install vue-tree-right
1.import TreeRight from "vue-tree-right"
2.components: {
TreeRight,
}
3.list: [//datasource
{
id: "z1",
name: "leglo",
age: "18",
gender: "男",
work: "web",
children: [
{
name: "leglo1",
age: "18",
gender: "男",
work: "web",
id: "z1-1",
children: [
{
name: "leglo1-1",
age: "18",
gender: "男",
work: "web",
id: "z1-1-1",
children: [
{
name: "leglo1-1-1",
age: "18",
gender: "男",
work: "web",
id: "z1-1-1",
},
],
},
{
id: "z1-1-2",
name: "leglo1-2",
age: "18",
gender: "男",
work: "web",
},
{
id: "z1-1-3",
name: "leglo1-3",
age: "18",
gender: "男",
work: "web",
},
{
id: "z1-1-4",
name: "leglo1-4",
age: "18",
gender: "男",
work: "web",
},
],
},
{
name: "leglo2",
id: "z1-2",
age: "18",
gender: "男",
work: "web",
},
],
},
],
showFields: [//show fields
{
name: "姓名:",
key: "name",
},
{
name: "年龄:",
key: "age",
},
],
4. <TreeRight :list="list" :showfields="showFields" />
Preview
notice
Id是必须得. 它可以是任何不重复的字符;
如果showFields为空,box里面啥也没有- - ;
vue-tree-down 已发布
npm:vue-tree-down
更多推荐
已为社区贡献2条内容
所有评论(0)