is still developing, I find that I really know too little, and the data in the background is like this
.{
"code": 0,
"message": "",
"data": [
{
"id": 2,
"name": "",
"url": "",
"list": [
{
"id": 13,
"name": "",
"url": "/common/list_type"
},
{
"id": 14,
"name": "",
"url": "/common/list_order"
}
]
},
{
"id": 3,
"name": "",
"url": "",
"list": [
{
"id": 18,
"name": "",
"url": "/pay/wx/order"
},
{
"id": 19,
"name": "",
"url": "/pay/wx/notify"
},
{
"id": 20,
"name": "",
"url": "/pay/wx/verify"
}
]
},
{
"id": 4,
"name": "",
"url": "",
"list": [
{
"id": 21,
"name": "",
"url": "/common/list_member"
},
{
"id": 22,
"name": "",
"url": "/common/save_member"
},
{
"id": 23,
"name": "",
"url": "/common/get_member"
},
{
"id": 24,
"name": "",
"url": "/common/delete_member"
}
]
},
{
"id": 5,
"name": "",
"url": "",
"list": [
{
"id": 25,
"name": "",
"url": "/common/list_meeting"
},
{
"id": 26,
"name": "",
"url": "/common/save_meeting"
},
{
"id": 27,
"name": "",
"url": "/common/get_meeting"
}
]
}
],
"success": true
}
uses the tree table of ele.me "s background management system, but if you want to embed the data, you will not grade it.
only shows the first level, while the second level does not show
found many ways on the Internet and felt useless.
<tree-table :data="data" :eval-func="func" :eval-args="args" :expand-all="expandAll" border>
<el-table-column label="" align="center">
<template slot-scope="scope">
<span style="color:sandybrown">{{ scope.row.name }}</span>
<!-- <el-tag>{{ scope.row.timeLine+"ms" }}</el-tag> -->
</template>
</el-table-column>
<el-table-column label="" width="500" align="center">
<template slot-scope="scope">
<el-button type="text" @click="message(scope.row)"></el-button>
</template>
</el-table-column>
</tree-table>
this is the structure of the tree table
data() {
return {
func: treeToArray,
expandAll: false,
data: {
id: "",
name: "",
children: [
{
id: "",
name: ""
}
]
},
args: [null, null, "timeLine"]
};
},
this is the format of the initial data. Am I wrong in the initial format?
has also introduced its widgets, which doesn"t seem to be the problem? Ask the boss to take a look at it!