|
94 | 94 | </a-button> |
95 | 95 | </div> |
96 | 96 |
|
97 | | - <event-sidebar :isVisible="isSidebarVisible" @update:isVisible="isSidebarVisible = $event" /> |
| 97 | + <event-sidebar |
| 98 | + :isVisible="isSidebarVisible" |
| 99 | + ref="eventSidebar" |
| 100 | + @update:isVisible="isSidebarVisible = $event" /> |
98 | 101 |
|
99 | 102 | <a-layout |
100 | 103 | :class="[layoutMode, `content-width-${contentWidth}`]" |
101 | | - :style="{ paddingLeft: contentPaddingLeft, minHeight: '100vh', paddingBottom: isSidebarVisible ? '300px' : '0' }" |
102 | | - > |
| 104 | + :style="{ paddingLeft: contentPaddingLeft, minHeight: '100vh', paddingBottom: isSidebarVisible ? '300px' : '0' }"> |
103 | 105 | <a-affix style="z-index: 100"> |
104 | 106 | <global-header |
105 | 107 | :style="this.$store.getters.shutdownTriggered ? 'margin-top: 25px;' : null" |
|
108 | 110 | :theme="navTheme" |
109 | 111 | :collapsed="collapsed" |
110 | 112 | :device="device" |
111 | | - @toggle="toggle" |
112 | | - /> |
| 113 | + @toggle="toggle" /> |
113 | 114 | </a-affix> |
114 | 115 |
|
115 | 116 | <a-button |
116 | | - v-if="showClear" |
117 | | - type="default" |
118 | | - size="small" |
119 | | - class="button-clear-notification" |
120 | | - @click="onClearNotification">{{ $t('label.clear.notification') }}</a-button> |
| 117 | + v-if="showClear" |
| 118 | + type="default" |
| 119 | + size="small" |
| 120 | + class="button-clear-notification" |
| 121 | + @click="onClearNotification">{{ $t('label.clear.notification') }}</a-button> |
121 | 122 |
|
122 | | - <!-- layout content --> |
| 123 | + <!-- layout content --> |
123 | 124 | <a-layout-content |
124 | 125 | class="layout-content" |
125 | 126 | :class="{'is-header-fixed': fixedHeader}" |
126 | | - :style="{ paddingBottom: isSidebarVisible ? '300' : '0' }" |
127 | | - > |
| 127 | + :style="{ paddingBottom: isSidebarVisible ? '300' : '0' }"> |
128 | 128 | <slot></slot> |
129 | 129 | </a-layout-content> |
130 | 130 |
|
@@ -252,7 +252,8 @@ export default { |
252 | 252 | }, |
253 | 253 | methods: { |
254 | 254 | toggleSidebar () { |
255 | | - this.isSidebarVisible = !this.isSidebarVisible |
| 255 | + this.isSidebarVisible = true |
| 256 | + this.$refs.eventSidebar.openSiderBar() |
256 | 257 | }, |
257 | 258 | ...mapActions(['setSidebar']), |
258 | 259 | toggle () { |
|
0 commit comments