Last active
October 22, 2018 10:12
-
-
Save atis2345/b215b55617306ca9ebf943134d6ddc2b to your computer and use it in GitHub Desktop.
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="lalala"> | |
<div v-for="(element, key) in list" :key="key"> | |
<button @click="changeFlag">{{ getDate() }}</button> | |
</div> | |
<div v-if="flag">LALALA</div> | |
</div> | |
<script> | |
let lalala = new Vue({ | |
el: '#lalala', | |
data: { | |
list: ['lalala', 'lalala 2'], | |
flag: false | |
}, | |
methods: { | |
getDate() { | |
return Date(); | |
}, | |
changeFlag() { | |
this.flag = true; | |
} | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment