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