1. Home
  2. Vue
  3. V-show

Show this element as long as the value is true.

#vue#directive
<div id="app">
    <button v-show="guest">Login</button>
</div>

<script>
    new Vue({
        el: 'app',
        data: {
            guest: true
        }
    })
</script>
copy
Full Vue cheatsheet