****第164行被注释的就是base64的方式,你可以试一下。
var data = {
yy: "John",
mm: "Doe",
jj: "0652455478",
image:'./static/logo.png',
imgList:[
{img:'./static/1.jpg'},
{img:'./static/2.jpg'},
{img:'./static/3.jpg'},
{img:'./static/4.jpg'},
{img:'./static/5.jpg'},
{img:'./static/6.jpg'},
{img:'./static/7.jpg'},
{img:'./static/8.jpg'},
{img:'./static/9.jpg'},
{img:'./static/10.jpg'}
],
// image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QIJBywfp3IOswAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAkUlEQVQY052PMQqDQBREZ1f/d1kUm3SxkeAF/FdIjpOcw2vpKcRWCwsRPMFPsaIQSIoMr5pXDGNUFd9j8TOn7kRW71fvO5HTq6qqtnWtzh20IqE3YXtL0zyKwAROQLQ5l/c9gHjfKK6wMZjADE6s49Dver4/smEAc2CuqgwAYI5jU9NcxhHEy60sni986H9+vwG1yDHfK1jitgAAAABJRU5ErkJggg==",
ex: `Docxtemplater is a library that lets you create docx, pptx or xlsx files from inside your application with tags. It supports charts, images, HTML, and has a large customer base and positive reviews.`,
}
console.log('data: ',data);
console.log('templateFile: ',templateFile);
2 个回复
beyonder
****第164行被注释的就是base64的方式,你可以试一下。
梁SIR
data:image/png;base64,导不出word带有图片