未验证 提交 833f9374 编写于 作者: 刘嘉伟 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-nfcController.md.

Signed-off-by: Nliujiawei <liujiawei11@huawei.com>
上级 fd227600
......@@ -74,7 +74,7 @@ isNfcOpen(): boolean
## controller.getNfcState
getNfcState(): boolean
getNfcState(): NfcState
查询NFC是否打开。
......@@ -83,8 +83,8 @@ getNfcState(): boolean
**返回值:**
| **类型** | **说明** |
| -------- | ----------------------------------- |
| boolean | true:NFC打开,&nbsp;false:NFC关闭。 |
| -------- | ---------------------- |
| NfcState | 详细请见NfcState枚举值 |
## controller.on('nfcStateChange')
......@@ -94,7 +94,7 @@ on(type: "nfcStateChange", callback: Callback&lt;NfcState&gt;): void
**系统能力**:SystemCapability.Communication.NFC
**参数**
- **参数**
| **参数名** | **类型** | **必填** | **说明** |
| -------- | -------- | -------- | -------- |
......@@ -111,16 +111,15 @@ off(type: "nfcStateChange", callback?: Callback&lt;NfcState&gt;): void
**系统能力**:SystemCapability.Communication.NFC
**参数**
- **参数**
| **参数名** | **类型** | **必填** | **说明** |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 固定填"nfcStateChange"字符串 |
| callback | Callback&lt;NfcState&gt; | 否 | 状态改变回调函数。如果callback不填,将“去注册”该事件关联的所有回调函数。 |
**示例**
```js
- 示例
```
import nfcController from '@ohos.nfcController';
var NFC_STATE_NOTIFY = "nfcStateChange";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册