更新依赖版本,优化组件逻辑
parent
8a8c8a5699
commit
ffa979ddc8
|
@ -16752,9 +16752,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tmp": {
|
"node_modules/tmp": {
|
||||||
"version": "0.2.3",
|
"version": "0.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz",
|
||||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
"integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -270,9 +270,15 @@ export default {
|
||||||
cachedList = Array(list.length)
|
cachedList = Array(list.length)
|
||||||
startIndex = -1
|
startIndex = -1
|
||||||
endIndex = -1
|
endIndex = -1
|
||||||
void nextTick(() => {
|
if (cachedList.length) {
|
||||||
updateView()
|
void nextTick(() => {
|
||||||
})
|
requestAnimationFrame(() => {
|
||||||
|
updateView()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
views.value = []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
watch(() => props.itemHeight, () => {
|
watch(() => props.itemHeight, () => {
|
||||||
handleReset(props.list)
|
handleReset(props.list)
|
||||||
|
@ -289,7 +295,15 @@ export default {
|
||||||
cachedList = Array(props.list.length)
|
cachedList = Array(props.list.length)
|
||||||
startIndex = -1
|
startIndex = -1
|
||||||
endIndex = -1
|
endIndex = -1
|
||||||
updateView()
|
|
||||||
|
if (props.list.length) {
|
||||||
|
void nextTick(() => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
console.log('updateView')
|
||||||
|
updateView()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
window.addEventListener('resize', handleResize)
|
window.addEventListener('resize', handleResize)
|
||||||
})
|
})
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|
|
@ -11,8 +11,8 @@ material-modal(:show="modelValue" teleport="#view" @close="handleCloseModal" @af
|
||||||
div(:class="[$style.row, $style.tip, { [$style.show]: !!timeLabel }]")
|
div(:class="[$style.row, $style.tip, { [$style.show]: !!timeLabel }]")
|
||||||
p {{ $t('play_timeout_tip', { time: timeLabel }) }}
|
p {{ $t('play_timeout_tip', { time: timeLabel }) }}
|
||||||
div(:class="$style.footer")
|
div(:class="$style.footer")
|
||||||
base-btn(:class="$style.footerBtn" @click="handleCancel") {{ $t(timeLabel ? 'play_timeout_stop' : 'play_timeout_close') }}
|
base-btn(:class="$style.footerBtn" @click="handleCancel") {{ $t(timeLabel ? 'play_timeout_stop' : 'play_timeout_close') }}
|
||||||
base-btn(:class="$style.footerBtn" @click="handleConfirm") {{ $t(timeLabel ? 'play_timeout_update' : 'play_timeout_confirm') }}
|
base-btn(:class="$style.footerBtn" @click="handleConfirm") {{ $t(timeLabel ? 'play_timeout_update' : 'play_timeout_confirm') }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -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})")
|
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
|
.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})")
|
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')")
|
dd(:aria-label="$t('setting__download_lyric_title')")
|
||||||
h3#download_lyric {{ $t('setting__download_lyric') }}
|
h3#download_lyric {{ $t('setting__download_lyric') }}
|
||||||
.gap-top
|
.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})")
|
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
|
.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})")
|
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
|
dd
|
||||||
h3#download_lyric_format
|
h3#download_lyric_format
|
||||||
| {{ $t('setting__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 apiSourceInfo from '@renderer/utils/musicSdk/api-source-info'
|
||||||
import { userApi } from '@renderer/store'
|
import { userApi } from '@renderer/store'
|
||||||
import { appSetting, updateSetting } from '@renderer/store/setting'
|
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 { dialog } from '@renderer/plugins/Dialog'
|
||||||
|
|
||||||
import UserApiOnlineImportModal from './UserApiOnlineImportModal.vue'
|
import UserApiOnlineImportModal from './UserApiOnlineImportModal.vue'
|
||||||
|
@ -54,17 +54,15 @@ export default {
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue'],
|
||||||
setup() {
|
setup() {
|
||||||
const isShowOnlineImportModal = ref(false)
|
const isShowOnlineImportModal = ref(false)
|
||||||
|
const apiList = computed(() => userApi.list)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
userApi,
|
userApi,
|
||||||
|
apiList,
|
||||||
appSetting,
|
appSetting,
|
||||||
isShowOnlineImportModal,
|
isShowOnlineImportModal,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
apiList() {
|
|
||||||
return this.userApi.list
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
async importUserApi(script) {
|
async importUserApi(script) {
|
||||||
return importUserApi(script).then(({ apiList }) => {
|
return importUserApi(script).then(({ apiList }) => {
|
||||||
|
|
Loading…
Reference in New Issue