mirror of https://github.com/vuejs/core.git
fix(compiler-vapor): don't setText for root element
This commit is contained in:
parent
fc651f6905
commit
10f8cb4351
|
@ -9,8 +9,9 @@ export const transformInterpolation: NodeTransform = (node, ctx) => {
|
|||
const parentChildren = ctx.parent ? ctx.parent.node.children : []
|
||||
const isFirst = ctx.index === 0
|
||||
const isLast = ctx.index === parentChildren.length - 1
|
||||
const isRoot = ctx.parent === ctx.root
|
||||
|
||||
if (isFirst && isLast) {
|
||||
if (isFirst && isLast && !isRoot) {
|
||||
const parent = ctx.parent!
|
||||
const parentId = parent.reference()
|
||||
ctx.registerEffect(
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<template>{{ '1' }}</template>
|
|
@ -0,0 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue/vapor'
|
||||
|
||||
interface Task {
|
||||
title: string
|
||||
completed: boolean
|
||||
}
|
||||
const tasks = ref<Task[]>([])
|
||||
</script>
|
||||
|
||||
<template>{{ tasks }}</template>
|
Loading…
Reference in New Issue