We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 543ae2f commit ca1f6c3Copy full SHA for ca1f6c3
src/register.ts
@@ -14,7 +14,15 @@ const hyphenate = ((str: string): string => {
14
15
export function register_all_components(vue: typeof Vue, prefix: string) {
16
for (var k in components) {
17
- vue.component(prefix + '-' + hyphenate(k), components[k])
+ let opt = components[k]
18
+ if (typeof opt === 'function')
19
+ opt = opt.options
20
+
21
+ // clear components so it will have new names
22
+ delete opt.components
23
24
+ opt.name = prefix + '-' + hyphenate(k)
25
+ vue.component(opt.name, vue.extend(opt))
26
}
27
28
0 commit comments