I've encountered a problem with my Vue application. The line :class=require ? 'require' : '' is returning the string 'require' even when the value of require is false. Can anyone help me figure out what's wrong?
<template>
<custom-label label="Название">
<input
class="text_input"
:class="require ? 'require' : ''"
:value="$attrs.value" @input="$emit('input', $event.target.value)"
placeholder="Матрица всея барановичского района"
/>
</custom-label>
</template>
<script>
export default {
name: "InputText",
components: {CustomLabel},
computed: mapState({ state: state => state }),
props: {
require: Boolean
}
};
</script>
Here are some screenshots from devtools for reference: