File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,16 @@ export default {
1111 const keys = reqs . keys ( )
1212 for ( let i = 0 ; i < keys . length ; i ++ ) {
1313 const module = getModule ( reqs ( keys [ i ] ) )
14-
15- // turn components' names to Pascal Case
16- // so that we can use markups like `<CSelect />`
17- // which would meet the needs of those PascalCase fans
18- // TODO
19- // we will turn all `name` fields in SFC into pacal case in the future
20- module . name && Vue . component ( pascalCase ( module . name ) , module )
14+ if ( typeof module . install === 'function' ) {
15+ Vue . use ( module )
16+ } else if ( module && module . name ) {
17+ // turn components' names to Pascal Case
18+ // so that we can use markups like `<CSelect />`
19+ // which would meet the needs of those PascalCase fans
20+ // TODO
21+ // we will turn all `name` fields in SFC into pacal case in the future
22+ Vue . component ( pascalCase ( module . name ) , module )
23+ }
2124 }
2225 }
2326}
You can’t perform that action at this time.
0 commit comments