Skip to content

预编辑区

预编辑区指工具栏上方区域,用于显示当前输入的信息,如当前输入的字母等。

注意:启用「内嵌输入模式」后,预编辑区将不再显示。

参数类型必选说明
preeditHeightFloat 或 String预编辑区高度。支持 point 值或 vh 百分比写法,参见高度参数
preeditStyleObject预编辑区样式节点。

preeditStyle 支持以下属性:

参数类型必选说明
insetsInsets预编辑区内边距。
backgroundStyleString引用背景样式节点。
foregroundStyleString 或 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'