Home > LIB_Footprint > delete
LIB_Footprint.delete() method
此 API 当前处于 BETA 预览状态,希望得到开发者的反馈。它的任何功能都可能在接下来的开发进程中被修改,请不要将它用于任何正式环境。
删除封装
签名
typescript
function delete(footprintUuid: string, libraryUuid: string): Promise<boolean>;1
参数名
参数 | 类型 | 描述 |
|---|---|---|
footprintUuid | string | 封装 UUID |
libraryUuid | string | 库 UUID,可以使用 LIB_LibrariesList 内的接口获取 |
返回值
Promise<boolean>
操作是否成功
示例
javascript
// 1. 获取个人库 UUID 并新建删除对象
const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
const footprintUuid = await eda.lib_Footprint.create(
libraryUuid,
`嘉立创示例_待删除封装_${Date.now()}`,
[]
);
// 2. 删除该封装
const deleted = await eda.lib_Footprint.delete(footprintUuid, libraryUuid);
console.log('footprintUuid:', footprintUuid);
console.log('deleted:', deleted);1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13