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 
 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 
 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