1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
| <template>
| <div class="tree-box">
| <div class="t">菜单权限</div>
| <el-tree
| :data="treeData"
| show-checkbox
| default-expand-all
| node-key="id"
| :props="defaultProps"
| :default-checked-keys="userMenus"
| check-on-click-node
| >
| </el-tree>
| <!-- :default-checked-keys="[5]" -->
| <!-- :default-expanded-keys="[2, 3]" -->
| </div>
| </template>
|
| <script>
| export default {
| created() {},
| mounted() {},
| props: {
| treeData: Array,
| userMenus: Array,
| defaultProps: Object,
| },
| data() {
| return {};
| },
|
| methods: {},
| };
| </script>
|
| <style scoped lang="scss">
| .tree-box {
| .t {
| height: 32px;
| background: #f0f5fa;
| border-radius: 3px 3px 0px 0px;
| line-height: 32px;
| text-align: center;
| border-bottom: 1px solid #c0c5cc;
| }
| width: 336px;
| height: 480px;
| border: 1px solid #c0c5cc;
| margin-right: 20px;
| box-sizing: border-box;
| }
| </style>
|
|