1 Star 1 Fork 0

TH / v-gantt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

v-gantt

Build Status NPM Download NPM Version NPM License PRs Welcome Automated Release Notes by gren

image.png

Table of Contents

Introduction

甘特图组件。基于 vue + element-ui,打造 web 版 omniplan。

⬆ Back to Top

Feature

  1. 折叠、展开树节点
  2. 支持树 header slot
  3. 整体拖拽甘特图节点
  4. 拖拽甘特图节点右侧,可以更改持续时间
  5. 点击【今天】按钮,快速跳转到今天列
  6. 点击【天】按钮,可切换至【周】、【月】视图(可配置默认视图)
  7. 月视图下 hover 滑块可显示节点日期
  8. 点击树节点,跳转到该甘特图节点
  9. 点击里程碑线 🧵,跳转到里程碑行
  10. 通过公共 api 获取中国节假日信息

⬆ Back to Top

Quick Start

v-gantt 依赖了 el-buttonel-selectel-progressel-tree 组件。请在全局环境使用 Vue.component or Vue.use(Element) 注册 element 组件

yarn add @femessage/v-gantt @femessage/element-ui
<template>
  <v-gantt style="height: 400px;" :data.sync="data" />
</template>

<script>
  export default {
    data() {
      const y = new Date().getFullYear()
      const m = `${new Date().getMonth() + 1}`.padStart(2, 0)
      const d = (date) => `${y}-${m}-${date}`
      return {
        data: [
          {
            id: 'group-1',
            name: '群组-1',
            children: [
              {
                id: 'item-1',
                name: '叶节点-1',
                progress: 30,
                startDate: d('06'),
                endDate: d('07'),
              },
            ],
          },
          {
            id: 'milestone-1',
            name: '里程碑-1',
            date: d('10'),
            done: true,
          },
        ],
      }
    },
  }
</script>

Development

在 vue-styleguide 环境进行功能开发及维护。

yarn dev

Todo

  • 支持拖拽树节点
  • 支持 header-slot,可以在树节点上方放置自定义按钮,如【新增】
  • 支持删除节点
  • 修复更改 rowH 时未改变树节点高度的问题
  • 支持进度修改功能
  • 支持修改里程碑完成状态
  • 修复使用 rollup 打包时,<gantt-group> 组件丢失对 <gantt-layout> 的引用的问题

⬆ Back to Top

Links

⬆ Back to Top

Inspiration

功能实现和 ui 参考了

⬆ Back to Top

Contributing

For those who are interested in contributing to this project, such as:

  • report a bug
  • request new feature
  • fix a bug
  • implement a new feature

Please refer to our contributing guide.

⬆ Back to Top

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

⬆ Back to Top

License

MIT

⬆ Back to Top

MIT License Copyright (c) 2020 FEMessage Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/jiiath/v-gantt.git
git@gitee.com:jiiath/v-gantt.git
jiiath
v-gantt
v-gantt
master

搜索帮助