2022-08-04 16:51:30 +08:00
|
|
|
import TurbolinksAdapter from 'vue-turbolinks';
|
|
|
|
import Vue from 'vue/dist/vue.esm';
|
|
|
|
import LabelTemplateContainer from '../../vue/label_template/container.vue';
|
|
|
|
|
|
|
|
Vue.use(TurbolinksAdapter);
|
|
|
|
Vue.prototype.i18n = window.I18n;
|
|
|
|
|
|
|
|
window.initLabelTemplateComponent = () => {
|
|
|
|
|
|
|
|
new Vue({
|
|
|
|
el: '#labelTemplateContainer',
|
|
|
|
components: {
|
|
|
|
'label-template-container': LabelTemplateContainer
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
labelTemplateUrl: $('#labelTemplateContainer').data('label-template-url'),
|
2022-08-04 19:36:14 +08:00
|
|
|
labelTemplatesUrl: $('#labelTemplateContainer').data('label-templates-url'),
|
2022-08-24 19:55:54 +08:00
|
|
|
previewUrl: $('#labelTemplateContainer').data('preview-url'),
|
2022-08-04 19:36:14 +08:00
|
|
|
newLabel: $('#labelTemplateContainer').data('new-label')
|
2022-08-04 16:51:30 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
initLabelTemplateComponent();
|