1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
| <template>
| <a-layout-header style="background: #fff; padding: 0 12px 0 0;box-shadow: 0 1px 4px rgba(0,21,41,.08);">
| <a-icon class="trigger" :type="collapsed ? 'menu-unfold' : 'menu-fold'" @click="toggleCollapse"/>
| <div style="float: right">
| <header-search class="header-item"/>
| <a-tooltip class="header-item" title="帮助文档" placement="bottom" >
| <a>
| <a-icon type="question-circle-o" />
| </a>
| </a-tooltip>
| <header-notice class="header-item"/>
| <header-avatar class="header-item"/>
| </div>
| </a-layout-header>
| </template>
|
| <script>
| import ALayout from 'vue-antd-ui/es/layout'
| import AIcon from 'vue-antd-ui/es/icon/icon'
| import AInputSearch from 'vue-antd-ui/es/input/Search'
| import HeaderSearch from './HeaderSearch'
| import HeaderNotice from './HeaderNotice'
| import ATooltip from 'vue-antd-ui/es/tooltip/Tooltip'
| import HeaderAvatar from './HeaderlAvatar'
|
| const ALayoutSider = ALayout.Sider
| const ALayoutHeader = ALayout.Header
| export default {
| name: 'GloablHeader',
| components: {
| HeaderAvatar,
| ATooltip,
| HeaderNotice,
| HeaderSearch,
| AInputSearch,
| AIcon,
| ALayout,
| ALayoutSider,
| ALayoutHeader},
| props: ['collapsed'],
| data () {
| return {
| }
| },
| methods: {
| toggleCollapse () {
| this.$emit('toggleCollapse')
| }
| }
| }
| </script>
|
| <style scoped>
| .trigger {
| font-size: 20px;
| line-height: 64px;
| padding: 0 24px;
| cursor: pointer;
| transition: color .3s;
| }
|
| .trigger:hover {
| color: #1890ff;
| }
|
| .header-item{
| margin: 0 12px;
| display: inline-block;
| height: 100%;
| cursor: pointer;
| }
| .header-item i{
| font-size: 16px;
| color: rgba(0,0,0,.65);
| }
| </style>
|
|