更新依赖版本,优化组件逻辑
parent
8a8c8a5699
commit
ffa979ddc8
|
@ -16752,9 +16752,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"version": "0.2.5",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz",
|
||||
"integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
|
|
@ -270,9 +270,15 @@ export default {
|
|||
cachedList = Array(list.length)
|
||||
startIndex = -1
|
||||
endIndex = -1
|
||||
if (cachedList.length) {
|
||||
void nextTick(() => {
|
||||
requestAnimationFrame(() => {
|
||||
updateView()
|
||||
})
|
||||
})
|
||||
} else {
|
||||
views.value = []
|
||||
}
|
||||
}
|
||||
watch(() => props.itemHeight, () => {
|
||||
handleReset(props.list)
|
||||
|
@ -289,7 +295,15 @@ export default {
|
|||
cachedList = Array(props.list.length)
|
||||
startIndex = -1
|
||||
endIndex = -1
|
||||
|
||||
if (props.list.length) {
|
||||
void nextTick(() => {
|
||||
requestAnimationFrame(() => {
|
||||
console.log('updateView')
|
||||
updateView()
|
||||
})
|
||||
})
|
||||
}
|
||||
window.addEventListener('resize', handleResize)
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
|
|
|
@ -47,6 +47,8 @@ dd
|
|||
base-checkbox(id="setting_download_isEmbedLyricT" :disabled="!appSetting['download.isEmbedLyric']" :model-value="appSetting['download.isEmbedLyricT']" :label="$t('setting__download_embed_tlyric')" @update:model-value="updateSetting({'download.isEmbedLyricT': $event})")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_download_isEmbedLyricR" :disabled="!appSetting['download.isEmbedLyric']" :model-value="appSetting['download.isEmbedLyricR']" :label="$t('setting__download_embed_rlyric')" @update:model-value="updateSetting({'download.isEmbedLyricR': $event})")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_download_isEmbedLyricLx" :disabled="!appSetting['download.isEmbedLyric']" :model-value="appSetting['download.isEmbedLyricLx']" :label="$t('setting__download_embed_lxlyric')" @update:model-value="updateSetting({'download.isEmbedLyricLx': $event})")
|
||||
dd(:aria-label="$t('setting__download_lyric_title')")
|
||||
h3#download_lyric {{ $t('setting__download_lyric') }}
|
||||
.gap-top
|
||||
|
@ -55,6 +57,8 @@ dd(:aria-label="$t('setting__download_lyric_title')")
|
|||
base-checkbox(id="setting_download_isDownloadTLrc" :disabled="!appSetting['download.isDownloadLrc']" :model-value="appSetting['download.isDownloadTLrc']" :label="$t('setting__download_tlyric')" @update:model-value="updateSetting({'download.isDownloadTLrc': $event})")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_download_isDownloadRLrc" :disabled="!appSetting['download.isDownloadLrc']" :model-value="appSetting['download.isDownloadRLrc']" :label="$t('setting__download_rlyric')" @update:model-value="updateSetting({'download.isDownloadRLrc': $event})")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_download_isDownloadLxLrc" :disabled="!appSetting['download.isDownloadLrc']" :model-value="appSetting['download.isDownloadLxLrc']" :label="$t('setting__download_lxlyric')" @update:model-value="updateSetting({'download.isDownloadLxLrc': $event})")
|
||||
dd
|
||||
h3#download_lyric_format
|
||||
| {{ $t('setting__download_lyric_format') }}
|
||||
|
|
|
@ -36,7 +36,7 @@ import { openUrl } from '@common/utils/electron'
|
|||
import apiSourceInfo from '@renderer/utils/musicSdk/api-source-info'
|
||||
import { userApi } from '@renderer/store'
|
||||
import { appSetting, updateSetting } from '@renderer/store/setting'
|
||||
import { ref } from '@common/utils/vueTools'
|
||||
import { computed, ref } from '@common/utils/vueTools'
|
||||
import { dialog } from '@renderer/plugins/Dialog'
|
||||
|
||||
import UserApiOnlineImportModal from './UserApiOnlineImportModal.vue'
|
||||
|
@ -54,17 +54,15 @@ export default {
|
|||
emits: ['update:modelValue'],
|
||||
setup() {
|
||||
const isShowOnlineImportModal = ref(false)
|
||||
const apiList = computed(() => userApi.list)
|
||||
|
||||
return {
|
||||
userApi,
|
||||
apiList,
|
||||
appSetting,
|
||||
isShowOnlineImportModal,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
apiList() {
|
||||
return this.userApi.list
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async importUserApi(script) {
|
||||
return importUserApi(script).then(({ apiList }) => {
|
||||
|
|
Loading…
Reference in New Issue