切换主题
yarn add node-html-to-image
nodeHtmlToImage({ output: './image_.png', html: '<html><body>Hello world!</body></html>' }) .then((dataUrl) => { console.log("Image saved!"); }) .catch((error) => { console.error("Error:", error); });