预编辑区
预编辑区指工具栏上方区域,用于显示当前输入的信息,如当前输入的字母等。
注意:启用「内嵌输入模式」后,预编辑区将不再显示。
预编辑区配置属性
Section titled “预编辑区配置属性”| 参数 | 类型 | 必选 | 说明 |
|---|---|---|---|
preeditHeight | Float 或 String | 否 | 预编辑区高度。支持 point 值或 vh 百分比写法,参见高度参数。 |
preeditStyle | Object | 否 | 预编辑区样式节点。 |
preeditStyle 支持以下属性:
| 参数 | 类型 | 必选 | 说明 |
|---|---|---|---|
insets | Insets | 否 | 预编辑区内边距。 |
backgroundStyle | String | 否 | 引用背景样式节点。 |
foregroundStyle | String 或 String[] | 否 | 引用前景样式节点。通常用于显示 $rimePreedit。 |
配置示例:
preeditHeight: '25'preeditStyle: insets: top: 5 left: 10 bottom: 5 right: 10 backgroundStyle: preeditBackgroundStyle foregroundStyle: preeditForegroundStyle
preeditForegroundStyle: buttonStyleType: text text: $rimePreedit fontSize: 16 normalColor: '#333333'