Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
icarusion committed Jun 5, 2018
1 parent 57f64ab commit a25e4f1
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
85 changes: 85 additions & 0 deletions src/components/applications.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<style lang="less">
.apps{
display: inline-block;
float: left;
margin-left: 22px;
padding-left: 22px;
position: relative;
top: 5px;
.ivu-dropdown-rel{
height: 57px;
}
&::after{
content: '';
display: block;
width: 1px;
height: 24px;
background: #ebedee;
position: absolute;
top: 16px;
left: 0;
}
&-menu{
width: 20px;
height: 20px;
cursor: pointer;
}
&-arrow{
position: relative;
top: -4px;
left: 2px;
cursor: pointer;
}
&-img{
width: 24px;
height: 24px;
vertical-align: middle;
}
&-name{
display: inline-block;
vertical-align: middle;
margin-left: 6px;
font-size: 14px;
}
}
</style>
<template>
<div class="apps">
<Dropdown transfer trigger="click" @on-click="handleChange">
<img src="https://file.iviewui.com/icon/application.png" class="apps-menu">
<Icon type="ios-arrow-down" class="apps-arrow"></Icon>
<DropdownMenu slot="list">
<DropdownItem name="iview">
<img src="https://file.iviewui.com/icon/iview.png" class="apps-img">
<span class="apps-name">iView</span>
</DropdownItem>
<DropdownItem name="iview-weapp">
<img src="https://file.iviewui.com/icon/iview.png" class="apps-img">
<span class="apps-name">iView Weapp</span>
</DropdownItem>
<DropdownItem name="inmap">
<img src="https://file.iviewui.com/icon/inmap.png" class="apps-img">
<span class="apps-name">inMap</span>
</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
</template>
<script>
export default {
methods: {
handleChange (name) {
if (name === 'iview') {
window.location.href = 'https://www.iviewui.com';
} else if (name === 'iview-weapp') {
window.location.href = 'https://weapp.iviewui.com';
} else if (name === 'inmap') {
window.location.href = 'http://inmap.talkingdata.com';
}
}
}
};
</script>
3 changes: 3 additions & 0 deletions src/components/menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<router-link to="/" class="wrapper-header-nav-logo">
<img src="../images/logo.png">
</router-link>
<ApplicationMenu></ApplicationMenu>
<div class="wrapper-header-nav-search">
<i-select
ref="select"
Expand Down Expand Up @@ -46,8 +47,10 @@
import navigate from '../config/navigate';
import Config from '../config/config';
import bus from './bus';
import ApplicationMenu from './applications.vue';
export default {
components: { ApplicationMenu },
props: {
activeKey: String
},
Expand Down

0 comments on commit a25e4f1

Please sign in to comment.