Skip to content

24 - v-active-style #568

Open
Open
@Enoooch

Description

@Enoooch
const VActiveStyle = {
  created(el, binding){
    const [style, condition] = binding.value

    watchEffect(() => {
      const isActive = condition()
      Object.keys(style).forEach(key => {
        el.style[key] = isActive ? style[key] : ''
      })
    })
  }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions