Answer the question
In order to leave comments, you need to log in
Why might vue complain in this example([Vue warn]: ... value as key)?
[Vue warn]: Avoid using non-primitive value as key, use string/number value instead.
<v-text-field
v-model="editedItem.url"
label="Домен"
:rules="urlRules"
:error-messages="nameErrors"
placeholder="Пример https://test.com" />
mixins: [validationMixin],
validations: {
url: { required },
},
...
computed: {
nameErrors () {
const errors = [];
let errorMsg = '';
if (!this.$v.url.$dirty) return errors;
if(!!this.errorsUrlTxt){
errorMsg = this.errorsUrlTxt;
!this.$v.url.required && errors.push(errorMsg);
}
return errors
},
},
Answer the question
In order to leave comments, you need to log in
So he stopped swearing, apparently he didn’t like that I was conveying the type of which he could not determine
!this.$v.url.required && errors.push(`${errorMsg}`);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question