title: vue.js conditional rendering of an attribute
body: <p>I'd like to learn what is the best way to conditionally render an HTML attribute in Vue.js. For example, add <code>data-toggle="tooltip"</code> if there is a tooltip message for current instance.</p>
  
  <p>The code I have now:</p>
  
  <pre><code>&lt;span
    :data-toggle="!!col.col_spec.tooltip ? 'tooltip' : ''"
    :title="col.col_spec.tooltip"
  &gt;
    {{ col.col_spec.title }}
  &lt;/span&gt;
  </code></pre>
  
  <p>Though, I don't like the 2nd line much… Even if I use computed property here, I'd prefer not to have <code>data-toggle</code> attribute at all, when there is no tooltip to display.</p>