Demo 在线地址:
https://sx00xs.github.io/test/39/index.html
---------------------------------------------------------------
ide: vscode
文件格式:.vue
解析:(待补)
<template> <pre v-pre> <script type="text/javascript"> <span>//※oncontextmenu</span> document.oncontextmenu = function () { return false } </script> </pre> </template> <script> export default { name:'Navs', methods:{ handleContextmenu(event){ event.preventDefault() } }, mounted(){ document.addEventListener('contextmenu',this.handleContextmenu) } } </script>