diff --git a/CHANGELOG.md b/CHANGELOG.md index dabca2d..ec32d03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.6-patch.1] - 2025-12-09 + +### Fixed +- 修复:Github编译错误 +- Fixed: build errors From github + +## [1.4.6] - 2025-12-09 + +### Fixed +- 修复:内置TaskDrawer中负责人列表可以外部初始化 +- 修复:未设置startDate和endDate时,任务无法正确显示的问题 +- Fixed: The assignee list in the built-in TaskDrawer can be initialized externally +- Fixed: The issue where tasks could not be displayed correctly when startDate and endDate were not set + +## [1.4.5] - 2025-12-06 + +### Changed +- 优化:任务列表中任务项的移动拖放功能 +- Optimized:Task item move and drag-and-drop functionality in the task list + +## [1.4.4] - 2025-12-06 + +### Added +- 任务列表中任务项的移动拖放功能 +- Task item move and drag-and-drop functionality in the task list + ## [1.4.3] - 2025-11-28 ### Added diff --git a/README-EN.md b/README-EN.md index be593e2..9b67581 100644 --- a/README-EN.md +++ b/README-EN.md @@ -23,7 +23,8 @@

中文 | - English + English | + Release Notes

A modern Vue 3 Gantt chart component library providing complete solutions for project management and task scheduling

@@ -188,7 +189,9 @@ npm run dev | `useDefaultDrawer` | `boolean` | `true` | Whether to use the built-in task edit drawer (TaskDrawer) | | `useDefaultMilestoneDialog` | `boolean` | `true` | Whether to use the built-in milestone edit dialog (MilestoneDialog) | | `autoSortByStartDate` | `boolean` | `false` | Whether to automatically sort tasks by start date | -| `allowDragAndResize` | `boolean` | `true` | Whether to allow dragging and resizing tasks/milestones | +| `allowDragAndResize` | `boolean` | `true` | Whether to allow dragging and resizing tasks/milestones | +| `enableTaskRowMove` | `boolean` | `false` | Whether to allow dragging and dropping TaskRow | +| `assigneeOptions` | `Array<{ key?: string \| number; value: string \| number; label: string }>` | `[]` | Assignee dropdown options in task edit drawer | #### Configuration Object Props @@ -243,13 +246,14 @@ For complete event documentation, see: | `milestone-deleted` | `{ milestoneId: number }` | Milestone deleted | | `milestone-icon-changed` | `{ milestoneId, icon }` | Milestone icon changed | | `milestone-drag-end` | `(milestone: Task)` | Milestone drag ended | +| `task-row-moved` | `payload: { draggedTask: Task, targetTask: Task, position: 'after' \| 'child', oldParent: Task \| null, newParent: Task \| null }` | TaskRow drag ended (optional) | #### Example 1: Simplest Gantt Chart ```vue @@ -267,6 +271,12 @@ const tasks = ref([ progress: 100, }, ]) + +const assigneeOptions = ref([ + { value: 'alice', label: 'Alice' }, + { value: 'bob', label: 'Bob' }, + { value: 'charlie', label: 'Charlie' }, +]) ``` @@ -275,7 +285,7 @@ const tasks = ref([ ```vue @@ -303,6 +313,12 @@ const milestones = ref([ icon: 'diamond', }, ]) + +const assigneeOptions = ref([ + { value: 'alice', label: 'Alice' }, + { value: 'bob', label: 'Bob' }, + { value: 'charlie', label: 'Charlie' }, +]) ``` @@ -323,6 +339,7 @@ const milestones = ref([ :tasks="tasks" :milestones="milestones" :show-toolbar="false" + :assignee-options="assigneeOptions" @task-added="handleTaskAdded" @milestone-saved="handleMilestoneSaved" /> @@ -338,6 +355,12 @@ import 'jordium-gantt-vue3/dist/assets/jordium-gantt-vue3.css' const tasks = ref([]) const milestones = ref([]) +const assigneeOptions = ref([ + { value: 'alice', label: 'Alice' }, + { value: 'bob', label: 'Bob' }, + { value: 'charlie', label: 'Charlie' }, +]) + const addTask = () => { const newTask = { id: Date.now(), @@ -385,7 +408,8 @@ Tasks are the core elements of the Gantt chart. The component provides complete | `endDate` | `string` | - | - | End date, format: 'YYYY-MM-DD' or 'YYYY-MM-DD HH:mm' | | `progress` | `number` | - | `0` | Task progress, range 0-100 | | `predecessor` | `number[]` | - | - | Array of predecessor task IDs, standard format: `[1, 2, 3]`
**Compatible formats**: Also supports string `'1,2,3'` or string array `['1', '2', '3']`, component will auto-parse | -| `assignee` | `string` | - | - | Task assignee | +| `assignee` | `string` | - | - | Task assignee, used as the value binding for the assignee dropdown menu | +| `assigneeName` | `string` | - | - | Task assignee name, automatically obtained from the label in the bound `assigneeOptions` dataset; for custom display, you can set it in the `task-added` callback event of GanttChart | | `avatar` | `string` | - | - | Avatar URL of task assignee | | `estimatedHours` | `number` | - | - | Estimated hours | | `actualHours` | `number` | - | - | Actual hours | @@ -424,6 +448,8 @@ Tasks are the core elements of the Gantt chart. The component provides complete | `taskBarConfig` | `TaskBarConfig` | `{}` | Task bar style configuration, see [TaskBarConfig Configuration](#taskbarconfig-configuration) | | `taskListConfig` | `TaskListConfig` | `undefined` | Task list configuration, see [TaskListConfig Configuration](#tasklistconfig-configuration) | | `autoSortByStartDate` | `boolean` | `false` | Whether to automatically sort tasks by start date | +| `enableTaskRowMove` | `boolean` | `false` | Whether to alloww dragging and dropping TaskRow | +| `assigneeOptions` | `Array<{ key?: string \| number; value: string \| number; label: string }>` | `[]` | Assignee dropdown options in task edit drawer | **Configuration Notes**: @@ -449,6 +475,7 @@ Tasks are the core elements of the Gantt chart. The component provides complete | `successor-added` | `{ targetTask: Task, newTask: Task }` | After adding successor via context menu | `targetTask` is the original task, `newTask` is the newly created successor task (its predecessor already contains targetTask.id) | | `timer-started` | `(task: Task) => void` | When task timer starts | Start recording task hours | | `timer-stopped` | `(task: Task) => void` | When task timer stops | Stop recording task hours | +| `task-row-moved` | `payload: { draggedTask: Task, targetTask: Task, position: 'after' \| 'child', oldParent: Task \| null, newParent: Task \| null }` | TaskRow drag ended (optional) | Component has automatically completed data movement and TaskList/Timeline sync via object reference mutation. Listening to this event is completely optional, only for showing messages, calling API, etc. `position`: 'after'=same level, 'child'=as child | **Data Synchronization Notes**: @@ -463,6 +490,7 @@ Tasks are the core elements of the Gantt chart. The component provides complete
([ }, ]) +const assigneeOptions = ref([ + { value: 'alice', label: 'Alice' }, + { value: 'bob', label: 'Bob' }, + { value: 'charlie', label: 'Charlie' }, +]) + // Toolbar "Add Task" button click event const handleAddTask = () => { console.log('Preparing to add task...') @@ -552,6 +586,7 @@ Tasks can configure predecessors via the `predecessor` field, and the component