单击右键弹出提示框
<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="js/vue.js"></script>
</head>
<body>
<div>
<button id="btn1" v-on:click.right="test">点我</button>
</div>
</body>
<script>
var btn = new Vue({
el: "#btn1",
methods:{
test: function () {
alert("btn1")
}
}
})
</script>
</html>
效果图