2023-03-22 16:42:54 +08:00
|
|
|
|
|
|
|
import Vue from 'vue/dist/vue.esm';
|
|
|
|
import TopMenuContainer from '../../../vue/navigation/top_menu.vue';
|
2023-04-07 19:59:06 +08:00
|
|
|
import PerfectScrollbar from 'vue2-perfect-scrollbar';
|
|
|
|
import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css';
|
2023-09-22 17:59:39 +08:00
|
|
|
import outsideClick from '../directives/outside_click';
|
2023-04-07 19:59:06 +08:00
|
|
|
|
|
|
|
Vue.use(PerfectScrollbar);
|
2023-09-22 17:59:39 +08:00
|
|
|
Vue.directive('click-outside', outsideClick);
|
2023-03-22 16:42:54 +08:00
|
|
|
Vue.prototype.i18n = window.I18n;
|
|
|
|
|
2023-08-23 21:49:00 +08:00
|
|
|
function addNavigationTopMenuContainer() {
|
2023-03-22 16:42:54 +08:00
|
|
|
new Vue({
|
|
|
|
el: '#sciNavigationTopMenuContainer',
|
|
|
|
components: {
|
|
|
|
'top-menu-container': TopMenuContainer
|
|
|
|
}
|
|
|
|
});
|
2023-08-23 21:49:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (document.readyState !== 'loading') {
|
|
|
|
addNavigationTopMenuContainer();
|
|
|
|
} else {
|
|
|
|
window.addEventListener('DOMContentLoaded', () => {
|
|
|
|
addNavigationTopMenuContainer();
|
|
|
|
});
|
|
|
|
}
|