Skip to content

Commit ad7e3e0

Browse files
committed
feat: allow components to be registered in edit
1 parent 55593c9 commit ad7e3e0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Preview.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,13 @@ export default {
171171
this.handleError(e);
172172
return;
173173
}
174-
175-
options.components = this.components;
174+
if (this.components) {
175+
if (!options.components) {
176+
options.components = this.components;
177+
} else {
178+
options.components = { ...options.components, ...this.components };
179+
}
180+
}
176181
if (style) {
177182
// To add the scope id attribute to each item in the html
178183
// this way when we add the scoped style sheet it will be aplied

0 commit comments

Comments
 (0)