How to combine with screenshot plug-in phantomjs in vue project?

because the project needs screenshots, but. Phantomjs is a command line tool, so I want to ask vue how to combine with phantomjs to take screenshots.
for example, the screenshot code is written in a.vue. How should I take a screenshot

May.07,2021

Phantomjs should run on the server side and give an address x to trigger the corresponding function of your server side (all the logic to be executed is written here). And make sure you have another routing address y to access to get the interface you want to take screenshots ( or also needs server rendering).
so you should request the address x in a.vue to execute the server program.

with all due respect. If you just want a simple front-end screenshot
you'd better try html2canvas


the screenshot function should be a service, which doesn't have much to do with the static project of vue

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b384e4-2c0e4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b384e4-2c0e4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?