<span @contextmenu.prevent.stop="showCreat($event)" >右键点击</span>
data(){
mouseCreatStyle:"",//右键新建的样式
},
methods: {
showCreat(event){
this.mouseCreatStyle=`position:absolute;top:${event.target.offsetTop+15}px;left:${event.x-10}px;`;
},
}