Subscribe on changes!

teleport组件当目标为祖父及以上节点时,若存在css-v-bind的情况且disabled=true时渲染异常

avatar
Mar 11th 2023

Vue version

3.2.47

Link to minimal reproduction

Steps to reproduce

提供的sfc组件渲染异常

What is expected?

正常渲染

What is actually happening?

解析css-v-bind时异常 TypeError: Cannot read properties of null (reading 'nodeType') at updateCssVars (runtime-core.esm-bundler.js:6608:22)

System Info

No response

Any additional comments?

No response

avatar
Mar 11th 2023
<script setup>
import { ref } from 'vue'

const open = ref(false)

const windowWith = ref('300px')

</script>

<template>
<button @click="open = true">Open Modal</button>
<Teleport to="body" :disabled = "true">
  <div v-if="open" class="modal">
    <p>Hello from the modal!</p>
    <button @click="open = false">Close</button>
  </div>
</Teleport>
</template>
<style>
.modal{
  width: v-bind(windowWith);
}
</style>