diff --git a/src/App.vue b/src/App.vue index 3e0e3f8c8..5ddc4e3cd 100755 --- a/src/App.vue +++ b/src/App.vue @@ -30,6 +30,7 @@ import AppTopBar from '@/AppTopBar.vue'; import AppMenu from '@/AppMenu.vue'; import AppFooter from '@/AppFooter.vue'; import AppConfigurator from '@/AppConfigurator.vue'; +import EventBus from '@/EventBus'; export default { data() { @@ -70,6 +71,14 @@ export default { this.theme = event.theme; this.activeMenuIndex = null; + + EventBus.$emit('change-theme', event); + + if (event.dark) + document.body.setAttribute('data-darktheme', 'true'); + else + document.body.removeAttribute('data-darktheme') + }, addClass(element, className) { if (!this.hasClass(element, className)) { diff --git a/src/AppConfigurator.vue b/src/AppConfigurator.vue index b86a4134f..df05e2446 100755 --- a/src/AppConfigurator.vue +++ b/src/AppConfigurator.vue @@ -16,28 +16,28 @@
Saga Blue
Saga Cyan
Saga Deep Purple
Saga Green @@ -51,133 +51,133 @@
Saga Orange
Saga Purple
Saga Teal
Vela Blue
Vela Cyan
Vela Deep Purple
Vela Green
Vela Indigo
Vela Orange
Vela Purple
Vela Teal
Nova Light
Nova Dark
Nova Colored
Nova Vue
Luna Blue
Luna Green
Luna Amber
Luna Pink diff --git a/src/AppTopBar.vue b/src/AppTopBar.vue index e0c18d85b..abd70c60b 100755 --- a/src/AppTopBar.vue +++ b/src/AppTopBar.vue @@ -25,22 +25,22 @@
  • Saga OrangeSaga Orange
  • Saga PurpleSaga Purple
  • Saga TealSaga Teal
  • -
  • Vela BlueVela Blue
  • -
  • Vela CyanVela Cyan
  • -
  • Vela Deep PurpleVela Deep Purple
  • -
  • Vela GreenVela Green
  • -
  • Vela IndigoVela Indigo
  • -
  • Vela OrangeVela Orange
  • -
  • Vela PurpleVela Purple
  • -
  • Vela TealVela Teal
  • +
  • Vela BlueVela Blue
  • +
  • Vela CyanVela Cyan
  • +
  • Vela Deep PurpleVela Deep Purple
  • +
  • Vela GreenVela Green
  • +
  • Vela IndigoVela Indigo
  • +
  • Vela OrangeVela Orange
  • +
  • Vela PurpleVela Purple
  • +
  • Vela TealVela Teal
  • Nova LightNova Light
  • Nova DarkNova Dark
  • Nova ColoredNova Colored
  • Nova VueNova Vue
  • -
  • Luna AmberLuna Amber
  • -
  • Luna BlueLuna Blue
  • -
  • Luna GreenLuna Green
  • -
  • Luna PinkLuna Pink
  • +
  • Luna AmberLuna Amber
  • +
  • Luna BlueLuna Blue
  • +
  • Luna GreenLuna Green
  • +
  • Luna PinkLuna Pink
  • RheaRhea
  • @@ -97,8 +97,8 @@ export default { } }, methods: { - changeTheme(event, theme) { - this.$emit('change-theme', {theme: theme}); + changeTheme(event, theme, dark) { + this.$emit('change-theme', {theme: theme, dark: dark}); this.activeMenuIndex = null; event.preventDefault(); }, diff --git a/src/EventBus.js b/src/EventBus.js new file mode 100644 index 000000000..27f698ab7 --- /dev/null +++ b/src/EventBus.js @@ -0,0 +1,3 @@ +import Vue from 'vue'; +const EventBus = new Vue(); +export default EventBus; \ No newline at end of file diff --git a/src/views/chart/BarChartDemo.vue b/src/views/chart/BarChartDemo.vue index f69bb51a0..e886942dc 100755 --- a/src/views/chart/BarChartDemo.vue +++ b/src/views/chart/BarChartDemo.vue @@ -9,16 +9,16 @@

    Vertical

    - +

    Horizontal

    - +

    Multi Axis

    - +

    Stacked

    - +
    @@ -27,8 +27,21 @@