File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 31
31
class =" dropdown-divider"
32
32
v-if =" view.id === 'divider'" >
33
33
34
+ <!-- range=all-12-mth-rolling&interval=1M&metric=renewablesProportion -->
35
+
34
36
<nuxt-link
35
37
v-else
36
38
v-show =" shouldShow(view.id)"
37
- :to =" `/${view.id}${getRegionId(view.id)}`"
39
+ :to =" `/${view.id}${getRegionId(view.id)}${appendQuery(view.id)} `"
38
40
:class =" { 'nuxt-link-active': view.id === currentView }"
39
41
class =" dropdown-item"
40
42
@click.native =" handleViewClick(view.id)"
@@ -80,6 +82,13 @@ export default {
80
82
},
81
83
82
84
methods: {
85
+ appendQuery (id ) {
86
+ console .log (id)
87
+ if (id === ' compare' ) return ' ?range=all-12-mth-rolling&interval=1M&metric=renewablesProportion'
88
+ if (id === ' energy' ) return ' ?range=7d&interval=30m&view=discrete-time'
89
+ if (id === ' emissions' ) return ' ??interval=Year&projections=false&history=false'
90
+ return ' '
91
+ },
83
92
handleClick () {
84
93
this .dropdownActive = ! this .dropdownActive
85
94
this .$emit (' dropdownActive' , this .dropdownActive )
You can’t perform that action at this time.
0 commit comments