完善默认值显示
This commit is contained in:
@@ -582,11 +582,11 @@ export default {
|
||||
if (!mediaDeviceName) return
|
||||
const devices = await navigator.mediaDevices.enumerateDevices()
|
||||
let device = devices.find(device => device.label === mediaDeviceName)
|
||||
if (!device) return this.setMediaDeviceId(null)
|
||||
if (!device) return this.setMediaDeviceId('default')
|
||||
console.log(device)
|
||||
this.audio.setSinkId(device.deviceId).catch((err) => {
|
||||
console.log(err)
|
||||
this.setMediaDeviceId(null)
|
||||
this.setMediaDeviceId('default')
|
||||
})
|
||||
},
|
||||
handleSetTransition() {
|
||||
|
||||
@@ -40,8 +40,8 @@ export default {
|
||||
label() {
|
||||
if (!this.value) return ''
|
||||
if (!this.itemName) return this.value
|
||||
const item = this.list.find(l => l.id == this.value)
|
||||
if (!item) return this.value
|
||||
const item = this.list.find(l => l[this.itemKey] == this.value)
|
||||
if (!item) return ''
|
||||
return item[this.itemName]
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user