VUE 组件二次封装之v-bind=“$attrs” 和v-on="$listener"
vue 2.4.0 新增
//子组件
<template>
<div>
<el-button v-bind="$attrs">确定</el-button>
<div>
</template>
// 父组件使用
<my-button type='primary' size='mini'/>
VUE 组件二次封装之v-bind=“$attrs” 和v-on="$listener"
vue 2.4.0 新增
//子组件
<template>
<div>
<el-button v-bind="$attrs">确定</el-button>
<div>
</template>
// 父组件使用
<my-button type='primary' size='mini'/>