import React from 'react' // 行内元素特殊标记: 粗体/代码块/斜体/下划线 const Leaf = (props: any) => { let children = props.children const {leaf, attributes} = props if (leaf.bold) { children = {children} } if (leaf.code) { children = {children} } if (leaf.italic) { children = {children} } if (leaf.underline) { children = {children} } return {children} } export default Leaf