feat: enhance description component, update property panel with tabs, and refine docs

This commit is contained in:
yuding
2025-12-22 16:41:24 +08:00
parent ed0414c75b
commit e1bb5558ff
19 changed files with 2640 additions and 1856 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

64
dist/index.d.ts vendored
View File

@@ -361,6 +361,51 @@ declare class ConstructTreeManagerBtn extends BimComponent {
setColors(colors: ButtonGroupColors): void;
}
/**
* 描述列表项配置
*/
export declare interface DescriptionItem {
/** 标签文本 (直接显示,组件内部不翻译) */
label: string;
/** 内容文本或元素 */
value: string | HTMLElement;
/** 行级自定义标签颜色 */
labelColor?: string;
/** 行级自定义内容颜色 */
valueColor?: string;
/** 自定义类名 */
className?: string;
}
/**
* 描述列表组件配置
*/
export declare interface DescriptionOptions {
/** 挂载容器 */
container: HTMLElement | string;
/** 数据项列表 */
items: DescriptionItem[];
/**
* 是否显示边框 (默认 false)
* 开启后,将显示行间分割线以及 Key-Value 之间的纵向分割线
*/
bordered?: boolean;
/** 标签固定宽度 (例如 '80px'),若不设置则自适应 */
labelWidth?: string;
/** 全局标签颜色 */
labelColor?: string;
/** 全局内容颜色 */
valueColor?: string;
/** 全局字体大小 */
fontSize?: string;
/** 标签内边距 (默认 '0 4px') */
labelPadding?: string;
/** 内容内边距 (默认 '0 4px') */
valuePadding?: string;
/** 自定义类名 */
className?: string;
}
/**
* 弹窗颜色配置
*/
@@ -608,7 +653,7 @@ export declare interface IBimComponent {
declare type Listener<T = any> = (payload: T) => void;
/**
* 语言码类型
* 语言<EFBFBD><EFBFBD>码类型
*/
declare type LocaleType = 'zh-CN' | 'en-US';
@@ -651,11 +696,28 @@ declare interface OptButton extends ButtonConfig {
children?: OptButton[];
}
/**
* 属性面板管理器
* 负责展示和管理属性面板弹窗 (演示 Tab + Collapse + Description 组件)
*/
declare class PropertyPanelManager extends BimComponent {
private dialogId;
constructor(engine: BimEngine);
init(): void;
/**
* 显示属性面板
*/
show(): void;
/**
* 创建"属性"标签页的内容 (包含 Collapse)
*/
private createPropsTabContent;
/**
* 创建"材质"标签页的内容 (包含 Collapse)
*/
private createMaterialTabContent;
private createBaseInfoContent;
private createAdvancedInfoContent;
private createMaterialContent;
destroy(): void;
}