7,8,9月没有假期,期待假期的到来......
1.slot的使用
<div >
<div slot="commitment">
<a-form-item>
......
</a-form-item>
</div>
<div slot="round">
<a-form-item>
......
<a-form-item>
</div>
</div>
options:any[]=[
{
label:'比赛类型',
key:'matchType',
type:'input',
customRender: {
...
}
},
{
slot:'line'
},
{
slot:'round'
},
{
slot:commitment''
}
]
2.扩展运算符的使用
blendMatchRoundList = [...jfMatchRoundList,...ttMatchRoundList]
3.解构赋值的使用
<div>{{['物理赛','化学赛','英语赛'][config.type]}}</div>
4.属性异步传递
addPro-blend.vue
<JfMatch :jfMatchRoundList.sync = jfMatchRoundList></JfMatch>
index.vue
@PropSync ('jfMatchRoundList') jsMatchRoundList :any
5.非父子组件传递属性,使用provide,inject
addPro-blend.vue
@inject('config') config:any
index.vue
@provide('config') config:any