mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
fix: 设置面板修改后小组件中面板选项不更新
This commit is contained in:
parent
8ef08f99e9
commit
b71eb00f3f
@ -32,7 +32,7 @@ import { OptionMetadata } from '@/components/types'
|
|||||||
import ComponentOption from '@/components/settings-panel/ComponentOption.vue'
|
import ComponentOption from '@/components/settings-panel/ComponentOption.vue'
|
||||||
import RadioGroupItem from './RadioGroupItem.vue'
|
import RadioGroupItem from './RadioGroupItem.vue'
|
||||||
import CollapsibleContainer from './CollapsibleContainer.vue'
|
import CollapsibleContainer from './CollapsibleContainer.vue'
|
||||||
import { getComponentSettings } from '@/core/settings'
|
import { addComponentListener, getComponentSettings } from '@/core/settings'
|
||||||
import { componentsMap } from '@/components/component'
|
import { componentsMap } from '@/components/component'
|
||||||
import OptionWidgetLayout from './OptionWidgetLayout.vue'
|
import OptionWidgetLayout from './OptionWidgetLayout.vue'
|
||||||
|
|
||||||
@ -144,6 +144,11 @@ export default defineComponent({
|
|||||||
if (item.isOption) {
|
if (item.isOption) {
|
||||||
vm.displayName = optionDefs[item.name]?.displayName ?? item.name
|
vm.displayName = optionDefs[item.name]?.displayName ?? item.name
|
||||||
vm.checked = !!optionValues[item.name]
|
vm.checked = !!optionValues[item.name]
|
||||||
|
|
||||||
|
// 监测其他组件的选项值更新
|
||||||
|
addComponentListener(`${props.componentName}.${item.name}`, value => {
|
||||||
|
vm.checked = value
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
vm.displayName = item.name
|
vm.displayName = item.name
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user