diff --git a/README.md b/README.md index 7cc774b..3e5bac1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ### 简介 基于`vue3.x`开发的精简版甘特图,支持重叠日程展示,支持导出`gantt img`和`gantt Excel`文件。 -> 如果您在使用过程中遇到任何相关问题,欢迎您提 issues, 希望能与各位共同进步!😊 +> 如果您在使用过程中遇到任何相关问题,欢迎您提 issues😊 [Demo在线预览](https://blog.ddamy.com/assets/demo/gantt/) diff --git a/src/components/Gantt.vue b/src/components/Gantt.vue index ea367ef..5358363 100644 --- a/src/components/Gantt.vue +++ b/src/components/Gantt.vue @@ -567,7 +567,10 @@ const exportImg = async (config = {}) => { const exportGanttExcel = (file) => { const excelData = cloneDeep(data.value).map(item => { item.renderWorks = renderWorks(item) - if (props.scheduleTitle) { + if (item.type === 'alike' && props.alikeName) { + item.name = props.alikeName(item) + } + if (item.type === 'normal' && props.scheduleTitle) { item.renderWorks.forEach(renderItem => { renderItem.name = props.scheduleTitle(renderItem) })