import { ComponentType } from 'react' import { StandardProps } from './common' interface TextProps extends StandardProps { /** 文本是否可选 * @default false * @supported weapp, swan, alipay, tt, h5, rn */ selectable?: boolean /** 文本是否可选,该属性会使文本节点显示为 inline-block * @default false * @supported weapp */ userSelect?: boolean /** 显示连续空格 * @supported weapp, swan, tt */ space?: keyof TextProps.TSpace /** 是否解码 * @default false * @supported weapp, tt */ decode?: boolean } declare namespace TextProps { /** space 的合法值 */ interface TSpace { /** 中文字符空格一半大小 */ ensp /** 中文字符空格大小 */ emsp /** 根据字体设置的空格大小 */ nbsp } } /** 文本 * @classification base * @supported weapp, swan, alipay, tt, h5, rn * @example_react * ```tsx * export default class PageView extends Component { * state = { * contents: [], * contentsLen: 0 * } * * add = () => { * this.setState(prev => { * const cot = prev.contents.slice() * cot.push({ text: 'hello world' }) * return { * contents: cot, * contentsLen: cot.length * } * }) * } * * remove = () => { * this.setState(prev => { * const cot = prev.contents.slice() * cot.pop() * return { * contents: cot, * contentsLen: cot.length * } * }) * } * * render () { * return ( * * {this.state.contents.map((item, index) => ( * {item.text} * ))} * * * * ) * } * } * ``` * @example_vue * ``` html * * * * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/component/text.html */ declare const Text: ComponentType export { Text, TextProps }