<template>
<el-container style="height: 100vh;">
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
<!-- 侧边栏内容 -->
<el-menu
:default-openeds="['1']"
:default-active="'1-1'"
class="el-menu-vertical-demo"
@open="handleOpen"
@close="handleClose">
<!-- 菜单项 -->
<el-submenu index="1">
<template slot="title">
<i class="el-icon-location"></i>
<span>导航一</span>
</template>
<el-menu-item index="1-1">选项1</el-menu-item>
<el-menu-item index="1-2">选项2</el-menu-item>
</el-submenu>
<!-- 更多菜单项 -->
</el-menu>
</el-aside>
<el-container>
<el-header style="text-align: right; font-size: 12px">
<el-dropdown>
<i class="el-icon-setting" style="margin-right: 15px"></i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>查看</el-dropdown-item>
<el-dropdown-item>隐藏</el-dropdown-item>
<el-dropdown-item>锁定</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<span>王小虎</span>
</el-header>
<el-main>
<!-- 主要内容 -->
<el-table :data="tableData">
<!-- 表格列定义 -->
</el-table>
</el-main>
</el-container>
</el-container>
</template>
<script>
export default {
data() {
const item = {
date: '2016-05-02',
name: 'Tom',
state: 'California',
city: 'Los Angeles',
address: 'No. 189, Grove St, Los Angeles',
zip: 'CA 90036'
};
return {
tableData: Array(20).fill(item)
};
},
methods: {
handleOpen(key, keyPath) {
console.log('open', key, keyPath);
},
handleClose(key, keyPath) {
console.log('close', key, keyPath);
}
}
};
</script>
<style>
.el-header {
background-color: #B3C0D1;
color: var(--el-text-color-primary);
text-align: center;
line-height: 60px;
}
.el-aside {
color: var(--el-text-color-primary);
}
</s
评论已关闭