Skip to content

Commit aca6388

Browse files
committed
fix demo hydration mismatch
1 parent a25284b commit aca6388

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/.vitepress/theme/styles/inline-demo.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.demo {
2-
/* background-color: var(--vt-c-bg-soft); */
32
transition: border-color 0.5s;
43
padding: 22px 24px;
54
border-radius: 8px;
65
border: 1px solid var(--vt-c-divider-light);
6+
margin-bottom: 1.2em;
77
}
88

99
.demo p {
@@ -21,4 +21,4 @@
2121

2222
.demo button + button {
2323
margin-left: 1em;
24-
}
24+
}

src/guide/essentials/template-syntax.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ The double mustaches interprets the data as plain text, not HTML. In order to ou
2929
const rawHtml = '<span style="color: red">This should be red.</span>'
3030
</script>
3131

32-
<p class="demo">
32+
<div class="demo">
3333
<p>Using text interpolation: {{ rawHtml }}</p>
3434
<p>Using v-html directive: <span v-html="rawHtml"></span></p>
35-
</p>
35+
</div>
3636

3737
The contents of the `span` will be replaced with the value of the `rawHtml` property, interpreted as plain HTML - data bindings are ignored. Note that you cannot use `v-html` to compose template partials, because Vue is not a string-based templating engine. Instead, components are preferred as the fundamental unit for UI reuse and composition.
3838

src/guide/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ import { ref } from 'vue'
3939
const count = ref(0)
4040
</script>
4141

42-
<p class="demo">
42+
<div class="demo">
4343
<button @click="count++">
4444
Clicked {{ count }} time{{ count === 1 ? '' : 's' }}.
4545
</button>
4646
<button @click="count = 0">Reset</button>
47-
</p>
47+
</div>
4848

4949
The above example demonstrates the two core features of Vue:
5050

0 commit comments

Comments
 (0)