feat(menu.vue):添加菜单模块

This commit is contained in:
有来技术
2021-12-11 22:00:15 +08:00
parent f94e14e61c
commit 556cd58f5f
8 changed files with 197 additions and 22 deletions

View File

@@ -0,0 +1,18 @@
<template>
<div>
<el-form>
123
</el-form>
</div>
</template>
<script>
export default {
name: "Menu"
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name: "Perm"
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,48 @@
<template>
<div class="app-container">
<el-row :gutter="10">
<el-col :span="10" :xs="24">
<el-card class="box-card" shadow="always">
<template #header>
<svg-icon color="#000" icon-class="menu"/> 菜单列表
</template>
<menu-table @menuClick="handleMenuClick"/>
</el-card>
</el-col>
<el-col :span="14" :xs="24">
<el-card class="box-card" shadow="always">
<div slot="header">
<b v-if=" state.dictCode" style="margin-right: 5px">菜单</b>
<el-tag type="success" v-if=" state.dictCode"><b>{{ state.dictName }}</b></el-tag>
<b v-if=" state.dictCode" style="margin-left: 5px">数据权限</b>
<el-tag type="warning" v-if=" !state.dictCode">未选择菜单</el-tag>
</div>
<perm-table :menuId="state.menuId" :menuName="state.menuName"/>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script setup lang="ts">
import SvgIcon from '@/components/SvgIcon/index.vue';
import MenuTable from './components/Menu.vue'
import PermTable from './components/Perm.vue'
import {reactive} from 'vue'
const state = reactive({
menuId: undefined,
menuName: ''
})
const handleMenuClick = (menuRow: any) => {
state.menuId = menuRow.id
state.menuName = menuRow.name
}
</script>
<style scoped>
</style>