Skip to content

Commit d681b9d

Browse files
DKrootchrisvfritz
authored andcommitted
Renamed TitleCase term to PascalCase throughout Components documentation (vuejs#951)
"Camel case is distinct from title case, which is traditionally used for book titles and headlines, as the latter retains the spaces between the words." https://en.wikipedia.org/wiki/Camel_case
1 parent c1d2b59 commit d681b9d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/v2/guide/components.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ Note that when used as a route component in `vue-router`, these properties will
11311131

11321132
### Component Naming Conventions
11331133

1134-
When registering components (or props), you can use kebab-case, camelCase, or TitleCase.
1134+
When registering components (or props), you can use kebab-case, camelCase, or PascalCase.
11351135

11361136
``` js
11371137
// in a component definition
@@ -1140,8 +1140,8 @@ components: {
11401140
'kebab-cased-component': { /* ... */ },
11411141
// register using camelCase
11421142
'camelCasedComponent': { /* ... */ },
1143-
// register using TitleCase
1144-
'TitleCasedComponent': { /* ... */ }
1143+
// register using PascalCase
1144+
'PascalCasedComponent': { /* ... */ }
11451145
}
11461146
```
11471147

@@ -1158,13 +1158,13 @@ When using _string_ templates however, we're not bound by HTML's case-insensitiv
11581158

11591159
- kebab-case
11601160
- camelCase or kebab-case if the component has been defined using camelCase
1161-
- kebab-case, camelCase or TitleCase if the component has been defined using TitleCase
1161+
- kebab-case, camelCase or PascalCase if the component has been defined using PascalCase
11621162

11631163
``` js
11641164
components: {
11651165
'kebab-cased-component': { /* ... */ },
11661166
camelCasedComponent: { /* ... */ },
1167-
TitleCasedComponent: { /* ... */ }
1167+
PascalCasedComponent: { /* ... */ }
11681168
}
11691169
```
11701170

@@ -1174,12 +1174,12 @@ components: {
11741174
<camel-cased-component></camel-cased-component>
11751175
<camelCasedComponent></camelCasedComponent>
11761176

1177-
<title-cased-component></title-cased-component>
1178-
<titleCasedComponent></titleCasedComponent>
1179-
<TitleCasedComponent></TitleCasedComponent>
1177+
<pascal-cased-component></pascal-cased-component>
1178+
<pascalCasedComponent></pascalCasedComponent>
1179+
<PascalCasedComponent></PascalCasedComponent>
11801180
```
11811181

1182-
This means that the TitleCase is the most universal _declaration convention_ and kebab-case is the most universal _usage convention_.
1182+
This means that the PascalCase is the most universal _declaration convention_ and kebab-case is the most universal _usage convention_.
11831183

11841184
If your component isn't passed content via `slot` elements, you can even make it self-closing with a `/` after the name:
11851185

0 commit comments

Comments
 (0)