添加vue eslint规则,修复问题
This commit is contained in:
@@ -192,7 +192,7 @@ export default {
|
||||
created() {
|
||||
this.listenEvent()
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.unlistenEvent()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
created() {
|
||||
this.listenEvent()
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.unlistenEvent()
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="my-list" :class="$style.container" @click="handleContainerClick" v-if="isInitedList">
|
||||
<Lists :list-id="listId" @show-menu="$refs.musicList.hideMenu()" ref="lists" />
|
||||
<MyLists :list-id="listId" @show-menu="$refs.musicList.hideMenu()" ref="lists" />
|
||||
<MusicList :list-id="listId" @show-menu="$refs.lists.hideListsMenu()" ref="musicList" />
|
||||
</div>
|
||||
|
||||
@@ -11,13 +11,13 @@ import { getListPrevSelectId } from '@renderer/utils/data'
|
||||
import { isInitedList } from '@renderer/core/share/list'
|
||||
import { getList } from '@renderer/core/share/utils'
|
||||
|
||||
import Lists from './components/Lists'
|
||||
import MyLists from './components/MyLists'
|
||||
import MusicList from './components/MusicList'
|
||||
|
||||
export default {
|
||||
name: 'List',
|
||||
components: {
|
||||
Lists,
|
||||
MyLists,
|
||||
MusicList,
|
||||
},
|
||||
setup() {
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ import { computed } from '@renderer/utils/vueTools'
|
||||
import { getList } from '@renderer/core/share/utils'
|
||||
|
||||
export default {
|
||||
name: 'ListLists',
|
||||
name: 'MyLists',
|
||||
props: {
|
||||
listId: {
|
||||
type: [String, Number],
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
|
||||
<div :class="$style.main">
|
||||
<!-- <div class="scroll" :class="$style.toc">
|
||||
<ul :class="$style.tocList">
|
||||
@@ -19,20 +18,20 @@
|
||||
</div> -->
|
||||
<div class="scroll" :class="$style.setting" ref="dom_setting">
|
||||
<dl ref="dom_setting_list">
|
||||
<Basic />
|
||||
<Play />
|
||||
<DesktopLyric />
|
||||
<Search />
|
||||
<List />
|
||||
<Download />
|
||||
<Sync />
|
||||
<HotKey />
|
||||
<Network />
|
||||
<Odc />
|
||||
<Backup />
|
||||
<Other />
|
||||
<Update />
|
||||
<About />
|
||||
<SettingBasic />
|
||||
<SettingPlay />
|
||||
<SettingDesktopLyric />
|
||||
<SettingSearch />
|
||||
<SettingList />
|
||||
<SettingDownload />
|
||||
<SettingSync />
|
||||
<SettingHotKey />
|
||||
<SettingNetwork />
|
||||
<SettingOdc />
|
||||
<SettingBackup />
|
||||
<SettingOther />
|
||||
<SettingUpdate />
|
||||
<SettingAbout />
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,38 +41,38 @@
|
||||
import { useRefGetter, watch, useCommit } from '@renderer/utils/vueTools'
|
||||
import { currentStting } from './setting'
|
||||
|
||||
import Basic from './components/Basic'
|
||||
import Play from './components/Play'
|
||||
import DesktopLyric from './components/DesktopLyric'
|
||||
import Search from './components/Search'
|
||||
import List from './components/List'
|
||||
import Download from './components/Download'
|
||||
import Sync from './components/Sync'
|
||||
import HotKey from './components/HotKey'
|
||||
import Network from './components/Network'
|
||||
import Odc from './components/Odc'
|
||||
import Backup from './components/Backup'
|
||||
import Other from './components/Other'
|
||||
import Update from './components/Update'
|
||||
import About from './components/About'
|
||||
import SettingBasic from './components/SettingBasic'
|
||||
import SettingPlay from './components/SettingPlay'
|
||||
import SettingDesktopLyric from './components/SettingDesktopLyric'
|
||||
import SettingSearch from './components/SettingSearch'
|
||||
import SettingList from './components/SettingList'
|
||||
import SettingDownload from './components/SettingDownload'
|
||||
import SettingSync from './components/SettingSync'
|
||||
import SettingHotKey from './components/SettingHotKey'
|
||||
import SettingNetwork from './components/SettingNetwork'
|
||||
import SettingOdc from './components/SettingOdc'
|
||||
import SettingBackup from './components/SettingBackup'
|
||||
import SettingOther from './components/SettingOther'
|
||||
import SettingUpdate from './components/SettingUpdate'
|
||||
import SettingAbout from './components/SettingAbout'
|
||||
|
||||
export default {
|
||||
name: 'Setting',
|
||||
components: {
|
||||
Basic,
|
||||
Play,
|
||||
DesktopLyric,
|
||||
Search,
|
||||
List,
|
||||
Download,
|
||||
Sync,
|
||||
HotKey,
|
||||
Network,
|
||||
Odc,
|
||||
Backup,
|
||||
Other,
|
||||
Update,
|
||||
About,
|
||||
SettingBasic,
|
||||
SettingPlay,
|
||||
SettingDesktopLyric,
|
||||
SettingSearch,
|
||||
SettingList,
|
||||
SettingDownload,
|
||||
SettingSync,
|
||||
SettingHotKey,
|
||||
SettingNetwork,
|
||||
SettingOdc,
|
||||
SettingBackup,
|
||||
SettingOther,
|
||||
SettingUpdate,
|
||||
SettingAbout,
|
||||
},
|
||||
setup() {
|
||||
const setting = useRefGetter('setting')
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ import { openUrl, clipboardWriteText } from '@renderer/utils'
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'About',
|
||||
name: 'SettingAbout',
|
||||
setup() {
|
||||
const handleShowPact = () => {
|
||||
isShowPact.value = true
|
||||
+1
-1
@@ -31,7 +31,7 @@ import { currentStting } from '../setting'
|
||||
import { getList } from '@renderer/core/share/utils'
|
||||
|
||||
export default {
|
||||
name: 'Update',
|
||||
name: 'SettingUpdate',
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
const setting = useGetter('setting')
|
||||
+1
-1
@@ -63,7 +63,7 @@ import apiSourceInfo from '@renderer/utils/music/api-source-info'
|
||||
import UserApiModal from './UserApiModal'
|
||||
|
||||
export default {
|
||||
name: 'Basic',
|
||||
name: 'SettingBasic',
|
||||
components: {
|
||||
UserApiModal,
|
||||
},
|
||||
+1
-1
@@ -21,7 +21,7 @@ import { getSystemFonts } from '@renderer/utils/tools'
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'DesktopLyric',
|
||||
name: 'SettingDesktopLyric',
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
const systemFontList = ref([])
|
||||
+1
-1
@@ -44,7 +44,7 @@ import { openDirInExplorer, selectDir } from '@renderer/utils'
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'Download',
|
||||
name: 'SettingDownload',
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ const formatHotKeyName = (name) => {
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'HotKey',
|
||||
name: 'SettingHotKey',
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
const current_hot_key = ref({
|
||||
+1
-1
@@ -20,7 +20,7 @@ dd(:tips="$t('setting__basic_sourcename_title')")
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'List',
|
||||
name: 'SettingList',
|
||||
setup() {
|
||||
return {
|
||||
currentStting,
|
||||
+1
-1
@@ -22,7 +22,7 @@ import { debounce } from '@renderer/utils'
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'Network',
|
||||
name: 'SettingNetwork',
|
||||
setup() {
|
||||
watch(() => currentStting.value.network.proxy.enable, enable => {
|
||||
proxy.enable = enable
|
||||
+1
-1
@@ -12,7 +12,7 @@ dd
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'Odc',
|
||||
name: 'SettingOdc',
|
||||
setup() {
|
||||
return {
|
||||
currentStting,
|
||||
+1
-1
@@ -26,7 +26,7 @@ import { sizeFormate, clearCache, getCacheSize } from '@renderer/utils'
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'Other',
|
||||
name: 'SettingOther',
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import { setTaskBarProgress } from '@renderer/utils/tools'
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'Play',
|
||||
name: 'SettingPlay',
|
||||
setup() {
|
||||
const mediaDevices = ref([])
|
||||
const getMediaDevice = async() => {
|
||||
+1
-1
@@ -15,7 +15,7 @@ dd
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'Search',
|
||||
name: 'SettingSearch',
|
||||
setup() {
|
||||
return {
|
||||
currentStting,
|
||||
+1
-1
@@ -23,7 +23,7 @@ import { debounce } from '@renderer/utils'
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'Update',
|
||||
name: 'SettingSync',
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import { sizeFormate } from '@renderer/utils/tools'
|
||||
import { currentStting } from '../setting'
|
||||
|
||||
export default {
|
||||
name: 'Update',
|
||||
name: 'SettingUpdate',
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
if (!this.isVisibleListDetail) this.setTagListWidth()
|
||||
this.listenEvent()
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.unlistenEvent()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -28,16 +28,17 @@ export default {
|
||||
},
|
||||
modelValue: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['setting']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['setting']),
|
||||
},
|
||||
mounted() {
|
||||
document.addEventListener('click', this.handleHide)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user