|
@@ -1,43 +1,46 @@
|
|
|
<template>
|
|
|
<div class="pageWrap bgc">
|
|
|
- <el-aside v-loading="menuLoading" width="300px" style="margin-right: 10px">
|
|
|
- <el-container style="height: 100%">
|
|
|
- <header style="padding: 13px 15px; border-bottom: 1px solid var(--el-border-color-light)">
|
|
|
- <el-input v-model="menuFilterText" placeholder="输入关键字进行过滤" clearable></el-input>
|
|
|
- </header>
|
|
|
- <el-main class="nopadding">
|
|
|
- <el-tree
|
|
|
- ref="menuRef"
|
|
|
- class="menu-tree"
|
|
|
- node-key="id"
|
|
|
- :data="menuList"
|
|
|
- :props="menuProps"
|
|
|
- highlight-current
|
|
|
- :expand-on-click-node="false"
|
|
|
- check-strictly
|
|
|
- show-checkbox
|
|
|
- :filter-node-method="menuFilterNode"
|
|
|
- @node-click="menuClick"
|
|
|
- >
|
|
|
- <template #default="{ node, data }">
|
|
|
- <span class="custom-tree-node el-tree-node__label">
|
|
|
- <span class="label">
|
|
|
- {{ generateTitle(node.label) }}
|
|
|
+ <div class="aside-box">
|
|
|
+ <el-aside v-loading="menuLoading" width="300px" style="height: 100%">
|
|
|
+ <el-container style="height: 100%">
|
|
|
+ <header style="padding: 13px 15px; border-bottom: 1px solid var(--el-border-color-light)">
|
|
|
+ <el-input v-model="menuFilterText" placeholder="输入关键字进行过滤" clearable></el-input>
|
|
|
+ </header>
|
|
|
+ <el-main class="nopadding">
|
|
|
+ <el-tree
|
|
|
+ ref="menuRef"
|
|
|
+ class="menu-tree"
|
|
|
+ node-key="id"
|
|
|
+ :data="menuList"
|
|
|
+ :props="menuProps"
|
|
|
+ highlight-current
|
|
|
+ :expand-on-click-node="false"
|
|
|
+ check-strictly
|
|
|
+ show-checkbox
|
|
|
+ :filter-node-method="menuFilterNode"
|
|
|
+ @node-click="menuClick"
|
|
|
+ >
|
|
|
+ <template #default="{ node, data }">
|
|
|
+ <span class="custom-tree-node el-tree-node__label">
|
|
|
+ <span class="label">
|
|
|
+ {{ generateTitle(node.label) }}
|
|
|
+ </span>
|
|
|
+ <span class="do">
|
|
|
+ <el-icon @click.stop="add(node, data)"><Plus /></el-icon>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
- <span class="do">
|
|
|
- <el-icon @click.stop="add(node, data)"><Plus /></el-icon>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-tree>
|
|
|
- </el-main>
|
|
|
- <el-footer style="height: 51px">
|
|
|
- <el-button :icon="Refresh" @click="getMenu()"></el-button>
|
|
|
- <el-button type="primary" :icon="Plus" @click="add()"></el-button>
|
|
|
- <el-button type="danger" plain :icon="Delete" @click="delMenu"></el-button>
|
|
|
- </el-footer>
|
|
|
- </el-container>
|
|
|
- </el-aside>
|
|
|
+ </template>
|
|
|
+ </el-tree>
|
|
|
+ </el-main>
|
|
|
+ <el-footer style="height: 51px">
|
|
|
+ <el-button :icon="Refresh" @click="getMenu()"></el-button>
|
|
|
+ <el-button type="primary" :icon="Plus" @click="add()"></el-button>
|
|
|
+ <el-button type="danger" plain :icon="Delete" @click="delMenu"></el-button>
|
|
|
+ </el-footer>
|
|
|
+ </el-container>
|
|
|
+ </el-aside>
|
|
|
+ </div>
|
|
|
+
|
|
|
<el-container class="container-bg">
|
|
|
<el-main ref="mainRef" class="nopadding" style="padding: 20px">
|
|
|
<save ref="saveRef" :menu="menuList"></save>
|
|
@@ -163,6 +166,13 @@ onMounted(() => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+:deep(.el-aside) {
|
|
|
+ &.aside-box {
|
|
|
+ background-color: var(--el-bg-color-page) !important;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
.nopadding {
|
|
|
padding: 0px;
|
|
|
}
|