Interface ToolCollectionInstance
Methods
addOrSetSubItem
- addOrSetSubItem(opt: { baseTool: "shapeSelect" | "multiInOne"; insertAfterTool?: string; position?: IPosition; subItem: IUnitOption }): void
-
Parameters
-
opt: { baseTool: "shapeSelect" | "multiInOne"; insertAfterTool?: string; position?: IPosition; subItem: IUnitOption }
-
baseTool: "shapeSelect" | "multiInOne"
-
Optional insertAfterTool?: string
-
Optional position?: IPosition
-
Returns void
addOrSetTool
-
Parameters
-
opt: { insertAfterTool?: string; item: IUnitOption; position: IPosition }
-
Optional insertAfterTool?: string
-
-
Returns void
deleteDoc
- deleteDoc(docId: string): void
off
- off(event: "docAdd" | "docDelete" | "iconClick" | "compVisibilityUpdate", callback: (...args: any[]) => void): void
-
Parameters
-
event: "docAdd" | "docDelete" | "iconClick" | "compVisibilityUpdate"
-
callback: (...args: any[]) => void
Returns void
on
- on(event: "docAdd", callback: (newDocs: (IDocEntity | IMediaEntity)[], allDocs: IResourceEntity[]) => void): void
- on(event: "docDelete", callback: (docList: IDocEntity[], allDocs: IResourceEntity[]) => void): void
- on(event: "iconClick", callback: (toolName: string) => void): void
- on(event: "iconClick", callback: (toolName: string, opt: { newState: string; state: string }) => void): void
- on(event: "compVisibilityUpdate", callback: (componentName: "previewSlider" | "uploadCenter", open: boolean) => void): void
-
Parameters
Returns void
-
Parameters
Returns void
-
Parameters
-
event: "iconClick"
-
callback: (toolName: string) => void
Returns void
-
Parameters
-
event: "iconClick"
-
callback: (toolName: string, opt: { newState: string; state: string }) => void
-
- (toolName: string, opt: { newState: string; state: string }): void
-
Parameters
-
toolName: string
-
opt: { newState: string; state: string }
-
newState: string
-
state: string
Returns void
Returns void
-
Parameters
-
event: "compVisibilityUpdate"
-
callback: (componentName: "previewSlider" | "uploadCenter", open: boolean) => void
-
- (componentName: "previewSlider" | "uploadCenter", open: boolean): void
-
Parameters
-
componentName: "previewSlider" | "uploadCenter"
-
open: boolean
Returns void
Returns void
removeSubItem
- removeSubItem(opt: { baseTool: "shapeSelect" | "multiInOne"; position?: IPosition; subItemName: string }): void
-
Parameters
-
opt: { baseTool: "shapeSelect" | "multiInOne"; position?: IPosition; subItemName: string }
-
baseTool: "shapeSelect" | "multiInOne"
-
Optional position?: IPosition
-
subItemName: string
Returns void
removeTool
- removeTool(opt: { name: string; position?: IPosition }): void
setCompVisibility
- setCompVisibility(componentName: "previewSlider" | "uploadCenter", open: boolean): void
-
Parameters
-
componentName: "previewSlider" | "uploadCenter"
-
open: boolean
Returns void
setVisibility
- setVisibility(opt: {}): void
-
Parameters
-
opt: {}
-
[position: string]: { exclude?: string[]; visible: boolean }
-
Optional exclude?: string[]
-
visible: boolean
Returns void
添加一个转码文件至文档弹窗中。
如果新添加的docId已存在,则它会覆盖已有转码文件内容