0.1.1 • Published 12 months ago

@lx-react-materiel/mp-rich-text-parse v0.1.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
12 months ago

mp-rich-text-parse

单选框

该组件只能在 Taro3 中使用

代码示例

import MpRichTextParse from '@lx-react-materiel/mp-rich-text-parse';

const Demo = () => {
  const description: `
  [{"type":"text","text":"<p>回顾测试</p>","id":1681957769648},
  {"type":"img","id":1681957849155,"key":"","image":"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"},
  {"type":"video","videoUniqueId":"1681957854846测试视频.mp4","uploadStatus":"success","id":1681957854912,"text":"","url":"https://test-images-cdn.lxusercontent.com/aftersale_market/good_description/video/2023-04-20/AyrJPULQM2ymWpq8zLaw55.mp4"}]
  `

  
  return (
    <MpRichTextParse description={description} />
  )
};

API

Props

参数说明类型默认值必填
description配置选项Array<{ type: string; text?: string; id: string; image?: string; videoUniqueId?: string; url?: string }>--
0.1.1

12 months ago