s3e37 v-show
This commit is contained in:
parent
b7bc1d8829
commit
25a3f1612a
@ -7,7 +7,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id='app'>
|
||||
<button type="button" name="button" @click="show = !show">Switch</button>
|
||||
<button type="button" name="button" @click="show = !show">
|
||||
Switch
|
||||
</button>
|
||||
|
||||
<p v-if="show">You can see me</p>
|
||||
<p v-else>Now you see me</p>
|
||||
@ -15,7 +17,7 @@
|
||||
<h1>Heading</h1>
|
||||
<p>Inside a template</p>
|
||||
</template>
|
||||
<p>Do you also see me?</p>
|
||||
<p v-show="show">Do you also see me?</p>
|
||||
</div>
|
||||
<script src="app.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user