Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div class="hello">
- <button v-on:click = "numero" > Contatore </button>
- <h1>Bisogna sempre osservare le stelle, quante sono: {{cont}}</h1>
- </div>
- </template>
- <script>
- export default {
- name: 'Salutone',
- data () {
- return {
- cont: 0
- }
- },
- methods: {
- numero: function () {
- this.cont = Math.round(Math.random() * 1000000)
- }
- }
- }
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped>
- h1{
- font-weight: normal;
- color: #000000;
- }
- a {
- color: #42b983;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement