类: FHooks
方法
onBeforeCopy()
onBeforeCopy(callback): IDisposable;The onBeforeCopy event is fired before a copy operation is performed.
参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | () => void | Callback function that will be called when the event is fired | 
返回
IDisposable
A disposable object that can be used to unsubscribe from the event
已被弃用
use univerAPI.addEvent(univerAPI.Event.BeforeClipboardChange, (params) => {}) instead
onBeforePaste()
onBeforePaste(callback): IDisposable;The onBeforePaste event is fired before a paste operation is performed.
参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | () => void | Callback function that will be called when the event is fired | 
返回
IDisposable
A disposable object that can be used to unsubscribe from the event
已被弃用
use univerAPI.addEvent(univerAPI.Event.BeforeClipboardPaste, (params) => {}) instead
onBeforeRedo()
onBeforeRedo(callback): IDisposable;参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | ( action) =>void | 
返回
IDisposable
已被弃用
use univerAPI.addEvent(univerAPI.Event.BeforeRedo, (event) => {}) as instead
onBeforeUndo()
onBeforeUndo(callback): IDisposable;参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | ( action) =>void | 
返回
IDisposable
已被弃用
use univerAPI.addEvent(univerAPI.Event.BeforeUndo, (event) => {}) as instead
onCopy()
onCopy(callback): IDisposable;The onCopy event is fired after a copy operation is performed.
参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | () => void | Callback function that will be called when the event is fired | 
返回
IDisposable
A disposable object that can be used to unsubscribe from the event
已被弃用
use univerAPI.addEvent(univerAPI.Event.ClipboardChanged, (params) => {}) instead
onPaste()
onPaste(callback): IDisposable;The onPaste event is fired after a paste operation is performed.
参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | () => void | Callback function that will be called when the event is fired | 
返回
IDisposable
A disposable object that can be used to unsubscribe from the event
已被弃用
use univerAPI.addEvent(univerAPI.Event.ClipboardPasted, (params) => {}) instead
onReady()
onReady(callback): IDisposable;参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | () => void | 
返回
IDisposable
已被弃用
use univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {}) as instead
onRedo()
onRedo(callback): IDisposable;参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | ( action) =>void | 
返回
IDisposable
已被弃用
use univerAPI.addEvent(univerAPI.Event.Redo, (event) => {}) as instead
onRendered()
onRendered(callback): IDisposable;参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | () => void | 
返回
IDisposable
已被弃用
use univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {}) as instead
onStarting()
onStarting(callback): IDisposable;参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | () => void | 
返回
IDisposable
已被弃用
use univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {}) as instead
onSteady()
onSteady(callback): IDisposable;参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | () => void | 
返回
IDisposable
已被弃用
use univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {}) as instead
onUndo()
onUndo(callback): IDisposable;参数
| 参数 | 类型 | 描述 | 
|---|---|---|
| callback | ( action) =>void | 
返回
IDisposable
已被弃用
use univerAPI.addEvent(univerAPI.Event.Undo, (event) => {}) as instead