🥰 需求描述 | Feature Description
const componentProps: MarkdownProps['componentProps'] = useMemo(() => {
return {
highlight: {
bodyRender(props) {
const { language, content } = props
console.log(content)
switch (language) {
case 'echarts':
return (
<ErrorBoundary fallbackRender={() => <div className="text-red-500 text-sm px-4 py-10">Unable to display chart</div>}>
<MarkdownEcharts content={content} />
</ErrorBoundary>
)
default:
return props.originalNode
}
},
},
}
}, [])
需要一个标识来表示当前tag是否已经完全输出
🧐 解决方案 | Proposed Solution
const componentProps: MarkdownProps['componentProps'] = useMemo(() => {
return {
highlight: {
bodyRender(props) {
const { language, content, finished } = props
console.log(content)
switch (language) {
case 'echarts':
return (
<ErrorBoundary fallbackRender={() => <div className="text-red-500 text-sm px-4 py-10">Unable to display chart</div>}>
<MarkdownEcharts content={content} finished={finished} />
</ErrorBoundary>
)
default:
return props.originalNode
}
},
},
}
}, [])
📝 补充信息 | Additional Information
No response
🥰 需求描述 | Feature Description
需要一个标识来表示当前tag是否已经完全输出
🧐 解决方案 | Proposed Solution
📝 补充信息 | Additional Information
No response