Created
August 4, 2020 11:18
-
-
Save PKTseng/7f86fda1abf35caa02f63f417e5b1cec to your computer and use it in GitHub Desktop.
修飾符-box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="app"> | |
<div class="box" @click="msg = 'a'"> | |
<div class="box" @click="msg = 'b'"> | |
<div class="box" @click="msg = 'c'"> | |
</div> | |
</div> | |
</div> | |
<h1>{{msg}}</h1> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Vue({ | |
el:"#app", | |
data:{ | |
msg:'' | |
}, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.box{ | |
display: inline-block; | |
min-width: 100px; | |
min-height: 100px; | |
padding: 30px; | |
border: 3px solid red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment