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

'v-model' directives aren't supported on <Select> elements. #303

Closed
vvpvvp opened this issue Jun 30, 2017 · 9 comments
Closed

'v-model' directives aren't supported on <Select> elements. #303

vvpvvp opened this issue Jun 30, 2017 · 9 comments
Labels

Comments

@vvpvvp
Copy link

vvpvvp commented Jun 30, 2017

Info

Platform: macOS
Vetur version: 0.8.6
VSCode version: 1.13.1

Problem

'v-model' directives aren't supported on <Select> elements.

<Select> is a custom component.

2017-06-30 11 41 10

@HerringtonDarkholme
Copy link
Member

My suggestion is using another name for custom component. Case sensitivity is only supported in SFC and not html compliant.

@mysticatea however, eslint-plugin-vue should be either consistently case insensitive or sensitive, not sometimes.

@HerringtonDarkholme
Copy link
Member

can doesn't imply should. The doc also explicitly states:

This means that the PascalCase is the most universal declaration convention and kebab-case is the most universal usage convention.

@vvpvvp
Copy link
Author

vvpvvp commented Jun 30, 2017

but I think, It's doesn't imply should not.
It's vue template, and It's virtual computing, case sensitive doesn't imply wrong, and It's supported.

@HerringtonDarkholme
Copy link
Member

HerringtonDarkholme commented Jun 30, 2017

Try this:

new Vue({template: '<Div>Im div, case insensitive</Div>'}).$mount()
new Vue({template: '<NoExist>Error</NoExist>'}).$mount()

Vue's string template and SFC are case insensitive for html compliance. It seems hard to correctly tell a custom component from a misspell native tag name without resolving the components field of component associated with the template.

Also, when you register a component with the same case insensitive name as native tag. Vue warns Do not use built-in or reserved HTML elements as component id: Select.

@vvpvvp
Copy link
Author

vvpvvp commented Jun 30, 2017

I think you are consider the wrong direction,
if you say we should case insensitive, regardless of whether my component is custom, it's just a <select> elements, it should not be wrong.

@HerringtonDarkholme
Copy link
Member

Please file this issue on https://github.com/vuejs/eslint-plugin-vue .

@armano2
Copy link
Contributor

armano2 commented Sep 8, 2017

@octref this issue is was solved some time ago in vue-eslint-parser/plugin and you should consider updating version up to 3.13.0 from currently used 3.8.0

cc: @thearabbit @HerringtonDarkholme @vvpvvp

@HerringtonDarkholme
Copy link
Member

HerringtonDarkholme commented Sep 8, 2017

@vvpvvp @armano2 We've already upgraded to 3.13.0

https://github.com/vuejs/vetur/blob/master/server/package.json#L21

The fix will be released in next version, soon.

@octref
Copy link
Member

octref commented Sep 8, 2017

Released 0.9.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants