Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wushilei111 opened this issue Mar 11, 2023 · 2 comments

Comments

@wushilei111
Copy link

Vue version

3.2.47

Link to minimal reproduction

<script setup> import { ref } from 'vue' const open = ref(false) const windowWith = ref('300px') </script> Open Modal

Hello from the modal!

Close
<style> .modal{ width: v-bind(windowWith); } </style>

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

@wushilei111
Copy link
Author

<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>

@haoqunjiang
Copy link
Member

Duplicate of #7342

@haoqunjiang haoqunjiang marked this as a duplicate of #7342 Mar 16, 2023
@haoqunjiang haoqunjiang closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants