Commit 0c7c0c15 authored by 姬鋆屾's avatar 姬鋆屾

推,修改样式

parent 85058f7c
<template> <template>
<div style="margin-bottom:20px"> <div style="margin-bottom:15px;">
<el-menu :default-active="activeName" class="el-menu-demo" mode="horizontal" @select="handleClick" v-if="thirdList.length>0"> <el-menu
<el-menu-item :index="item.path" v-for="(item,index) in thirdList" :key="index">{{item.name}}</el-menu-item> :default-active="activeName"
</el-menu> class="el-menu-demo"
</div> mode="horizontal"
@select="handleClick"
v-if="thirdList.length > 0"
>
<el-menu-item
:index="item.path"
v-for="(item, index) in thirdList"
:key="index"
>{{ item.name }}</el-menu-item
>
</el-menu>
</div>
</template> </template>
<script> <script>
export default { export default {
props:{ props: {
thirdList:{ thirdList: {
type:Boolean, type: Boolean,
default:[] default: [],
},
activeName:{
type:String,
default:''
}
}, },
methods:{ activeName: {
handleClick(key, keyPath){ type: String,
this.$emit('handleClick',key) default: "",
}
}, },
mounted(){ },
console.log(this.activeName,';ss') methods: {
} handleClick(key, keyPath) {
} this.$emit("handleClick", key);
},
},
mounted() {
console.log(this.activeName, ";ss");
},
};
</script> </script>
<style> <style lang="less" scoped>
/deep/.el-menu-item {
</style> height: 41px;
\ No newline at end of file line-height: 41px;
}
</style>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
:isOpen="isOpen" :isOpen="isOpen"
v-if="menuPage === 'left'" v-if="menuPage === 'left'"
/> />
<div style="padding:20px"> <div style="padding:15px">
<router-view :class="{ active: !isOpen }" /> <router-view :class="{ active: !isOpen }" />
</div> </div>
</div> </div>
...@@ -63,8 +63,8 @@ export default { ...@@ -63,8 +63,8 @@ export default {
position: relative; position: relative;
background: #fff; background: #fff;
// var(--padding-top) 5px 5px 5px; // var(--padding-top) 5px 5px 5px;
padding: 20px;
// margin-left: 60px; // margin-left: 60px;
padding: 10px;
&.active { &.active {
margin-left: var(--margin-left); margin-left: var(--margin-left);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment