UNPKG

jordium-gantt-vue3

Version:

A Vue 3 Gantt chart component for project management, task scheduling, resource planning, calendar, resource usage and timeline visualization.

49 lines (48 loc) 1.87 kB
import { Resource } from '../classes/Resource'; /** * 资源列表列类型枚举 * @version 1.13.5 新增 'title'(职务列) */ export type ResourceListColumnType = 'name' | 'title' | 'type' | 'department' | 'capacity' | 'taskCount'; /** * 资源列格式化函数类型 * @param resource 当前资源对象 * @param column 当前列配置 * @returns 格式化后的字符串 */ export type ResourceColumnFormatter = (resource: Resource, column: ResourceListColumnConfig) => string; /** * 资源列表列配置接口 */ export interface ResourceListColumnConfig { type?: ResourceListColumnType; key: string; label?: string; cssClass?: string; width?: number | string; visible?: boolean; formatter?: ResourceColumnFormatter; /** 列固定位置,'left'/true 固定在左侧,'right' 固定在右侧 */ fixed?: 'left' | 'right' | boolean; } /** * 资源列表配置接口 */ export interface ResourceListConfig { columns?: ResourceListColumnConfig[]; showAllColumns?: boolean; defaultWidth?: number | string; minWidth?: number | string; maxWidth?: number | string; } export declare const DEFAULT_RESOURCE_LIST_WIDTH = 320; export declare const DEFAULT_RESOURCE_LIST_MIN_WIDTH = 280; export declare const DEFAULT_RESOURCE_LIST_MAX_WIDTH = 1160; /** * 默认资源列表列配置 * 注:不包含 name 类型列 —— TaskList 在默认渲染模式下始终将名称列硬编码为独立的 * .col-name.col-fixed(对齐任务视图的 taskName 处理方式),此处列出的均为随其后渲染的动态列。 * key 与 Resource 接口字段名保持一致(type/department/capacity), * 以便 TaskRow 的资源视图兜底渲染(`(task as any)[column.key]`)能直接取到正确的值。 */ export declare const DEFAULT_RESOURCE_LIST_COLUMNS: ResourceListColumnConfig[];