Skip to main content

KPluginPrivateModelLibrary

kds-plugin-document / Exports / KPluginPrivateModelLibrary

Interface: KPluginPrivateModelLibrary

Table of contents​

Methods​

Methods​

addModelByGroupInstance​

▸ addModelByGroupInstance(modelName, kGroupInstance, previewImg?): HostPromise<{ errorInfo?: KErrorInfo ; isSuccess: boolean }>

添加groupInstance为模型

add groupInstance as the model. After creating the model, make sure to refresh the list promptly to see the latest data. The limit for adding models is 200

Parameters​

NameType
modelNamestring
kGroupInstanceKGroupInstance
previewImg?string

Returns​

HostPromise<{ errorInfo?: KErrorInfo ; isSuccess: boolean }>

Defined in​

api.d.ts:4633


addModelByProject​

▸ addModelByProject(): HostPromise<{ errorInfo?: KErrorInfo ; isSuccess: boolean }>

添加当前方案为模型

add project as the model. After creating the model, make sure to refresh the list promptly to see the latest data. The limit for adding models is 200

Returns​

HostPromise<{ errorInfo?: KErrorInfo ; isSuccess: boolean }>

Defined in​

api.d.ts:4642


getModelList​

▸ getModelList(start, num): HostPromise<{ errorInfo?: KErrorInfo ; modelList: KPluginModelInfo[] ; totalCount: number }>

获取模型列表

Get list of model library.

Parameters​

NameType
startnumber
numnumber

Returns​

HostPromise<{ errorInfo?: KErrorInfo ; modelList: KPluginModelInfo[] ; totalCount: number }>

Defined in​

api.d.ts:4649


removeModel​

▸ removeModel(projectId): HostPromise<{ errorInfo?: KErrorInfo ; isSuccess: boolean }>

模型删除

remove model.

Parameters​

NameType
projectIdstring

Returns​

HostPromise<{ errorInfo?: KErrorInfo ; isSuccess: boolean }>

Defined in​

api.d.ts:4663


renameModel​

▸ renameModel(projectId, name): HostPromise<{ errorInfo?: KErrorInfo ; isSuccess: boolean }>

模型重命名

rename model.

Parameters​

NameType
projectIdstring
namestring

Returns​

HostPromise<{ errorInfo?: KErrorInfo ; isSuccess: boolean }>

Defined in​

api.d.ts:4656