“vuejs v-on” Kod odpowiedzi

V-for

<ul>
  <li v-for="(item, index) in items">
    {{ index }} - {{ item }}
  </li>
</ul>
Freeburn

vuejs v-on

<div v-on:javascriptEvent = "method"></div>

<!-- v-on:click <=> @click -->
Lioruby

Vue JS BIND DANY

// with v=bind
 <p><a v-bind:href="website">Text goes here fo the link </a> </p> 

//or with :
 <p><a :href="website">Text goes here fo the link </a> </p>

//website is variable/property with link in a Vue instance
Batman

wydarzenie Vueks

<div id="example-3">
  <button v-on:click="say('salut')">Dire salut</button>
  <button v-on:click="say('quoi')">Dire quoi</button>
</div>
Fragile Fish

wydarzenie Vueks

new Vue({
  el: '#example-3',
  methods: {
    say: function (message) {
      alert(message)
    }
  }
})
Fragile Fish

Odpowiedzi podobne do “vuejs v-on”

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu