vue组件的属性使用和不使用冒号的区别

加冒号的,说明后面的是一个变量或者表达式;没加冒号的后面就是对应的字符串字面量!

列:

  <input :disable="true">打开</input>

输出:true 或 false   值是Boolean类型

<input disable="true">打开</input>

输出:true 或 false   值是Boolean类型

猜你喜欢

转载自blog.csdn.net/sinat_41882906/article/details/83036164