mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-21 17:48:37 +08:00
22 lines
636 B
JavaScript
22 lines
636 B
JavaScript
import { createApp } from 'vue/dist/vue.esm-bundler.js';
|
|
import InputTitleField from '../../../vue/shared/input_title_field.vue';
|
|
import { mountWithTurbolinks } from '../helpers/turbolinks.js';
|
|
|
|
const app = createApp({
|
|
data() {
|
|
return {
|
|
testValue: 'Lorem ipsum dolor sit amet consectetur adipiscing elit',
|
|
}
|
|
},
|
|
computed: {
|
|
error() {
|
|
return this.testValue.length > 10;
|
|
},
|
|
errorMessage() {
|
|
return 'is too long (maximum is 10 characters)';
|
|
}
|
|
}
|
|
});
|
|
app.component('InputTitleField', InputTitleField);
|
|
app.config.globalProperties.i18n = window.I18n;
|
|
mountWithTurbolinks(app, '#titleInputs');
|