Skip to content

Commit ff4a5dc

Browse files
authored
fix action button hover issue. (#148)
1 parent 479191e commit ff4a5dc

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/assets/scss/common/_card.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,14 @@
9999
top: 1rem;
100100
transition: all 0.2s;
101101
outline: none;
102-
z-index: 20;
102+
z-index: 10;
103103
.action-btn-trigger{
104104
visibility: hidden;
105105
opacity: 0;
106+
pointer-events: none;
107+
}
108+
&.action-btn-hover{
109+
z-index: 20;
106110
}
107111
}
108112

@@ -125,6 +129,7 @@
125129
.action-btn-trigger{
126130
visibility: visible;
127131
opacity: 1;
132+
pointer-events: auto;
128133
}
129134
}
130135
}

src/components/Apps/AppCard.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div class="common-card is-flex is-align-items-center is-justify-content-center app-card aspect-square"
3-
@mouseleave="hover = true" @mouseover="hover = true">
3+
@mouseleave="hover = true;" @mouseover="hover = true" @mouseenter="actionBtnHover = true">
44
<!-- Action Button Start -->
5-
<div v-if="item.app_type !== 'system' && !isMircoApp && !isContainerApp && !isUninstalling && !isRebuilding" class="action-btn">
5+
<div v-if="item.app_type !== 'system' && !isMircoApp && !isContainerApp && !isUninstalling && !isRebuilding" class="action-btn" :class="{'action-btn-hover': actionBtnHover}">
66
<b-dropdown ref="dro" v-on-click-outside="() => ($refs.dro.isActive = false)" :mobile-modal="false"
77
:triggers="['contextmenu', 'click']" animation="fade1" aria-role="list" class="app-card-drop"
88
:position="dropdownPosition" @active-change="setDropState">
@@ -157,6 +157,7 @@ export default {
157157
data() {
158158
return {
159159
hover: false,
160+
actionBtnHover: false,
160161
dropState: false,
161162
isUninstalling: false,
162163
isCloning: false,
@@ -379,6 +380,9 @@ export default {
379380
*/
380381
setDropState(e) {
381382
this.dropState = e;
383+
if (!this.dropState) {
384+
this.actionBtnHover = false;
385+
}
382386
},
383387
384388
/**

0 commit comments

Comments
 (0)