Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

[Bug] Computed property not working when used in v-bind:style #37

Closed
@dhruvkb

Description

@dhruvkb

In my project I have a computed property, let's say x which is an integer.

When I bind it inside a style in the template, like this

<template>
  <div :style="{ left: `${x}px` }">Hello</div>
</template>

the style tag is blank on the rendered output.

But if I use it inside moustache syntax, like this

<template>
  <div :style="{ left: `${x}px` }">{{ x }}</div>
</template>

it works. The style is populated and the content is also displayed.

Is there some specific edge case that only affects the style attribute?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions