Skip to content

[vapor] The issue of dynamic styling in Teleport when using component slots #14473

@jackma9604

Description

@jackma9604

Vue version

3.6.0-beta.6

Link to minimal reproduction

https://play.vuejs.org/#eNqdUk1P3DAQ/SuuLwsSJJWoOGzDqh/i0B7aquzREsrHbDA4tmVPwqLV/ndmnGRBCDhwSTzz3ozfjN9Ofvc+G3qQS1nEOmiPIgL2Xgyld2GlrO7oj2InAmzEXmyC68SCChYH6Kfr/JTPcg64H8HK1s5G6nfj7sUF1x9h6OF4ztfOuDABiwDNgpAiH0XQxRQgdN6UCBQJUVQ9orPiW210fXeh5NT3E/+VXK1d2xoo8pGWGlAR60nldF6DgaQYHZVXrnmgshEjtNGDGE71ZupMEGWKnD5PnOhLSyQwEVZ8Jrn0nfvn8wWj3rSLpIPnejZLSkR8MBzwtTvmp3UsqXulbXOUouOvyu7TUiayPJEYaXsb3Wa30Vl6tVSrZE13aQPhr0dN21VyOXZlrDTG3f9OOX6Akzlf30B990r+Nm45p+S/ABHCAEoeMCxDCzjCl1d/YEvnA9i5pjfEfgf8D9GZnjWOtB+9bUj2M15S+ytZS9t2HS+3CDbOQ7FQZu4TX0myGq/5rdGf5J5lX1IdbZS2ONv0I7Z/xb2VIYTs+76Bo3Eocjq/cMOHvXA9QODN0BRn2Xn2+bQCLLNzuX8E+BlKxA==

Steps to reproduce

Click the button twice

What is expected?

Display in red font

What is actually happening?

Display default color

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 Intel(R) Core(TM) Ultra 7 255H
    Memory: 15.06 GB / 31.43 GB
  Binaries:
    Node: 22.18.0 - D:\Document\nodejs\node.EXE
    npm: 10.9.3 - D:\Document\nodejs\npm.CMD
    pnpm: 10.28.2 - D:\Document\nodejs\pnpm.CMD
  Browsers:
    Chrome: 144.0.7559.133
    Edge: Chromium (140.0.3485.54)

Any additional comments?

It seems that there are issues with the following two areas

if (this.parentComponent && this.parentComponent.ut) {
this.registerUpdateCssVars(nodes)
}

function updateCssVars(frag: TeleportFragment) {
const ctx = frag.parentComponent as GenericComponentInstance

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't workingscope: vaporrelated to vapor mode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions