Skip to content

Commit

Permalink
导出excel优化导出内容
Browse files Browse the repository at this point in the history
  • Loading branch information
ddmy committed Jun 27, 2022
1 parent e08a003 commit 775503d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### 简介
基于`vue3.x`开发的精简版甘特图,支持重叠日程展示,支持导出`gantt img``gantt Excel`文件。

> 如果您在使用过程中遇到任何相关问题,欢迎您提 issues, 希望能与各位共同进步!😊
> 如果您在使用过程中遇到任何相关问题,欢迎您提 issues😊
[Demo在线预览](https://blog.ddamy.com/assets/demo/gantt/)

Expand Down
5 changes: 4 additions & 1 deletion src/components/Gantt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down

0 comments on commit 775503d

Please sign in to comment.