You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
554 B
41 lines
554 B
# 重写方法
|
|
|
|
## 使用方式
|
|
|
|
```javascript
|
|
import Editor from "@hufe921/canvas-editor"
|
|
|
|
const instance = new Editor(container, <IElement[]>data, options)
|
|
instance.override.overrideFunction = ()=>{}
|
|
```
|
|
|
|
## paste
|
|
|
|
功能:重写粘贴方法
|
|
|
|
用法:
|
|
|
|
```javascript
|
|
instance.override.paste = (evt?: ClipboardEvent) => void
|
|
```
|
|
|
|
## copy
|
|
|
|
功能:重写复制方法
|
|
|
|
用法:
|
|
|
|
```javascript
|
|
instance.override.copy = () => void
|
|
```
|
|
|
|
## drop
|
|
|
|
功能:重写拖放方法
|
|
|
|
用法:
|
|
|
|
```javascript
|
|
instance.override.drop = (evt: DragEvent) => void
|
|
```
|