1.ich-text
富文本標(biāo)簽
1.可以將字符串解析成 對應(yīng)標(biāo)簽,類似 vue中 v--html 功能
image.png
2.對象數(shù)組
Page({
data: {
//對象數(shù)組
html:[{
//1.什么標(biāo)簽
name:"div",
//2.屬性
attrs:{
class:'my_div',
style:'color:red;'
},
children:[
{
name:'p',
attrs:{},
children:[{
type:"text",
text:"hello"
}]
}
]
}
]
}
})
其中那個type 和text 不要改變骂因,雖然不是很懂為啥