First import the PDF library as:
import jsPDF from 'jspdf'
Then simply instantiate the object and give it the contents:
methods: {
createPDF () {
let pdfName="test";
var doc = new jsPDF();
doc.text("Hello World", 10, 10);
doc.save(pdfName + '.pdf');
}
}
Make sure to read the documentation for more