|
@@ -11,9 +11,12 @@
|
|
|
<script>
|
|
<script>
|
|
|
const rootMargin = location.search.match(/rootMargin=(\d+)/)?.[1] ?? 0
|
|
const rootMargin = location.search.match(/rootMargin=(\d+)/)?.[1] ?? 0
|
|
|
const isFragment = location.search.includes('?fragment')
|
|
const isFragment = location.search.includes('?fragment')
|
|
|
|
|
+ const isVIf = location.search.includes('?v-if')
|
|
|
if (isFragment) {
|
|
if (isFragment) {
|
|
|
document.getElementById('app').innerHTML =
|
|
document.getElementById('app').innerHTML =
|
|
|
`<!--[--><!--[--><span>one</span><!--]--><button>0</button><span>two</span><!--]-->`
|
|
`<!--[--><!--[--><span>one</span><!--]--><button>0</button><span>two</span><!--]-->`
|
|
|
|
|
+ } else if (isVIf) {
|
|
|
|
|
+ document.getElementById('app').innerHTML = `<!---->`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
window.isHydrated = false
|
|
window.isHydrated = false
|
|
@@ -24,6 +27,7 @@
|
|
|
ref,
|
|
ref,
|
|
|
onMounted,
|
|
onMounted,
|
|
|
hydrateOnVisible,
|
|
hydrateOnVisible,
|
|
|
|
|
+ createCommentVNode,
|
|
|
} = Vue
|
|
} = Vue
|
|
|
|
|
|
|
|
const Comp = {
|
|
const Comp = {
|
|
@@ -39,7 +43,9 @@
|
|
|
{ onClick: () => count.value++ },
|
|
{ onClick: () => count.value++ },
|
|
|
count.value,
|
|
count.value,
|
|
|
)
|
|
)
|
|
|
- if (isFragment) {
|
|
|
|
|
|
|
+ if (isVIf) {
|
|
|
|
|
+ return createCommentVNode('v-if', true)
|
|
|
|
|
+ } else if (isFragment) {
|
|
|
return [[h('span', 'one')], button, h('span', 'two')]
|
|
return [[h('span', 'one')], button, h('span', 'two')]
|
|
|
} else {
|
|
} else {
|
|
|
return button
|
|
return button
|