import { computed } from 'https://cdnjs.cloudflare.com/ajax/libs/vue/3.0.11/vue.esm-browser.js'; import { getWrapClass } from 'https://wws.jp/_export/code/vuejs/vue3/form_utils?codeblock=0'; const TwoInputsForm = { template: `
`, props: { type: { type: String, default: 'text' }, firstValue: { type: String, default: '' }, secondValue: { type: String, default: '' }, firstErrors: { type: Array, default: [] }, secondErrors: { type: Array, default: [] }, controlWrapperClasses: { type: Array, default: [] }, controlWrapperStyles: { type: Object, default: {} }, controlClasses: { type: Array, default: [] }, controlStyles: { type: Object, default: {} }, messageWrapperClasses: { type: Array, default: [] }, messageWrapperStyles: { type: Object, default: {} }, controlErrorClass: { type: String, default: 'has-error' }, messageErrorClass: { type: String, default: 'text-danger' }, }, emits: ['update:firstValue', 'update:lastValue'], setup(props, context) { const computedFirstControlWrapperClasses = computed(() => { return getWrapClass( props.firstErrors, props.controlWrapperClasses, props.controlErrorClass ) }) const computedSecondControlWrapperClasses = computed(() => { return getWrapClass( props.secondErrors, props.controlWrapperClasses, props.controlErrorClass ) }) const computedFirstMessageWrapperClasses = computed(() => { return getWrapClass( props.firstErrors, props.messageWrapperClasses, props.messageErrorClass ) }) const computedSecondMessageWrapperClasses = computed(() => { return getWrapClass( props.secondErrors, props.messageWrapperClasses, props.messageErrorClass ) }) return { computedFirstControlWrapperClasses, computedFirstMessageWrapperClasses, computedSecondControlWrapperClasses, computedSecondMessageWrapperClasses } } }; export default TwoInputsForm;