We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
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
[vue] 说说组件的命名规范
The text was updated successfully, but these errors were encountered:
风格指南
Sorry, something went wrong.
大写开头
举手🙋
官方样式指南里是这样写的: “组件命名应当是多个单词的,但根目录下的App组件或Vue提供的如<transition>, <component>内置组件除外” 这样做可以避免跟现有的以及未来的 HTML 元素相冲突,因为所有的 HTML 元素名称都是单个单词的。
App
<transition>
<component>
附:Style Guide — Vue.js
定义组件名有两种方式: 1.kebab-case(短横线分隔命名),引用时必须也采用kebab-case; 2.PascalCase(首字母大写命名),引用时既可以采用PascalCase也可以使用kebab-case; 但在DOM中使用只有kebab-case是有效的
组件名:大驼峰 调用组件时:小驼峰且-分隔 如:命名:MyComponent,调用:my-component
No branches or pull requests
[vue] 说说组件的命名规范
The text was updated successfully, but these errors were encountered: