v-bind指令用于设置HTML属性:v-bind:href 缩写为 :href

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

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

v-on 指令用于绑定HTML事件 :v-on:click 缩写为 @click

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

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

最好不要用@,因为asp.net mvc页面识别@ 不太好

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

相关文章:

  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-09-13
猜你喜欢
  • 2022-12-23
  • 2021-11-06
  • 2021-11-23
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案