2023-05-22 16:48:21 +08:00
|
|
|
/* global notTurbolinksPreview */
|
2023-04-26 17:20:10 +08:00
|
|
|
|
|
|
|
import TurbolinksAdapter from 'vue-turbolinks';
|
|
|
|
import Vue from 'vue/dist/vue.esm';
|
|
|
|
import ActionToolbar from '../../vue/components/action_toolbar.vue';
|
|
|
|
|
|
|
|
Vue.use(TurbolinksAdapter);
|
2023-05-29 22:34:07 +08:00
|
|
|
Vue.prototype.i18n = window.I18n;
|
2023-04-26 17:20:10 +08:00
|
|
|
|
2023-04-26 21:51:22 +08:00
|
|
|
window.initActionToolbar = () => {
|
2023-05-18 21:52:18 +08:00
|
|
|
if (window.actionToolbarComponent) return;
|
2023-05-22 16:48:21 +08:00
|
|
|
if (notTurbolinksPreview()) {
|
|
|
|
new Vue({
|
|
|
|
el: '#actionToolbar',
|
|
|
|
components: {
|
|
|
|
ActionToolbar
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2023-04-26 21:51:22 +08:00
|
|
|
}
|