mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
27 lines
750 B
JavaScript
27 lines
750 B
JavaScript
|
|
import Vue from 'vue/dist/vue.esm';
|
|
import TopMenuContainer from '../../../vue/navigation/top_menu.vue';
|
|
import PerfectScrollbar from 'vue2-perfect-scrollbar';
|
|
import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css';
|
|
import outsideClick from '../directives/outside_click';
|
|
|
|
Vue.use(PerfectScrollbar);
|
|
Vue.directive('click-outside', outsideClick);
|
|
Vue.prototype.i18n = window.I18n;
|
|
|
|
function addNavigationTopMenuContainer() {
|
|
new Vue({
|
|
el: '#sciNavigationTopMenuContainer',
|
|
components: {
|
|
'top-menu-container': TopMenuContainer
|
|
}
|
|
});
|
|
}
|
|
|
|
if (document.readyState !== 'loading') {
|
|
addNavigationTopMenuContainer();
|
|
} else {
|
|
window.addEventListener('DOMContentLoaded', () => {
|
|
addNavigationTopMenuContainer();
|
|
});
|
|
}
|