Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Props input classes expected string go Array #39

Open
Aslam97 opened this issue Feb 26, 2021 · 0 comments
Open

Props input classes expected string go Array #39

Aslam97 opened this issue Feb 26, 2021 · 0 comments

Comments

@Aslam97
Copy link

Aslam97 commented Feb 26, 2021

vue.common.dev.js?4650:630 [Vue warn]: Invalid prop: type check failed for prop "inputClasses". Expected String with value "resources-js-auth-views-partials-_otp__otp_input resources-js-auth-views-partials-_otp__error", got Array

code

:input-classes="[$style.otp_input, [$style.error]: otpError ]"

I solve this by just put the condition inside computed

 otpInputClass() {
   return `${this.$style.otp_input} ${this.otpError ? this.$style.error : ''}`;
 }

but again it is good if i can do conditional without using computed

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant