简体中文
fs-rich-text
约 115 字小于 1 分钟
2025-04-28
用于展示由节点数组描述的富文本内容。
参数
| 属性 | 类型 | 默认值 | 可选值 | 说明 |
|---|---|---|---|---|
| nodes | Array | [] | -- | 节点 |
| cStyle | String | '' | -- | 样式 |
示例代码
<fs-rich-text nodes="{{dNodes}}" />import imgholderconfig from '../../../package/fxui/Imageholder/config'
Page({
data: {
dNodes: [
{
context:"测试",
color:"red",
width:'20',
height:'20',
onClick:function(){
wx.showToast({
title: '测试文字',
})
},
fontWeight:'bold',
textDecoration:'',
fontSize:'20',
type:'string'
},
{
context:imgholderconfig.nodata.image,
placeholder:"https://a9.fspage.com/FSR/weex/avatar/object_list/images/list_default_icon.png",
width:'50',
height:'50',
onClick:function(){
wx.showToast({
title: '测试图片',
})
},
type:'image'
}
]
}
}){
"usingComponents": {
"fs-rich-text": "../../../package/fxui/rich_text/index"
}
}