当我们使用element-ui,el-button里面的@click事件不生效
1.当@click点击无效的时候
<el-button type="primary" @click="login">登录</el-button>
2.在@click后面加上.native即可
<el-button type="primary" @click.native="login">登录</el-button>
1.当@click点击无效的时候
<el-button type="primary" @click="login">登录</el-button>
2.在@click后面加上.native即可
<el-button type="primary" @click.native="login">登录</el-button>