JavaScript

JavaScript

Made by DeepSource

Found invalid v-cloak directives JS-0630

Bug risk
Major
vue

The issue is raised when v-cloak has argument, modifier, and attribute value. The v-cloak directive will remain on the element until the associated Vue instance finishes compilation. It is combined with CSS rules such as [v-cloak] { display: none }, this directive can be used to hide un-compiled mustache bindings until the Vue instance is ready.

Bad Practice

<template>

  <!-- The directive requires no argument. -->
  <div v-cloak:aaa/>

  <!-- The directive requires no modifier. -->
  <div v-cloak.bbb/>

  <!-- The directive requires no attribute value. -->
  <div v-cloak="ccc"/>
</template>

Recommended

<template>
    <div v-cloak/>
</template>