mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Implemented topbar
This commit is contained in:
parent
f0a0b33002
commit
db3a0777b8
13 changed files with 496 additions and 593 deletions
19
app.vue
19
app.vue
|
@ -8,15 +8,6 @@
|
|||
import EventBus from '@/layouts/AppEventBus';
|
||||
|
||||
export default {
|
||||
/*watch: {
|
||||
$route: {
|
||||
handler(to) {
|
||||
if (to.name === 'index') {
|
||||
this.themeChangeListener({ theme: this.$appState.darkTheme ? 'aura-dark-green' : 'aura-light-green', dark: this.$appState.darkTheme });
|
||||
}
|
||||
}
|
||||
}
|
||||
},*/
|
||||
mounted() {
|
||||
EventBus.on('theme-change', this.themeChangeListener);
|
||||
},
|
||||
|
@ -34,16 +25,8 @@ export default {
|
|||
document.startViewTransition(() => this.applyTheme(event));
|
||||
},
|
||||
applyTheme(event) {
|
||||
/*this.$primevue.changeTheme(this.$appState.theme, event.theme, 'theme-link', () => {
|
||||
this.$appState.theme = event.theme;
|
||||
this.$appState.darkTheme = event.dark;
|
||||
|
||||
EventBus.emit('theme-change-complete', { theme: event.theme, dark: event.dark });
|
||||
});*/
|
||||
// @todo
|
||||
this.$appState.theme = event.theme;
|
||||
this.$appState.darkTheme = event.dark;
|
||||
|
||||
|
||||
if (event.dark) document.documentElement.classList.add('p-dark');
|
||||
else document.documentElement.classList.remove('p-dark');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue