组件注意事项
<p>rich-text 富文本</p>
<table>
<thead>
<tr>
<th>属性名</th>
<th>类型</th>
<th>默认值</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>nodes</td>
<td>Array / String</td>
<td>[]</td>
<td>节点列表 / HTML String</td>
</tr>
</tbody>
</table>
<p>注意:</p>
<ul>
<li>app-nvue 平台 nodes 属性只支持使用 Array 类型</li>
<li>支付宝小程序 nodes 属性只支持使用 Array 类型。</li>
<li>nodes 不推荐使用 String 类型,性能会有所下降。</li>
<li>rich-text 组件内屏蔽所有节点的事件。</li>
<li>attrs 属性不支持 id ,支持 class 。</li>
<li>img 标签仅支持网络图片。</li>
</ul>
<pre><code>data() {
return {
title: 'rich-text',
nodes:[
{
name : 'div',
attrs:{
class:'richTextClass',
style:'line-height:60px;text-align:center'
},
children:[
{
type:'text',
text: 'Hello&nbsp;uni-app!'
}
]
}
]
}
},</code></pre>