Skip to content

Commit 3659a94

Browse files
Barthelemy Ledouxelevatebart
authored andcommitted
fix: make style work again
1 parent 6949a3d commit 3659a94

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

demo/assets/input.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
new Vue({
22
template: `
33
<div>
4-
<input v-model="value" type="checkbox" :name="cname">
4+
<input v-model="value" type="checkbox">
55
<h1 v-if="value">I am checked</h1>
66
</div>`,
77
data() {
88
return {
9-
cname: "myCheck",
109
value: false
1110
};
1211
}

src/Preview.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,12 @@ export default {
8585
}
8686
8787
data.components = this.components;
88+
if (style) {
89+
data._scopeId = `data-${this.scope}`;
90+
addScopedStyle(style, this.scope);
91+
}
8892
8993
this.$options.components.VuePreview = data;
90-
addScopedStyle(style, this.scope);
9194
}
9295
}
9396
};

0 commit comments

Comments
 (0)