1
import * as React from 'react';
2 4
import { createHostComponent } from '@remax/runtime';
3
import { BaseProps } from '../../types/component';
4

5
export interface RichTextProps extends BaseProps {
6
  /** 节点列表/HTML String 1.4.0 */
7
  nodes?: any[] | string;
8
  /** 显示连续空格 2.4.1 */
9
  space?: 'ensp' | 'emsp' | 'nbsp';
10
}
11

12
/**
13
 * https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html
14
 */
15 4
export const RichText: React.ComponentType<RichTextProps> = createHostComponent<RichTextProps>('rich-text');
16

17 4
RichText.defaultProps = {
18
  nodes: [],
19
};

Read our documentation on viewing source code .

Loading