Commit fed1e7bb authored by 周远喜's avatar 周远喜

ok

parent e09caa9f
......@@ -13,10 +13,15 @@ export const exampleRouter = [
},
{
route: '/test/example/table',
title: 'treeGrid组件',
title: '表格',
name: 'components-table',
icon: 'md-aperture'
},
{
route: '/test/example/tree',
title: '树',
icon: 'md-aperture'
},
{
route: '/test/example/select',
title: 'select组件',
......
<template>
<div class="tree">
<TreeGrid :columns="columns" :items="treeData"></TreeGrid>
<Input v-model="data" type="textarea" rows="20" placeholder=""></Input>
</div>
</template>
<script>
import Mock from "mockjs";
export default {
name: "",
data() {
return {
columns: [
{
key: "name",
title: "名称",
},
{
key: "status",
title: "状态",
width: "100",
},
{
key: "action",
title: "操作",
width: "100",
},
],
treeData1: [],
treeData: [
{
action: "510000202006085435",
name: "书加部保处",
status: 0,
children: [
{ action: "430000200008054924", name: "越组大过越", status: 0 },
{ action: "350000200106195747", name: "反走和报山", status: 1 },
{ action: "46000019920810827X", name: "强级法量少务持", status: 1 },
{ action: "620000198005286979", name: "况题米", status: 1 },
{ action: "440000200901093872", name: "又多为", status: 0 },
],
},
{ action: "510000199304272074", name: "参什叫", status: 1 },
{ action: "710000199110144186", name: "情克应个该农", status: 1 },
{ action: "140000201204175550", name: "阶研其交式", status: 1 },
{ action: "500000198710051748", name: "议开你集", status: 1 },
],
data: "",
};
},
mounted() {
// this.init();
},
methods: {
init() {
var data = Mock.mock({
"data|5": [
{
action: "@id",
name: "@ctitle",
"status|1": [0, 1],
},
],
});
console.warn(data);
this.data = JSON.stringify(data.data);
this.treeData = data.data;
},
},
};
</script>
<style lang="less" >
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment