Skip to content

Recommendation: the directives v-style able to support object format. just like v-with #578

@rwu823

Description

@rwu823

current v-style usage:

<div v-style="
  top: top + 'px',
  left: left + 'px',
  margin-top: marginTop + 'px'
"></div>
 data: {
   top:  200,
   left: 100,
   marginTop: 20
 }

But that is troublesome if have many styles and much computed on html mockup.
If v-style able to input the Object format, I think will be better clearly:

<div v-style="style"></div>
 data: {
   style: {
     top:  200 + 'px',
     left: 100 + 'px',
     marginTop: 20  + 'px'
   }

 }

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