This commit is contained in:
gaoshuaixing
2020-12-18 15:33:14 +08:00
parent 02d0a2d753
commit ed01956e26
4 changed files with 19 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
{
"name": "antd-demo",
"name": "electron-egg",
"version": "0.1.0",
"private": true,
"scripts": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -11,18 +11,6 @@ Router.prototype.push = function push (location, onResolve, onReject) {
Vue.use(Router)
// const Foo = { template: '<div>foo</div>' }
// const Bar = { template: '<div>bar</div>' }
// const constantRouterMap = [
// { path: '/testa', component: Foo },
// { path: '/testb', component: Bar }
// ]
// const constantRouterMap = [
// { path: '/testb', component: () => import('@/views/Contentb') }
// ]
export default new Router({
mode: 'history',
routes: constantRouterMap

View File

@@ -2,10 +2,11 @@
<a-layout id="components-layout-demo-responsive">
<a-layout-sider
v-model="collapsed"
theme="dark"
theme="light"
class="layout-sider"
>
<div class="logo"></div>
<a-menu class="menu-item" theme="dark" mode="inline" @click="menuHandle" :default-selected-keys="['menu_1']">
<div class="logo"><img class="pic-logo" src="~@/assets/logo.png"></div>
<a-menu class="menu-item" theme="light" mode="inline" @click="menuHandle" :default-selected-keys="['menu_1']">
<a-menu-item :key="index" v-for="(menuInfo, index) in menu" :title="menuInfo.title">
<a-icon :type="menuInfo.icon" />
</a-menu-item>
@@ -14,7 +15,7 @@
<a-layout>
<a-layout-sider
theme="light"
style="background-color: #FAFAFA;"
class="sub-layout-sider"
>
<a-menu class="sub-menu-item" theme="light" mode="inline" v-model="subMenuKey" :default-selected-keys="subMenuKey">
<a-menu-item :key="subIndex" v-for="(menuInfo, subIndex) in subMenu">
@@ -94,17 +95,26 @@ export default {
// 嵌套
#components-layout-demo-responsive {
.logo {
border-bottom: 1px solid #e8e8e8;
}
.pic-logo {
height: 32px;
background: rgba(139, 137, 137, 0.2);
margin: 16px;
}
//background: rgba(139, 137, 137, 0.2);
margin: 10px;
}
.layout-sider {
border-right: 1px solid #e8e8e8;
}
.menu-item {
.ant-menu-item {
background-color: #001529;
background-color: #fff;
margin-top: 0px;
margin-bottom: 0px;
}
}
.sub-layout-sider {
background-color: #FAFAFA;
}
.sub-menu-item {
.ant-menu-item {
margin-top: 0px;