mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix hidden option null (fix #2928)
This commit is contained in:
parent
a857250f11
commit
a4f7b6ed15
@ -89,7 +89,7 @@ import {
|
|||||||
VLoading,
|
VLoading,
|
||||||
} from '@/ui'
|
} from '@/ui'
|
||||||
import { addComponentListener } from '@/core/settings'
|
import { addComponentListener } from '@/core/settings'
|
||||||
import { dqa } from '@/core/utils'
|
import { deleteValue, dqa } from '@/core/utils'
|
||||||
import { SortableJSLibrary } from '@/core/runtime-library'
|
import { SortableJSLibrary } from '@/core/runtime-library'
|
||||||
import { SortableEvent } from 'sortablejs'
|
import { SortableEvent } from 'sortablejs'
|
||||||
import { getData } from '@/plugins/data'
|
import { getData } from '@/plugins/data'
|
||||||
@ -122,7 +122,7 @@ export default Vue.extend({
|
|||||||
padding: navbarOptions.padding,
|
padding: navbarOptions.padding,
|
||||||
rendered,
|
rendered,
|
||||||
// order: navbarOptions.order,
|
// order: navbarOptions.order,
|
||||||
hidden: navbarOptions.hidden,
|
hidden: [...navbarOptions.hidden],
|
||||||
loaded: false,
|
loaded: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -173,11 +173,13 @@ export default Vue.extend({
|
|||||||
this.rendered.items = sortItems(rendered.items, ordersMap)
|
this.rendered.items = sortItems(rendered.items, ordersMap)
|
||||||
},
|
},
|
||||||
toggleVisible(item: CustomNavbarItem) {
|
toggleVisible(item: CustomNavbarItem) {
|
||||||
if (navbarOptions.hidden.includes(item.name)) {
|
if (this.hidden.includes(item.name)) {
|
||||||
lodash.pull(navbarOptions.hidden, item.name)
|
deleteValue(this.hidden, it => it === item.name)
|
||||||
|
deleteValue(navbarOptions.hidden, it => it === item.name)
|
||||||
item.hidden = false
|
item.hidden = false
|
||||||
console.log('delete', item.name)
|
console.log('delete', item.name)
|
||||||
} else {
|
} else {
|
||||||
|
this.hidden.push(item.name)
|
||||||
navbarOptions.hidden.push(item.name)
|
navbarOptions.hidden.push(item.name)
|
||||||
item.hidden = true
|
item.hidden = true
|
||||||
console.log('add', item.name)
|
console.log('add', item.name)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user