Skip to content

motion component applied expired styles after component updated #202

@ZhouY11

Description

@ZhouY11

System info

System(Stackblitz Website Config):
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
NpmPackages:
@vueuse/core: ^7.6.2 => 7.6.2
@vueuse/motion: ^2.2.3 => 2.2.3
vite: ^5.3.1 => 5.3.1
vue: ^3.2.25 => 3.2.31

Reproduction

Please open Stackblitz code

Describe the bug

Vue reapplies all styles every render, include style properties and calculated initially styles get reapplied every render.
It caused the component to apply the wrong style after triggering the update.

屏幕截图 2024-06-18 152142
屏幕截图 2024-06-18 152551

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions