vue.js
1,给另一个按钮添加ref
<el-button size="small" type="primary" ref="import">导入</el-button>
2,事件触发
this.$refs.import.$el.click()
jQuery
$("#a").click(function(){$("#b").trigger('click');})
原生JS
document.getElementById('a').click();
如果觉得《vue模拟触发另一个按钮点击事件》对你有帮助,请点赞、收藏,并留下你的观点哦!