fix: bugs

This commit is contained in:
qier222 2021-04-27 02:00:44 +08:00
parent 2b22c7e050
commit 9ccce5b468
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
8 changed files with 5 additions and 16 deletions

View file

@ -15,6 +15,8 @@
</template>
<script>
import { disableScrolling, enableScrolling } from '@/utils/ui';
export default {
name: 'ContextMenu',
data() {
@ -40,6 +42,7 @@ export default {
if (this.$parent.closeMenu !== undefined) {
this.$parent.closeMenu();
}
enableScrolling();
},
openMenu(e) {
@ -51,6 +54,7 @@ export default {
}.bind(this)
);
e.preventDefault();
disableScrolling();
},
},
};
@ -61,6 +65,7 @@ export default {
width: 100%;
height: 100%;
user-select: none;
-webkit-app-region: no-drag;
}
.menu {

View file

@ -147,7 +147,6 @@ export default {
transition: transform 0.3s;
&:hover {
cursor: pointer;
transform: scale(1.02);
}
}
img {

View file

@ -43,7 +43,6 @@
import { mapActions, mapMutations, mapState } from 'vuex';
import { addOrRemoveTrackFromPlaylist } from '@/api/playlist';
import { isAccountLoggedIn } from '@/utils/auth';
import { disableScrolling, enableScrolling } from '@/utils/ui';
import TrackListItem from '@/components/TrackListItem.vue';
import ContextMenu from '@/components/ContextMenu.vue';
@ -123,10 +122,8 @@ export default {
openMenu(e, track) {
this.rightClickedTrack = track;
this.$refs.menu.openMenu(e);
disableScrolling();
},
closeMenu() {
enableScrolling();
this.rightClickedTrack = {
id: 0,
name: '',