Skip to content

Instantly share code, notes, and snippets.

@PKTseng
Created August 4, 2020 10:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save PKTseng/feb28fd7c20d22270b775612ee71333d to your computer and use it in GitHub Desktop.
修飾符
<div id="app">
<a
href="https://www.google.com/"
target="_blank"
@click="linkClick"
>
google
</a>
</div>
new Vue({
el:"#app",
data:{
},
methods:{
linkClick(e){
e.preventDefault();
alert("不開新頁面")
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment