1. Home
  2. Vue
  3. V-show
#vue#directive

Show this element as long as the value is true.

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

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