如下只需要在绑定原生事件后加上.native就行
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>组件参数校验与非props特性</title>
<script src="vue.js"></script>
</head>
<body>
<div id = 'app2'>
<row @click.native='nativeClickHandle'></row>
</div>
<script>
Vue.component('row',{
template:'<h2>zzz</h2>'
});
var app = new Vue({
el:'#app2',
methods:{
nativeClickHandle:function(){
alert('i am native');
}
}
});
</script>
</body>
</html>



被折叠的 条评论
为什么被折叠?



