Vue difference in v-on and the v-bind

v-bind instructions for setting HTML attributes: v-bind: href abbreviated: href

<!-- 完整语法 -->
<a v-bind:href="url">123</a>

<!-- 缩写 -->
<a :href="url">123</a>

v-on instruction is used to bind the HTML event: v-on: click abbreviated @click

<!-- 完整语法 -->
<a v-on:click="doSomething">123</a>

<!-- 缩写 -->
<a @click="doSomething">123</a>

Best not to use @ because asp.net mvc page recognition is not very good!

<a v-on:click="doSomething">aa</a>

Guess you like

Origin www.cnblogs.com/apebro/p/12601111.html