Fix the bug of display toot dropdown menu

This commit is contained in:
Sardo 2018-04-10 16:45:23 +08:00
parent bdeb77cccc
commit 5d42f9c62f
1 changed files with 7 additions and 16 deletions

View File

@ -38,10 +38,10 @@
<el-button type="text" @click="changeFavourite(originalMessage(message))" :class="originalMessage(message).favourited ? 'favourited' : 'favourite'">
<icon name="star" scale="0.9"></icon>
</el-button>
<el-button type="text" v-popover:menu.bottom>
<el-button type="text" v-popover="{ name: message.id }">
<icon name="ellipsis-h" scale="0.9"></icon>
</el-button>
<popover name="menu" :width="120">
<popover :name="message.id" :width="120">
<ul class="toot-menu">
<li role="button" @click="openDetail(message)">
View Toot Detail
@ -89,6 +89,11 @@ export default {
openReply (message) {
this.$store.dispatch('TimelineSpace/Modals/NewToot/openReply', message)
},
openDetail (message) {
this.$store.dispatch('TimelineSpace/Contents/SideBar/openTootComponent')
this.$store.dispatch('TimelineSpace/Contents/SideBar/TootDetail/changeToot', message)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
},
changeReblog (message) {
if (message.reblogged) {
this.$store.dispatch('TimelineSpace/Contents/Cards/Toot/unreblog', message)
@ -146,11 +151,6 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
},
openDetail (message) {
this.$store.dispatch('TimelineSpace/Contents/SideBar/openTootComponent')
this.$store.dispatch('TimelineSpace/Contents/SideBar/TootDetail/changeToot', message)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
}
}
}
@ -263,15 +263,6 @@ function findLink (target) {
color: #e6a23c;
}
div[data-popover="menu"] {
box-shadow: none;
border: 1px solid #ddd;
&::before{
filter: drop-shadow(0 -1px 0px #ddd);
}
}
.toot-menu{
padding: 0;
font-size: 0.8em;