使用原生小程序自定义组件进行混合开发,大家可以在 Ray 组件中直接使用小程序的自定义组件。包括支持原生 UI 组件库,如:miniapp-components-plus, weui等等。
示例代码
以智能小程序的扩展组件库 miniapp-components-plus
为例:
import * as React from 'react';
import { View } from '@ray-js/ray';
import Cells from '@tuya-miniapp/miniapp-components-plus/cells';
import Cell from '@tuya-miniapp/miniapp-components-plus/cell';
export default () => (
<View>
<Cells title="带说明的列表项">
<Cell value="标题文字" footer="说明文字"></Cell>
<Cell>
<View>标题文字(使用slot)</View>
<View slot="footer">说明文字</View>
</Cell>
</Cells>
</View>
);