Format code.
This commit is contained in:
parent
c54cf6e4a6
commit
2ebef86727
1 changed files with 7 additions and 5 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dropdown-question" :class="(errors && errors.length) || hasError ? 'has-error' : ''">
|
<div
|
||||||
|
class="dropdown-question"
|
||||||
|
:class="(errors && errors.length) || hasError ? 'has-error' : ''">
|
||||||
<label
|
<label
|
||||||
:for="inputId"
|
:for="inputId"
|
||||||
:aria-label="questionText"
|
:aria-label="questionText"
|
||||||
|
|
@ -44,7 +46,7 @@ export default {
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
hasError: Boolean,
|
hasError: Boolean,
|
||||||
placeHolderText: String
|
placeHolderText: String,
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const propsClone = Object.assign({}, props);
|
const propsClone = Object.assign({}, props);
|
||||||
|
|
@ -56,7 +58,7 @@ export default {
|
||||||
initialValue = modelValue;
|
initialValue = modelValue;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
initialValue = (modelValue && modelValue.length > 0) ? modelValue : "";
|
initialValue = modelValue && modelValue.length > 0 ? modelValue : "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,7 +68,7 @@ export default {
|
||||||
initialValue: initialValue,
|
initialValue: initialValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
const {errorMessage, handleBlur, handleChange, meta, errors } = useField(
|
const { errorMessage, handleBlur, handleChange, meta, errors } = useField(
|
||||||
props.inputId,
|
props.inputId,
|
||||||
props.validationRules,
|
props.validationRules,
|
||||||
fieldOptions
|
fieldOptions
|
||||||
|
|
@ -77,7 +79,7 @@ export default {
|
||||||
handleBlur,
|
handleBlur,
|
||||||
handleChange,
|
handleChange,
|
||||||
meta,
|
meta,
|
||||||
errors
|
errors,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue