修复导入设置某些设置未立即生效的问题
parent
3f88701751
commit
50e140e606
|
@ -63,7 +63,7 @@ div.scroll(:class="$style.setting")
|
||||||
dd(:title="$t('view.setting.play_mediaDevice_title')")
|
dd(:title="$t('view.setting.play_mediaDevice_title')")
|
||||||
h3 {{$t('view.setting.play_mediaDevice')}}
|
h3 {{$t('view.setting.play_mediaDevice')}}
|
||||||
div
|
div
|
||||||
material-selection(:list="mediaDevices" :class="$style.gapLeft" @change="handleMediaDeviceChange" v-model="current_setting.player.mediaDeviceId" item-key="deviceId" item-name="label")
|
material-selection(:list="mediaDevices" :class="$style.gapLeft" v-model="current_setting.player.mediaDeviceId" item-key="deviceId" item-name="label")
|
||||||
material-btn(min :title="$t('view.setting.play_mediaDevice_refresh_btn_title')" :class="[$style.btnMediaDeviceRefresh, $style.gapLeft]" @click="getMediaDevice")
|
material-btn(min :title="$t('view.setting.play_mediaDevice_refresh_btn_title')" :class="[$style.btnMediaDeviceRefresh, $style.gapLeft]" @click="getMediaDevice")
|
||||||
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 512 512' space='preserve')
|
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 512 512' space='preserve')
|
||||||
use(xlink:href='#icon-refresh')
|
use(xlink:href='#icon-refresh')
|
||||||
|
@ -353,15 +353,16 @@ export default {
|
||||||
isAutoClearSearchInput: false,
|
isAutoClearSearchInput: false,
|
||||||
isAutoClearSearchList: false,
|
isAutoClearSearchList: false,
|
||||||
},
|
},
|
||||||
|
tray: {
|
||||||
|
isShow: false,
|
||||||
|
isToTray: false,
|
||||||
|
},
|
||||||
windowSizeId: 1,
|
windowSizeId: 1,
|
||||||
langId: 'cns',
|
langId: 'cns',
|
||||||
themeId: 0,
|
themeId: 0,
|
||||||
sourceId: 0,
|
sourceId: 0,
|
||||||
randomAnimate: true,
|
randomAnimate: true,
|
||||||
tray: {
|
isAgreePact: false,
|
||||||
isShow: false,
|
|
||||||
isToTray: false,
|
|
||||||
},
|
|
||||||
apiSource: 'temp',
|
apiSource: 'temp',
|
||||||
},
|
},
|
||||||
languageList,
|
languageList,
|
||||||
|
@ -377,6 +378,9 @@ export default {
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
|
'setting.isAgreePact'(n) {
|
||||||
|
this.current_setting.isAgreePact = n
|
||||||
|
},
|
||||||
'current_setting.player.isShowTaskProgess'(n) {
|
'current_setting.player.isShowTaskProgess'(n) {
|
||||||
if (n) return
|
if (n) return
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -602,6 +606,8 @@ export default {
|
||||||
window.globalObj.proxy[key] = setting.network.proxy[key]
|
window.globalObj.proxy[key] = setting.network.proxy[key]
|
||||||
}
|
}
|
||||||
this.init()
|
this.init()
|
||||||
|
this.handleLangChange(this.current_setting.langId)
|
||||||
|
this.handleToTrayChange()
|
||||||
},
|
},
|
||||||
handleLangChange(id) {
|
handleLangChange(id) {
|
||||||
this.$i18n.locale = id
|
this.$i18n.locale = id
|
||||||
|
@ -612,11 +618,8 @@ export default {
|
||||||
this.mediaDevices = audioDevices
|
this.mediaDevices = audioDevices
|
||||||
// console.log(this.mediaDevices)
|
// console.log(this.mediaDevices)
|
||||||
},
|
},
|
||||||
handleMediaDeviceChange(audioDevice) {
|
|
||||||
this.setMediaDeviceId(audioDevice.deviceId)
|
|
||||||
},
|
|
||||||
handleToTrayChange(isToTray) {
|
handleToTrayChange(isToTray) {
|
||||||
this.current_setting.tray.isShow = isToTray
|
if (isToTray != null) this.current_setting.tray.isShow = isToTray
|
||||||
rendererSend('changeTray', this.current_setting.tray)
|
rendererSend('changeTray', this.current_setting.tray)
|
||||||
},
|
},
|
||||||
handleShowPact() {
|
handleShowPact() {
|
||||||
|
|
Loading…
Reference in New Issue