未验证 提交 b2d30a89 编写于 作者: O openharmony_ci 提交者: Gitee

!16300 【docs】修改子类型 id name label的含义赋值

Merge pull request !16300 from cy7717/master
......@@ -21,7 +21,7 @@ import InputMethodSubtype from '@ohos.InputMethodSubtype';
| 名称 | 类型 | 可读 | 可写 | 必选 | 说明 |
| -------- | -------- | -------- | -------- | -------- | -------- |
| label | string | 是 | 否 | 否 | 输入法子类型的标签。 |
| name | string | 是 | 否 | 是 | 输入法子类型的名字。 |
| name | string | 是 | 否 | 是 | 输入法应用的包名。 |
| id | string | 是 | 否 | 是 | 输入法子类型的id。 |
| mode | string | 是 | 否 | 否 | 输入法子类型的模式,包括upper(大写)和lower(小写)。 |
| locale | string | 是 | 否 | 是 | 输入法子类型的方言版本。 |
......
......@@ -256,9 +256,9 @@ switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallb
```js
try {
inputMethod.switchCurrentInputMethodSubtype({
id: "com.example.kikakeyboard",
label: "ServiceExtAbility",
name: "",
id: "ServiceExtAbility",
label: "",
name: "com.example.kikakeyboard",
mode: "upper",
locale: "",
language: "",
......@@ -317,9 +317,9 @@ switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise<boolean&
```js
try {
inputMethod.switchCurrentInputMethodSubtype({
id: "com.example.kikakeyboard",
label: "ServiceExtAbility",
name: "",
id: "ServiceExtAbility",
label: "",
name: "com.example.kikakeyboard",
mode: "upper",
locale: "",
language: "",
......@@ -391,25 +391,9 @@ switchCurrentInputMethodAndSubtype(inputMethodProperty: InputMethodProperty, inp
```js
let im = inputMethod.getCurrentInputMethod();
let inputMethodProperty = {
packageName: im.packageName,
methodId: im.methodId,
name: im.packageName,
id: im.methodId,
extra: {}
}
let imSubType = inputMethod.getCurrentInputMethodSubtype();
try {
inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, {
id: "com.example.kikakeyboard",
label: "ServiceExtAbility",
name: "",
mode: "upper",
locale: "",
language: "",
icon: "",
iconId: 0,
extra: {}
}, (err,result) => {
inputMethod.switchCurrentInputMethodAndSubtype(im, imSubType, (err,result) => {
if (err !== undefined) {
console.error('Failed to switchCurrentInputMethodAndSubtype: ' + JSON.stringify(err));
return;
......@@ -461,25 +445,9 @@ switchCurrentInputMethodAndSubtype(inputMethodProperty: InputMethodProperty, inp
```js
let im = inputMethod.getCurrentInputMethod();
let inputMethodProperty = {
packageName: im.packageName,
methodId: im.methodId,
name: im.packageName,
id: im.methodId,
extra: {}
}
let imSubType = inputMethod.getCurrentInputMethodSubtype();
try {
inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, {
id: im.packageName,
label: im.methodId,
name: "",
mode: "upper",
locale: "",
language: "",
icon: "",
iconId: 0,
extra: {}
}).then((result) => {
inputMethod.switchCurrentInputMethodAndSubtype(im, imSubType).then((result) => {
if (result) {
console.info('Succeeded in switching currentInputMethodAndSubtype.');
} else {
......
# 输入法框架子系统-输入法框架服务ChangeLog
## @ohos.InputMethodSubtype 中输入法子类型中name、label、id属性值变更
从API9开始,变更如上三个属性值
开发者需要根据以下说明对应用进行适配。
**变更影响**
此三个属性的取值发生变化,需要开发者进行适配更新
| 名称 | 变更前 | 变更后 |
| -------- | -------- | -------- |
| label | (1)取值:输入法子类型的id。| (1)取值:输入法子类型的标签。|
| name | (1)说明:输入法子类型的名字;(2)取值:输入法子类型的标签。| (1)说明:输入法应用的包名;(2)取值:输入法应用的包名。|
| id | (1)取值:输入法应用的包名。| (1)取值:输入法子类型的id。|
**适配指导**
请按上述取值变更结果适配更新。
# 输入法框架子系统-输入法框架服务ChangeLog
## @ohos.InputMethodSubtype 中输入法子类型中name、label、id属性值变更
从API9开始,变更如上三个属性值
开发者需要根据以下说明对应用进行适配。
**变更影响**
此三个属性的取值发生变化,需要开发者进行适配更新
| 名称 | 变更前 | 变更后 |
| -------- | -------- | -------- |
| label | (1)取值:输入法子类型的id。| (1)取值:输入法子类型的标签。|
| name | (1)说明:输入法子类型的名字;(2)取值:输入法子类型的标签。| (1)说明:输入法应用的包名;(2)取值:输入法应用的包名。|
| id | (1)取值:输入法应用的包名。| (1)取值:输入法子类型的id。|
**适配指导**
请按上述取值变更结果适配更新。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册