2022-04-21 21:12:34 +08:00
|
|
|
/* global I18n */
|
|
|
|
|
|
|
|
import TurbolinksAdapter from 'vue-turbolinks';
|
|
|
|
import Vue from 'vue/dist/vue.esm';
|
|
|
|
import ProtocolContainer from '../../vue/protocol/container.vue';
|
|
|
|
|
|
|
|
Vue.use(TurbolinksAdapter);
|
|
|
|
Vue.prototype.i18n = window.I18n;
|
|
|
|
|
|
|
|
window.initProtocolComponent = () => {
|
|
|
|
Vue.prototype.dateFormat = $('#protocolContainer').data('date-format');
|
2022-05-03 21:18:48 +08:00
|
|
|
|
2022-04-21 21:12:34 +08:00
|
|
|
new Vue({
|
|
|
|
el: '#protocolContainer',
|
|
|
|
components: {
|
|
|
|
'protocol-container': ProtocolContainer
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2022-04-22 19:07:51 +08:00
|
|
|
protocolUrl: $('#protocolContainer').data('protocol-url'),
|
|
|
|
stepsUrl: $('#protocolContainer').data('steps-url'),
|
2022-04-26 20:13:17 +08:00
|
|
|
addStepUrl: $('#protocolContainer').data('add-step-url'),
|
|
|
|
editable: $('#protocolContainer').data('editable')
|
2022-04-21 21:12:34 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
initProtocolComponent();
|