v-bind
-
缩写:
:
-
预期:
any (with argument) | Object (without argument)
-
参数:
attrOrProp (optional)
<!-- 绑定一个全是 attribute 的对象 -->
为了省事 不用一个个的去写v-bind:id="xx" v-bind:otherAttr="xx"
<div v-bind="{ id: someProp, 'other-attr': otherProp }"></div>
API — Vue.jsVue.js - The Progressive JavaScript Frameworkhttps://v2.cn.vuejs.org/v2/api/#v-bind