fix: some style problem #5

This commit is contained in:
iczer 2018-08-13 20:54:27 +08:00
parent c4eaac050c
commit 13fdf915d7
4 changed files with 45 additions and 39 deletions

View File

@ -2,7 +2,7 @@
<a-layout-header class="gloabl-header">
<a-icon class="trigger" :type="collapsed ? 'menu-unfold' : 'menu-fold'" @click="toggleCollapse"/>
<div style="float: right">
<header-search class="header-item"/>
<header-search class="header-item" />
<a-tooltip class="header-item" title="帮助文档" placement="bottom" >
<a>
<a-icon type="question-circle-o" />
@ -50,7 +50,7 @@ export default {
}
</script>
<style scoped>
<style lang="less" scoped>
.trigger {
font-size: 20px;
line-height: 64px;
@ -64,14 +64,14 @@ export default {
}
.header-item{
margin: 0 12px;
padding: 0 12px;
display: inline-block;
height: 100%;
cursor: pointer;
}
.header-item i{
font-size: 16px;
color: rgba(0,0,0,.65);
i{
font-size: 16px;
color: rgba(0,0,0,.65);
}
}
.gloabl-header{
background: #fff;

View File

@ -1,6 +1,6 @@
<template>
<a-layout>
<a-layout-sider width="256px" style="z-index: 10" collapsible v-model="collapsed" :trigger="null">
<a-layout-sider class="sider" width="256px" collapsible v-model="collapsed" :trigger="null">
<div class="logo">
<a href="/">
<img src="static/img/vue-antd-logo.png">
@ -66,28 +66,32 @@ export default {
}
</script>
<style scoped>
.logo{
height: 64px;
position: relative;
line-height: 64px;
padding-left: 24px;
-webkit-transition: all .3s;
transition: all .3s;
background: #002140;
overflow: hidden;
}
.logo h1{
color: #fff;
font-size: 20px;
margin: 0 0 0 12px;
font-family: "Myriad Pro","Helvetica Neue",Arial,Helvetica,sans-serif;
font-weight: 600;
display: inline-block;
}
.logo img{
width: 32px;
display: inline-block;
vertical-align: middle;
<style lang="less" scoped>
.sider{
z-index: 10;
box-shadow: 2px 0 6px rgba(0,21,41,.35);
.logo{
height: 64px;
position: relative;
line-height: 64px;
padding-left: 24px;
-webkit-transition: all .3s;
transition: all .3s;
background: #002140;
overflow: hidden;
h1{
color: #fff;
font-size: 20px;
margin: 0 0 0 12px;
font-family: "Myriad Pro","Helvetica Neue",Arial,Helvetica,sans-serif;
font-weight: 600;
display: inline-block;
}
img{
width: 32px;
display: inline-block;
vertical-align: middle;
}
}
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<span class="header-item">
<span class="">
<a-icon type="search" style="font-size: 16px; cursor: pointer;" @click="enterSearchMode"/>
<a-auto-complete
ref="input"
@ -69,7 +69,4 @@ export default {
.fade-leave{
width: 0px;
}
.header-item{
margin: 0 12px;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<a-dropdown style="display: inline-block; height: 100%" >
<span style="vertical-align: middle; cursor: pointer">
<a-avatar style="vertical-align: middle;" size="small" shape="circle" :src="currUser.avatar"/>
<span style="cursor: pointer">
<a-avatar class="avatar" size="small" shape="circle" :src="currUser.avatar"/>
<span>{{currUser.name}}</span>
</span>
<a-menu style="width: 150px" slot="overlay">
@ -44,6 +44,11 @@ export default {
}
</script>
<style scoped>
<style lang="less" scoped>
.avatar{
margin: 20px 4px 20px 0;
color: #1890ff;
background: hsla(0,0%,100%,.85);
vertical-align: middle;
}
</style>