2020年15日 星期一
The two most important days in your life are the day you are born and the day you find out why.
之前因为要回京,处理了一大堆的事情,所以这日报三天没有写,好在是到现在都安排好了。但是本来是可以回学校的,不巧的是北京本土又有新增病例多达30多例,没办法了,是好在租的地方继续学习, 今天早上呢,也是大概总结了一下学习计划,然后就开始早读。
今天主要是吧后台管理系统案例的删除(del)、角色权限,分配角色,Element上面的Tree

<el-tree
:data="data"
show-checkbox
node-key="id"
:default-expanded-keys="[2, 3]"
:default-checked-keys="[5]"
:props="defaultProps">
</el-tree>
<script>
export default {
data() {
return {
data: [{
id: 1,
label: '一级 1',
children: [{
id: 4,
label: '二级 1-1',
children: [{
id: 9,
label: '三级 1-1-1'
}, {
id: 10,
label: '三级 1-1-2'
}]
}]
}, {
id: 2,
label: '一级 2',
children: [{
id: 5,
label: '二级 2-1'
}, {
id: 6,
label: '二级 2-2'
}]
}, {
id: 3,
label: '一级 3',
children: [{
id: 7,
label: '二级 3-1'
}, {
id: 8,
label: '二级 3-2'
}]
}],
defaultProps: {
children: 'children',
label: 'label'
}
};
}
};
</script>
之前实现这种方法都是用vue组件的递归写的,使用for循环也可以,但是这个样式一直很是不悦,element ui 之前也用过但是没有很详细的看过,所以这是今天我学到的,并且成功的使用到了自己的项目中。
因为疫情的原因,现在也只能在家继续学习了,现在能做的只有尽量减少出门,注意个人卫生,勤戴口罩。