mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Fix loading of navigators [SCI-8797] (#5868)
This commit is contained in:
parent
4f0909e298
commit
253be93368
2 changed files with 20 additions and 4 deletions
|
@ -8,7 +8,7 @@ Vue.use(PerfectScrollbar);
|
|||
|
||||
Vue.prototype.i18n = window.I18n;
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
function addNavigationNavigatorContainer() {
|
||||
let navigator = new Vue({
|
||||
el: '#sciNavigationNavigatorContainer',
|
||||
components: {
|
||||
|
@ -55,4 +55,12 @@ window.addEventListener('DOMContentLoaded', () => {
|
|||
});
|
||||
|
||||
window.navigatorContainer = navigator
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState !== 'loading') {
|
||||
addNavigationNavigatorContainer();
|
||||
} else {
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
addNavigationNavigatorContainer();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,11 +8,19 @@ Vue.use(PerfectScrollbar);
|
|||
|
||||
Vue.prototype.i18n = window.I18n;
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
function addNavigationTopMenuContainer() {
|
||||
new Vue({
|
||||
el: '#sciNavigationTopMenuContainer',
|
||||
components: {
|
||||
'top-menu-container': TopMenuContainer
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState !== 'loading') {
|
||||
addNavigationTopMenuContainer();
|
||||
} else {
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
addNavigationTopMenuContainer();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue