title: How to add class on vue.js 2?
body: <p>My component is like this :</p>
  
  <pre><code>&lt;template&gt;
      &lt;span class="rating"&gt;
          ...
      &lt;/span&gt;
  &lt;/template&gt;
  &lt;script&gt;
      export default{
          props: {
              'star': null
          }, 
          created: function() {
              if(this.star != null)
                  $(".rating").addClass('test');
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>When the page reload first, I want to check prop star. If the prop star not equal to null, then add class test</p>
  
  <p>I try like my code above, but it does not work</p>
  
  <p>Is there anyone who can help me?</p>