Skip to content

Commit

Permalink
fix: 修复因为使用了electron的clipboard导致的异常 (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
memorydream authored Apr 30, 2022
1 parent 21c7b5a commit 5dd00be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/TrackList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ import { mapActions, mapMutations, mapState } from 'vuex';
import { addOrRemoveTrackFromPlaylist } from '@/api/playlist';
import { cloudDiskTrackDelete } from '@/api/user';
import { isAccountLoggedIn } from '@/utils/auth';
const { clipboard } = require('electron');
import TrackListItem from '@/components/TrackListItem.vue';
import ContextMenu from '@/components/ContextMenu.vue';
Expand Down Expand Up @@ -270,7 +269,7 @@ export default {
}
},
copyLink() {
clipboard.writeText(
navigator.clipboard.writeText(
`https://music.163.com/song?id=${this.rightClickedTrack.id}`
);
this.showToast(locale.t('toast.copied'));
Expand Down

0 comments on commit 5dd00be

Please sign in to comment.