Home > LIB_Classification > deleteByUuid
LIB_Classification.deleteByUuid() method
此 API 当前处于 BETA 预览状态,希望得到开发者的反馈。它的任何功能都可能在接下来的开发进程中被修改,请不要将它用于任何正式环境。
警告:此 API 现已弃用。
since EDA v3.2; dropped EDA v3.3
删除指定 UUID 的分类
签名
typescript
function deleteByUuid(libraryUuid: string, classificationUuid: string): Promise<boolean>;1
参数名
参数 | 类型 | 描述 |
|---|---|---|
libraryUuid | string | 库 UUID |
classificationUuid | string |
返回值
Promise<boolean>
操作是否成功
示例
javascript
// 1. 获取个人库 UUID
const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
// 2. 创建一个测试分类作为删除对象(复用模块库,ELIB_LibraryType.CBB = '1')
const name = `嘉立创示例_待删除UUID分类_${Date.now()}`;
const index = await eda.lib_Classification.createPrimary(libraryUuid, '1', name);
// 3. 按分类 UUID 删除
const deleted = await eda.lib_Classification.deleteByUuid(
libraryUuid,
index.primaryClassificationUuid
);
// 删除类保留现场(分类已不存在,库面板中可确认)
console.log('name:', name);
console.log('deleted:', deleted);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17