提交 3ae61843 编写于 作者: Y yaoyuchi

修改检视意见

Signed-off-by: Nyaoyuchi <yaoyuchi@huawei.com>
上级 f3252a8a
...@@ -144,11 +144,11 @@ clearData(key?: string): boolean ...@@ -144,11 +144,11 @@ clearData(key?: string): boolean
- 示例: - 示例:
```js ```js
dragEnd(e){ dragEnd(e){
var isSuccess = e.dataTransfer.clearData('name'); var isSuccess = e.dataTransfer.clearData('name');
} }
``` ```
### getData ### getData
...@@ -169,7 +169,7 @@ clearData(key?: string): boolean ...@@ -169,7 +169,7 @@ clearData(key?: string): boolean
- 示例: - 示例:
```js ```js
dragStart(e){ dragStart(e){
var person = new Object(); var person = new Object();
person.name = "list"; person.name = "list";
...@@ -179,7 +179,7 @@ clearData(key?: string): boolean ...@@ -179,7 +179,7 @@ clearData(key?: string): boolean
dragEnd(e){ dragEnd(e){
var result = e.dataTransfer.getData('person'); var result = e.dataTransfer.getData('person');
}, },
``` ```
### setData ### setData
...@@ -201,7 +201,7 @@ setData(key: string, value: object): boolean ...@@ -201,7 +201,7 @@ setData(key: string, value: object): boolean
- 示例: - 示例:
``` ```
//setData 可以是基本数据类型,也可以是对象类型 //setData 可以是基本数据类型,也可以是对象类型
dragStart(e){ dragStart(e){
var isSetOk = e.dataTransfer.setData('name', 1); var isSetOk = e.dataTransfer.setData('name', 1);
...@@ -213,7 +213,7 @@ setData(key: string, value: object): boolean ...@@ -213,7 +213,7 @@ setData(key: string, value: object): boolean
person.age = 21; person.age = 21;
var isSetOk = e.dataTransfer.setData('person', person); var isSetOk = e.dataTransfer.setData('person', person);
} }
``` ```
### setDragImage ### setDragImage
...@@ -236,7 +236,7 @@ setDragImage(pixelmap: Pixelmap, offsetX: number,offsetY: number): boolean ...@@ -236,7 +236,7 @@ setDragImage(pixelmap: Pixelmap, offsetX: number,offsetY: number): boolean
- 示例: - 示例:
```js ```js
CreatePixelMap(){ CreatePixelMap(){
let color=new ArrayBuffer(4*96*96); let color=new ArrayBuffer(4*96*96);
var buffer=new Uint8Array(color); var buffer=new Uint8Array(color);
...@@ -260,4 +260,4 @@ setDragImage(pixelmap: Pixelmap, offsetX: number,offsetY: number): boolean ...@@ -260,4 +260,4 @@ setDragImage(pixelmap: Pixelmap, offsetX: number,offsetY: number): boolean
dragStart(e){ dragStart(e){
e.dataTransfer.setDragImage(this.pixelMapReader, 50, 50); e.dataTransfer.setDragImage(this.pixelMapReader, 50, 50);
}, },
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册