refactor:dropdown menu
This commit is contained in:
parent
3f9df15c30
commit
43a51148fe
1 changed files with 3 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="share-dropdown-menu" @click.native="click" :class="{active:isActive}">
|
||||
<div class="share-dropdown-menu" :class="{active:isActive}">
|
||||
<div class="share-dropdown-menu-wrapper">
|
||||
<span class="share-dropdown-menu-title">{{title}}</span>
|
||||
<span class="share-dropdown-menu-title" @click.self="clickTitle">{{title}}</span>
|
||||
<div class="share-dropdown-menu-item" v-for="(item,index) of items" :key='index'>
|
||||
<a v-if="item.href" :href="item.href" target="_blank">{{item.title}}</a>
|
||||
<span v-else>{{item.title}}</span>
|
||||
|
@ -27,7 +27,7 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
clickTitle() {
|
||||
this.isActive = !this.isActive
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,6 @@ $t: .1s;
|
|||
&-title {
|
||||
width: 100%;
|
||||
display: block;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background: black;
|
||||
color: white;
|
||||
|
|
Loading…
Reference in a new issue