wxml-to-canvas的wxss样式怎么动态加载数据呀?
参考这个帖子https://www.cnblogs.com/Hhhighway/p/13929152.html?ivk_sa=1024320u#_label2写了写,但一直报错
wxml的部分倒是没问题了,不知道style部分怎么动态加载数据
const style =(width, height)=> {
return `
{
"container": {
"width":`+width+`,
"height":`+height+`,
"flexDirection":"column",
"justifyContent": "space-around",
"alignItems": "center"
},
"text": {
"width":`+width+`,
"height":37,
"fontSize":20,
"marginTop":10
}
`
}
const secondStyle = JSON.parse(style(370, 600))