Coding

Vue Image Right Click Link and Left Click Use onClick Event

CodeEshop
Feb 19, 2022

Finding a quick fix solution for a problem of right click requiring to Open Link and Left Click using the Vue @click event.
Then you are in right place and will get a solution here so lets begin.

  • Add the HTML For Image and use anchor tag (a) for click event and URL
  • Add the oncontextmenu event to add URL in your right click event and removing after using it using setTimeout
  • Working demo can be seen from below link.
  • It’s a quick fix solution if you want more robust solution then you can search for libraries if you want more of Vue approach.
  • Full Source code Link Below

Thanks

--

--

CodeEshop
CodeEshop

Written by CodeEshop

CodeEshop is Add-on for your need and helps enterprises to grow easily with a large range of ready to use and highly customisable eCommerce products.

No responses yet