初学vus.js
我放一个按钮
<div id = "app">
<el-button type="primary">按钮</el-button>
</div>
显示出来是这样子
然后我用组件包一层,想传一个属性进去
<div id = "app">
<runoob typec="primary">按钮</runoob>
</div>
Vue.component('runoob', {
props: ['typec'],
template: '<el-button type = "{{typec}}">按钮</el-button>'
})
但是没有效果
这是为什么啊
慕虎7371278
子组件为什么向外传递出delete事件,同时传出本身的index值,是父组件的index属性接受吗
为什么不能直接传递属性key
父组件中引入的子组件的属性不是有key吗,为什么没有直接把key传给子组件
vue中怎么像react一样使用扩展运算符传属性?
相关分类