diff --git a/zh-cn/application-dev/reference/apis/js-apis-devicestatus-draginteraction.md b/zh-cn/application-dev/reference/apis/js-apis-devicestatus-draginteraction.md index 6da4b6c36a3d51de99e23f8242a60b1d12eb2818..5d1febb0923f859f0cbed54108c678ea8b2426a9 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-devicestatus-draginteraction.md +++ b/zh-cn/application-dev/reference/apis/js-apis-devicestatus-draginteraction.md @@ -80,7 +80,7 @@ off(type: 'drag', callback?: Callback<DragState>): void; **示例**: -```js +```ts // 取消注册单个回调函数 function single_callback(event : DragState) { console.log(`Drag interaction event: ${JSON.stringify(event)}`); @@ -93,7 +93,7 @@ try { console.log(`Execute failed, error: ${JSON.stringify(error, [`code`, `message`])}`); } ``` -```js +```ts // 取消注册所有回调函数 function all_callback(event : DragState) { console.log(`Drag interaction event: ${JSON.stringify(event)}`);