Rich Text
# rich_text
# Parameters
| Property | Type | Default | Options | Description |
|---|---|---|---|---|
| nodes | Array | [] | -- | Nodes |
| cStyle | String | '' | -- | Style |
# Example Code
<fs-rich-text nodes="{{dNodes}}"/>
// src/testPages/testRichText/index.js
import imgholderconfig from '../../../package/fxui/Imageholder/config'
Page({
/**
* Page initial data
*/
data: {
dNodes:[{
context:"Test",
color:"red",
width:'20',
height:'20',
onClick:function(){
wx.showToast({
title: 'Test text',
})
},
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: 'Test image',
})
},
type:'image'
}]
},
/**
* Lifecycle function--Called when page load
*/
onLoad: function (options) {
},
/**
* Lifecycle function--Called when page is initially rendered
*/
onReady: function () {
},
/**
* Lifecycle function--Called when page is displayed
*/
onShow: function () {
},
/**
* Lifecycle function--Called when page is hidden
*/
onHide: function () {
},
/**
* Lifecycle function--Called when page is unloaded
*/
onUnload: function () {
},
/**
* Page event handler--Called when user pulls down
*/
onPullDownRefresh: function () {
},
/**
* Called when page reaches bottom
*/
onReachBottom: function () {
},
/**
* User clicks share button in top-right
*/
onShareAppMessage: function () {
}
})
{
"usingComponents": {
"fs-rich-text": "../../../package/fxui/rich_text/index"
}
}