| <template> | |
| <el-col :span="data.span"> | |
| <el-menu | |
| :default-active="activeIndex" | |
| class="el-menu-demo" | |
| :mode="data.direction" | |
| @select="(key, keyPath) => console.log(key, keyPath)" | |
| :ellipsis="false" | |
| active-text-color="#ffd04b" | |
| background-color="#545c64" | |
| text-color="#fff" | |
| > | |
| <template v-for="item in data.menuItems"> | |
| <el-menu-item | |
| v-if="!item.subItems" | |
| :key="item.index" | |
| :index="item.index" | |
| :disabled="item.disabled" | |
| > | |
| {{ item.title }} | |
| </el-menu-item> | |
| <el-sub-menu v-else :key="item.index" :index="item.index"> | |
| <template #title>{{ item.title }}</template> | |
| <el-menu-item | |
| v-for="subItem in item.subItems" | |
| :key="subItem.index" | |
| :index="subItem.index" | |
| > | |
| {{ subItem.title }} | |
| </el-menu-item> | |
| </el-sub-menu> | |
| </template> | |
| </el-menu> | |
| </el-col> | |
| </template> |