vxe-gantt 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.en.md +72 -0
- package/README.ja-JP.md +72 -0
- package/README.md +82 -2
- package/README.zh-TW.md +73 -0
- package/es/components.js +12 -0
- package/es/gantt/index.js +13 -0
- package/es/gantt/src/emits.js +4 -0
- package/es/gantt/src/gantt-body.js +103 -0
- package/es/gantt/src/gantt-chart.js +77 -0
- package/es/gantt/src/gantt-header.js +70 -0
- package/es/gantt/src/gantt-view.js +768 -0
- package/es/gantt/src/gantt.js +1746 -0
- package/es/gantt/src/grid-emits.js +16 -0
- package/es/gantt/src/grid-props.js +7 -0
- package/es/gantt/src/props.js +2 -0
- package/es/gantt/src/table-emits.js +97 -0
- package/es/gantt/src/table-props.js +298 -0
- package/es/gantt/src/util.js +12 -0
- package/es/gantt/style.css +599 -0
- package/es/gantt/style.min.css +1 -0
- package/es/index.esm.js +3 -0
- package/es/style.css +1 -0
- package/es/style.min.css +1 -0
- package/es/ui/index.js +52 -0
- package/es/ui/src/comp.js +2 -0
- package/es/ui/src/dom.js +169 -0
- package/es/ui/src/log.js +4 -0
- package/es/ui/src/utils.js +41 -0
- package/es/ui/src/vn.js +1 -0
- package/es/ui/style.css +0 -0
- package/es/ui/style.min.css +0 -0
- package/es/vxe-gantt/index.js +3 -0
- package/es/vxe-gantt/style.css +599 -0
- package/es/vxe-gantt/style.min.css +1 -0
- package/es/vxe-ui/index.js +3 -0
- package/es/vxe-ui/style.css +0 -0
- package/es/vxe-ui/style.min.css +0 -0
- package/helper/vetur/attributes.json +1 -0
- package/helper/vetur/tags.json +1 -0
- package/lib/components.js +42 -0
- package/lib/components.min.js +1 -0
- package/lib/gantt/index.js +20 -0
- package/lib/gantt/index.min.js +1 -0
- package/lib/gantt/src/emits.js +8 -0
- package/lib/gantt/src/emits.min.js +1 -0
- package/lib/gantt/src/gantt-body.js +118 -0
- package/lib/gantt/src/gantt-body.min.js +1 -0
- package/lib/gantt/src/gantt-chart.js +94 -0
- package/lib/gantt/src/gantt-chart.min.js +1 -0
- package/lib/gantt/src/gantt-header.js +78 -0
- package/lib/gantt/src/gantt-header.min.js +1 -0
- package/lib/gantt/src/gantt-view.js +810 -0
- package/lib/gantt/src/gantt-view.min.js +1 -0
- package/lib/gantt/src/gantt.js +1997 -0
- package/lib/gantt/src/gantt.min.js +1 -0
- package/lib/gantt/src/grid-emits.js +8 -0
- package/lib/gantt/src/grid-emits.min.js +1 -0
- package/lib/gantt/src/grid-props.js +24 -0
- package/lib/gantt/src/grid-props.min.js +1 -0
- package/lib/gantt/src/props.js +13 -0
- package/lib/gantt/src/props.min.js +1 -0
- package/lib/gantt/src/table-emits.js +7 -0
- package/lib/gantt/src/table-emits.min.js +1 -0
- package/lib/gantt/src/table-props.js +306 -0
- package/lib/gantt/src/table-props.min.js +1 -0
- package/lib/gantt/src/util.js +19 -0
- package/lib/gantt/src/util.min.js +1 -0
- package/lib/gantt/style/index.js +1 -0
- package/lib/gantt/style/style.css +599 -0
- package/lib/gantt/style/style.min.css +1 -0
- package/lib/index.common.js +21 -0
- package/lib/index.umd.js +6731 -0
- package/lib/index.umd.min.js +1 -0
- package/lib/style.css +1 -0
- package/lib/style.min.css +1 -0
- package/lib/ui/index.js +69 -0
- package/lib/ui/index.min.js +1 -0
- package/lib/ui/src/comp.js +8 -0
- package/lib/ui/src/comp.min.js +1 -0
- package/lib/ui/src/dom.js +217 -0
- package/lib/ui/src/dom.min.js +1 -0
- package/lib/ui/src/log.js +10 -0
- package/lib/ui/src/log.min.js +1 -0
- package/lib/ui/src/utils.js +59 -0
- package/lib/ui/src/utils.min.js +1 -0
- package/lib/ui/src/vn.js +1 -0
- package/lib/ui/src/vn.min.js +0 -0
- package/lib/ui/style/index.js +1 -0
- package/lib/ui/style/style.css +0 -0
- package/lib/ui/style/style.min.css +0 -0
- package/lib/vxe-gantt/index.js +21 -0
- package/lib/vxe-gantt/index.min.js +1 -0
- package/lib/vxe-gantt/style/index.js +1 -0
- package/lib/vxe-gantt/style/style.css +599 -0
- package/lib/vxe-gantt/style/style.min.css +1 -0
- package/lib/vxe-ui/index.js +21 -0
- package/lib/vxe-ui/index.min.js +1 -0
- package/lib/vxe-ui/style/index.js +1 -0
- package/lib/vxe-ui/style/style.css +0 -0
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/package.json +58 -21
- package/packages/components.ts +19 -0
- package/packages/gantt/index.ts +17 -0
- package/packages/gantt/src/emits.ts +7 -0
- package/packages/gantt/src/gantt-body.ts +119 -0
- package/packages/gantt/src/gantt-chart.ts +92 -0
- package/packages/gantt/src/gantt-header.ts +79 -0
- package/packages/gantt/src/gantt-view.ts +840 -0
- package/packages/gantt/src/gantt.ts +1869 -0
- package/packages/gantt/src/grid-emits.ts +19 -0
- package/packages/gantt/src/grid-props.ts +23 -0
- package/packages/gantt/src/props.ts +13 -0
- package/packages/gantt/src/table-emits.ts +109 -0
- package/packages/gantt/src/table-props.ts +304 -0
- package/packages/gantt/src/util.ts +15 -0
- package/packages/index.ts +4 -0
- package/packages/ui/index.ts +58 -0
- package/packages/ui/src/comp.ts +3 -0
- package/packages/ui/src/dom.ts +196 -0
- package/packages/ui/src/log.ts +6 -0
- package/packages/ui/src/utils.ts +50 -0
- package/packages/ui/src/vn.ts +0 -0
- package/styles/all.scss +3 -0
- package/styles/base.scss +2 -0
- package/styles/components/gantt-module/all.scss +1 -0
- package/styles/components/gantt-module/gantt-chart.scss +46 -0
- package/styles/components/gantt.scss +586 -0
- package/styles/components/ui.scss +0 -0
- package/styles/cssvar.scss +0 -0
- package/styles/helpers/baseMixin.scss +96 -0
- package/styles/helpers/baseVar.scss +4 -0
- package/styles/helpers/placement.scss +39 -0
- package/styles/theme/base.scss +7 -0
- package/styles/theme/dark.scss +7 -0
- package/styles/theme/light.scss +7 -0
- package/styles/variable.scss +0 -0
- package/types/all.d.ts +16 -0
- package/types/index.d.ts +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 xuliangzhan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# vxe-gantt
|
|
2
|
+
|
|
3
|
+
[简体中文](README.md) | [繁體中文](README.zh-TW.md) | English | [日本語](README.ja-JP.md)
|
|
4
|
+
|
|
5
|
+
[](https://gitee.com/x-extends/vxe-gantt/stargazers)
|
|
6
|
+
[](https://www.npmjs.com/package/vxe-gantt)
|
|
7
|
+
[](https://github.com/x-extends/vxe-gantt/actions/workflows/webpack.yml)
|
|
8
|
+
[](https://npm-stat.com/charts.html?package=vxe-gantt)
|
|
9
|
+
[](https://github.com/x-extends/vxe-gantt/issues)
|
|
10
|
+
[](https://github.com/x-extends/vxe-gantt/issues?q=is%3Aissue+is%3Aclosed)
|
|
11
|
+
[](https://github.com/x-extends/vxe-gantt/pulls)
|
|
12
|
+
[](https://github.com/x-extends/vxe-gantt/pulls?q=is%3Apr+is%3Aclosed)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
|
|
15
|
+
A PC-based Gantt chart component based on [Vxe UI](https://github.com/x-extends/ vxe-pc-ui).
|
|
16
|
+
|
|
17
|
+
## Browser Support
|
|
18
|
+
|
|
19
|
+
 |  |  |  | 
|
|
20
|
+
--- | --- | --- | --- | --- |
|
|
21
|
+
80+ ✔ | 80+ ✔ | 90+ ✔ | 75+ ✔ | 10+ ✔ |
|
|
22
|
+
|
|
23
|
+
## Use
|
|
24
|
+
|
|
25
|
+
版本:[vue](https://www.npmjs.com/package/vue) 3.x
|
|
26
|
+
|
|
27
|
+
```shell
|
|
28
|
+
npm install vxe-gantt
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Get on [unpkg](https://unpkg.com/vxe-gantt/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-gantt/)
|
|
32
|
+
|
|
33
|
+
### NPM
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
// ...
|
|
37
|
+
import VxeUIAll from 'vxe-pc-ui'
|
|
38
|
+
import 'vxe-pc-ui/lib/style.css'
|
|
39
|
+
|
|
40
|
+
import VxeUITable from 'vxe-table'
|
|
41
|
+
import 'vxe-table/lib/style.css'
|
|
42
|
+
|
|
43
|
+
import VxeUIGantt from 'vxe-gantt'
|
|
44
|
+
import 'vxe-gantt/lib/style.css'
|
|
45
|
+
// ...
|
|
46
|
+
|
|
47
|
+
createApp(App).use(VxeUIAll).use(VxeUITable).use(VxeUIGantt).mount('#app')
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Run the project
|
|
51
|
+
|
|
52
|
+
Install dependencies
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
npm install
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Start local debugging
|
|
59
|
+
|
|
60
|
+
```shell
|
|
61
|
+
npm run serve
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Compile packaging, generated compiled directory: es,lib
|
|
65
|
+
|
|
66
|
+
```shell
|
|
67
|
+
npm run lib
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
[MIT](LICENSE) © 2025-present, Xu Liangzhan
|
package/README.ja-JP.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# vxe-gantt
|
|
2
|
+
|
|
3
|
+
[简体中文](README.md) | [繁體中文](README.zh-TW.md) | [English](README.en.md) | 日本語
|
|
4
|
+
|
|
5
|
+
[](https://gitee.com/x-extends/vxe-gantt/stargazers)
|
|
6
|
+
[](https://www.npmjs.com/package/vxe-gantt)
|
|
7
|
+
[](https://github.com/x-extends/vxe-gantt/actions/workflows/webpack.yml)
|
|
8
|
+
[](https://npm-stat.com/charts.html?package=vxe-gantt)
|
|
9
|
+
[](https://github.com/x-extends/vxe-gantt/issues)
|
|
10
|
+
[](https://github.com/x-extends/vxe-gantt/issues?q=is%3Aissue+is%3Aclosed)
|
|
11
|
+
[](https://github.com/x-extends/vxe-gantt/pulls)
|
|
12
|
+
[](https://github.com/x-extends/vxe-gantt/pulls?q=is%3Apr+is%3Aclosed)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
|
|
15
|
+
一个基于 [Vxe UI](https://github.com/x-extends/vxe-pc-ui) 的基于 PC 端甘特图组件
|
|
16
|
+
|
|
17
|
+
## ブラウザサポート
|
|
18
|
+
|
|
19
|
+
 |  |  |  | 
|
|
20
|
+
--- | --- | --- | --- | --- |
|
|
21
|
+
80+ ✔ | 80+ ✔ | 90+ ✔ | 75+ ✔ | 10+ ✔ |
|
|
22
|
+
|
|
23
|
+
### テーブルとUIの使用
|
|
24
|
+
|
|
25
|
+
版本:[vue](https://www.npmjs.com/package/vue) 3.x
|
|
26
|
+
|
|
27
|
+
```shell
|
|
28
|
+
npm install vxe-gantt
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Get on [unpkg](https://unpkg.com/vxe-gantt/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-gantt/)
|
|
32
|
+
|
|
33
|
+
### NPM
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
// ...
|
|
37
|
+
import VxeUIAll from 'vxe-pc-ui'
|
|
38
|
+
import 'vxe-pc-ui/lib/style.css'
|
|
39
|
+
|
|
40
|
+
import VxeUITable from 'vxe-table'
|
|
41
|
+
import 'vxe-table/lib/style.css'
|
|
42
|
+
|
|
43
|
+
import VxeUIGantt from 'vxe-gantt'
|
|
44
|
+
import 'vxe-gantt/lib/style.css'
|
|
45
|
+
// ...
|
|
46
|
+
|
|
47
|
+
createApp(App).use(VxeUIAll).use(VxeUITable).use(VxeUIGantt).mount('#app')
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## プロジェクトの実行
|
|
51
|
+
|
|
52
|
+
依存関係をインストールする
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
npm install
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
ローカルデバッグを開始する
|
|
59
|
+
|
|
60
|
+
```shell
|
|
61
|
+
npm run serve
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
コンパイルパッケージング、生成されたコンパイルディレクトリ: es,lib
|
|
65
|
+
|
|
66
|
+
```shell
|
|
67
|
+
npm run lib
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## ライセンス
|
|
71
|
+
|
|
72
|
+
[MIT](LICENSE) © 2025-present, Xu Liangzhan
|
package/README.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
|
-
#
|
|
1
|
+
# vxe-gantt
|
|
2
|
+
|
|
3
|
+
简体中文 | [繁體中文](README.zh-TW.md) | [English](README.en.md) | [日本語](README.ja-JP.md)
|
|
4
|
+
|
|
5
|
+
[](https://gitee.com/x-extends/vxe-gantt/stargazers)
|
|
6
|
+
[](https://www.npmjs.com/package/vxe-gantt)
|
|
7
|
+
[](https://github.com/x-extends/vxe-gantt/actions/workflows/webpack.yml)
|
|
8
|
+
[](https://npm-stat.com/charts.html?package=vxe-gantt)
|
|
9
|
+
[](https://github.com/x-extends/vxe-gantt/issues)
|
|
10
|
+
[](https://github.com/x-extends/vxe-gantt/issues?q=is%3Aissue+is%3Aclosed)
|
|
11
|
+
[](https://github.com/x-extends/vxe-gantt/pulls)
|
|
12
|
+
[](https://github.com/x-extends/vxe-gantt/pulls?q=is%3Apr+is%3Aclosed)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
|
|
15
|
+
一个基于 [Vxe UI](https://github.com/x-extends/vxe-pc-ui) 的基于 PC 端甘特图组件
|
|
16
|
+
|
|
17
|
+
* 设计理念
|
|
18
|
+
* 面向现代浏览器,高效的简洁 API 设计
|
|
19
|
+
|
|
20
|
+
* 版本说明
|
|
21
|
+
* **V4**
|
|
22
|
+
* [x] v4.0 基于 vue3.2+,只支持现代浏览器,不支持 IE
|
|
23
|
+
* **V3**
|
|
24
|
+
* [x] v3.0 基于 vue2.6~2.7,只支持现代浏览器,不支持 IE
|
|
25
|
+
* **V2**
|
|
26
|
+
* [x] ~~v2.0 基于 vue2.6+,停止维护~~
|
|
27
|
+
* **V1**
|
|
28
|
+
* [x] ~~v1.0 基于 vue2.6+,停止维护~~
|
|
29
|
+
|
|
30
|
+
## 浏览器支持
|
|
31
|
+
|
|
32
|
+
 |  |  |  | 
|
|
33
|
+
--- | --- | --- | --- | --- |
|
|
34
|
+
80+ ✔ | 80+ ✔ | 90+ ✔ | 75+ ✔ | 10+ ✔ |
|
|
35
|
+
|
|
36
|
+
## 在线文档
|
|
37
|
+
|
|
38
|
+
👉 [基础库](https://vxeui.com)
|
|
39
|
+
👉 [表格库](https://vxetable.cn)
|
|
40
|
+
👉 [甘特图](https://gantt.vxeui.com)
|
|
41
|
+
👉 [可视化](https://design.vxeui.com)
|
|
42
|
+
|
|
43
|
+
## QQ 交流群
|
|
44
|
+
|
|
45
|
+
该群供大家交流問題,如果群人数已满,将会不定期剔除不活跃的。
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
## 功能点
|
|
51
|
+
|
|
52
|
+
[👀 Vxe Gantt](https://gantt.vxeui.com/)
|
|
53
|
+
|
|
54
|
+
* [x] gantt 甘特图
|
|
55
|
+
|
|
56
|
+
## 安装
|
|
57
|
+
|
|
58
|
+
版本:[vue](https://www.npmjs.com/package/vue) 3.x
|
|
59
|
+
|
|
60
|
+
```shell
|
|
61
|
+
npm install vxe-gantt
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Get on [unpkg](https://unpkg.com/vxe-gantt/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-gantt/)
|
|
65
|
+
|
|
66
|
+
### NPM
|
|
67
|
+
|
|
68
|
+
```javascript
|
|
69
|
+
// ...
|
|
70
|
+
import VxeUIAll from 'vxe-pc-ui'
|
|
71
|
+
import 'vxe-pc-ui/lib/style.css'
|
|
72
|
+
|
|
73
|
+
import VxeUITable from 'vxe-table'
|
|
74
|
+
import 'vxe-table/lib/style.css'
|
|
75
|
+
|
|
76
|
+
import VxeUIGantt from 'vxe-gantt'
|
|
77
|
+
import 'vxe-gantt/lib/style.css'
|
|
78
|
+
// ...
|
|
79
|
+
|
|
80
|
+
createApp(App).use(VxeUIAll).use(VxeUITable).use(VxeUIGantt).mount('#app')
|
|
81
|
+
```
|
|
2
82
|
|
|
3
83
|
## License
|
|
4
84
|
|
|
5
|
-
[MIT](LICENSE) ©
|
|
85
|
+
[MIT](LICENSE) © 2025-present, Xu Liangzhan
|
package/README.zh-TW.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# vxe-gantt
|
|
2
|
+
|
|
3
|
+
[简体中文](README.md) | 繁體中文 | [English](README.en.md) | [日本語](README.ja-JP.md)
|
|
4
|
+
|
|
5
|
+
[](https://gitee.com/x-extends/vxe-gantt/stargazers)
|
|
6
|
+
[](https://www.npmjs.com/package/vxe-gantt)
|
|
7
|
+
[](https://github.com/x-extends/vxe-gantt/actions/workflows/webpack.yml)
|
|
8
|
+
[](https://npm-stat.com/charts.html?package=vxe-gantt)
|
|
9
|
+
[](https://github.com/x-extends/vxe-gantt/issues)
|
|
10
|
+
[](https://github.com/x-extends/vxe-gantt/issues?q=is%3Aissue+is%3Aclosed)
|
|
11
|
+
[](https://github.com/x-extends/vxe-gantt/pulls)
|
|
12
|
+
[](https://github.com/x-extends/vxe-gantt/pulls?q=is%3Apr+is%3Aclosed)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
|
|
15
|
+
一个基于 [Vxe UI](https://github.com/x-extends/vxe-pc-ui) 的基于 PC 端甘特图组件
|
|
16
|
+
|
|
17
|
+
## 浏览器支持
|
|
18
|
+
|
|
19
|
+
 |  |  |  | 
|
|
20
|
+
--- | --- | --- | --- | --- |
|
|
21
|
+
80+ ✔ | 80+ ✔ | 90+ ✔ | 75+ ✔ | 10+ ✔ |
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## 安装
|
|
25
|
+
|
|
26
|
+
版本:[vue](https://www.npmjs.com/package/vue) 3.x
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
npm install vxe-gantt
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Get on [unpkg](https://unpkg.com/vxe-gantt/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-gantt/)
|
|
33
|
+
|
|
34
|
+
### NPM
|
|
35
|
+
|
|
36
|
+
```javascript
|
|
37
|
+
// ...
|
|
38
|
+
import VxeUIAll from 'vxe-pc-ui'
|
|
39
|
+
import 'vxe-pc-ui/lib/style.css'
|
|
40
|
+
|
|
41
|
+
import VxeUITable from 'vxe-table'
|
|
42
|
+
import 'vxe-table/lib/style.css'
|
|
43
|
+
|
|
44
|
+
import VxeUIGantt from 'vxe-gantt'
|
|
45
|
+
import 'vxe-gantt/lib/style.css'
|
|
46
|
+
// ...
|
|
47
|
+
|
|
48
|
+
createApp(App).use(VxeUIAll).use(VxeUITable).use(VxeUIGantt).mount('#app')
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 運行項目
|
|
52
|
+
|
|
53
|
+
安裝依賴
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
npm install
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
啓動本地調試
|
|
60
|
+
|
|
61
|
+
```shell
|
|
62
|
+
npm run serve
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
編譯打包,生成編譯後的目錄:es,lib
|
|
66
|
+
|
|
67
|
+
```shell
|
|
68
|
+
npm run lib
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 許可證
|
|
72
|
+
|
|
73
|
+
[MIT](LICENSE) © 2025-present, Xu Liangzhan
|
package/es/components.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { setConfig } from '@vxe-ui/core';
|
|
2
|
+
import VxeGantt from './gantt';
|
|
3
|
+
const components = [
|
|
4
|
+
VxeGantt
|
|
5
|
+
];
|
|
6
|
+
export function install(app, options) {
|
|
7
|
+
setConfig(options);
|
|
8
|
+
components.forEach(component => app.use(component));
|
|
9
|
+
}
|
|
10
|
+
export * from './ui';
|
|
11
|
+
// Components
|
|
12
|
+
export * from './gantt';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VxeUI } from '@vxe-ui/core';
|
|
2
|
+
import VxeGanttComponent from './src/gantt';
|
|
3
|
+
export const VxeGantt = Object.assign({}, VxeGanttComponent, {
|
|
4
|
+
install(app) {
|
|
5
|
+
app.component(VxeGanttComponent.name, VxeGanttComponent);
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
if (VxeUI.dynamicApp) {
|
|
9
|
+
VxeUI.dynamicApp.use(VxeGantt);
|
|
10
|
+
}
|
|
11
|
+
VxeUI.component(VxeGanttComponent);
|
|
12
|
+
export const Gantt = VxeGantt;
|
|
13
|
+
export default VxeGantt;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { h, inject, ref, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
|
+
import { getCellRestHeight } from './util';
|
|
4
|
+
import GanttViewChartComponent from './gantt-chart';
|
|
5
|
+
export default defineVxeComponent({
|
|
6
|
+
name: 'VxeGanttViewBody',
|
|
7
|
+
setup() {
|
|
8
|
+
const $xeGantt = inject('$xeGantt', {});
|
|
9
|
+
const $xeGanttView = inject('$xeGanttView', {});
|
|
10
|
+
const { reactData, internalData } = $xeGanttView;
|
|
11
|
+
const { refTable } = $xeGantt.getRefMaps();
|
|
12
|
+
const refElem = ref();
|
|
13
|
+
const refBodyScroll = ref();
|
|
14
|
+
const refBodyTable = ref();
|
|
15
|
+
const refBodyXSpace = ref();
|
|
16
|
+
const refBodyYSpace = ref();
|
|
17
|
+
const renderRows = () => {
|
|
18
|
+
const $xeTable = refTable.value;
|
|
19
|
+
const fullAllDataRowIdData = $xeTable ? $xeTable.internalData.fullAllDataRowIdData : {};
|
|
20
|
+
let cellOpts = {};
|
|
21
|
+
let rowOpts = {};
|
|
22
|
+
let defaultRowHeight = 0;
|
|
23
|
+
if ($xeTable) {
|
|
24
|
+
const { computeCellOpts, computeRowOpts, computeDefaultRowHeight } = $xeTable.getComputeMaps();
|
|
25
|
+
cellOpts = computeCellOpts.value;
|
|
26
|
+
rowOpts = computeRowOpts.value;
|
|
27
|
+
defaultRowHeight = computeDefaultRowHeight.value;
|
|
28
|
+
}
|
|
29
|
+
const { tableData, tableColumn } = reactData;
|
|
30
|
+
const trVNs = [];
|
|
31
|
+
tableData.forEach((row, rIndex) => {
|
|
32
|
+
const rowid = $xeTable ? $xeTable.getRowid(row) : '';
|
|
33
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
34
|
+
const cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
35
|
+
trVNs.push(h('tr', {
|
|
36
|
+
key: rIndex
|
|
37
|
+
}, tableColumn.map((column, cIndex) => {
|
|
38
|
+
return h('td', {
|
|
39
|
+
key: cIndex,
|
|
40
|
+
class: 'vxe-gantt-view--body-column',
|
|
41
|
+
style: {
|
|
42
|
+
height: `${cellHeight}px`
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
})));
|
|
46
|
+
});
|
|
47
|
+
return trVNs;
|
|
48
|
+
};
|
|
49
|
+
const renderVN = () => {
|
|
50
|
+
const { tableColumn } = reactData;
|
|
51
|
+
return h('div', {
|
|
52
|
+
ref: refElem,
|
|
53
|
+
class: 'vxe-gantt-view--body-wrapper'
|
|
54
|
+
}, [
|
|
55
|
+
h('div', {
|
|
56
|
+
ref: refBodyScroll,
|
|
57
|
+
class: 'vxe-gantt-view--body-inner-wrapper',
|
|
58
|
+
onScroll: $xeGanttView.triggerBodyScrollEvent
|
|
59
|
+
}, [
|
|
60
|
+
h('div', {
|
|
61
|
+
ref: refBodyXSpace,
|
|
62
|
+
class: 'vxe-body--x-space'
|
|
63
|
+
}),
|
|
64
|
+
h('div', {
|
|
65
|
+
ref: refBodyYSpace,
|
|
66
|
+
class: 'vxe-body--y-space'
|
|
67
|
+
}),
|
|
68
|
+
h('table', {
|
|
69
|
+
ref: refBodyTable,
|
|
70
|
+
class: 'vxe-gantt-view--body-table'
|
|
71
|
+
}, [
|
|
72
|
+
h('colgroup', {}, tableColumn.map((column, cIndex) => {
|
|
73
|
+
return h('col', {
|
|
74
|
+
key: cIndex
|
|
75
|
+
});
|
|
76
|
+
})),
|
|
77
|
+
h('tbody', {}, renderRows())
|
|
78
|
+
]),
|
|
79
|
+
h(GanttViewChartComponent)
|
|
80
|
+
])
|
|
81
|
+
]);
|
|
82
|
+
};
|
|
83
|
+
onMounted(() => {
|
|
84
|
+
const { elemStore } = internalData;
|
|
85
|
+
const prefix = 'main-body-';
|
|
86
|
+
elemStore[`${prefix}wrapper`] = refElem;
|
|
87
|
+
elemStore[`${prefix}scroll`] = refBodyScroll;
|
|
88
|
+
elemStore[`${prefix}table`] = refBodyTable;
|
|
89
|
+
elemStore[`${prefix}xSpace`] = refBodyXSpace;
|
|
90
|
+
elemStore[`${prefix}ySpace`] = refBodyYSpace;
|
|
91
|
+
});
|
|
92
|
+
onUnmounted(() => {
|
|
93
|
+
const { elemStore } = internalData;
|
|
94
|
+
const prefix = 'main-body-';
|
|
95
|
+
elemStore[`${prefix}wrapper`] = null;
|
|
96
|
+
elemStore[`${prefix}scroll`] = null;
|
|
97
|
+
elemStore[`${prefix}table`] = null;
|
|
98
|
+
elemStore[`${prefix}xSpace`] = null;
|
|
99
|
+
elemStore[`${prefix}ySpace`] = null;
|
|
100
|
+
});
|
|
101
|
+
return renderVN;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { h, inject, ref, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
|
+
import XEUtils from 'xe-utils';
|
|
4
|
+
import { getCellRestHeight } from './util';
|
|
5
|
+
export default defineVxeComponent({
|
|
6
|
+
name: 'VxeGanttViewChart',
|
|
7
|
+
setup() {
|
|
8
|
+
const $xeGantt = inject('$xeGantt', {});
|
|
9
|
+
const $xeGanttView = inject('$xeGanttView', {});
|
|
10
|
+
const { reactData, internalData } = $xeGanttView;
|
|
11
|
+
const { refTable } = $xeGantt.getRefMaps();
|
|
12
|
+
const { computeProgressField } = $xeGantt.getComputeMaps();
|
|
13
|
+
const refElem = ref();
|
|
14
|
+
const renderVN = () => {
|
|
15
|
+
const $xeTable = refTable.value;
|
|
16
|
+
const fullAllDataRowIdData = $xeTable ? $xeTable.internalData.fullAllDataRowIdData : {};
|
|
17
|
+
let cellOpts = {};
|
|
18
|
+
let rowOpts = {};
|
|
19
|
+
let defaultRowHeight = 0;
|
|
20
|
+
if ($xeTable) {
|
|
21
|
+
const { computeCellOpts, computeRowOpts, computeDefaultRowHeight } = $xeTable.getComputeMaps();
|
|
22
|
+
cellOpts = computeCellOpts.value;
|
|
23
|
+
rowOpts = computeRowOpts.value;
|
|
24
|
+
defaultRowHeight = computeDefaultRowHeight.value;
|
|
25
|
+
}
|
|
26
|
+
const { tableData } = reactData;
|
|
27
|
+
const progressField = computeProgressField.value;
|
|
28
|
+
const trVNs = [];
|
|
29
|
+
tableData.forEach((row, rIndex) => {
|
|
30
|
+
const rowid = $xeTable ? $xeTable.getRowid(row) : '';
|
|
31
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
32
|
+
const cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
33
|
+
const progressValue = XEUtils.get(row, progressField);
|
|
34
|
+
trVNs.push(h('div', {
|
|
35
|
+
key: rIndex,
|
|
36
|
+
rowid,
|
|
37
|
+
class: 'vxe-gantt-view--chart-row',
|
|
38
|
+
style: {
|
|
39
|
+
height: `${cellHeight}px`
|
|
40
|
+
}
|
|
41
|
+
}, [
|
|
42
|
+
h('div', {
|
|
43
|
+
class: 'vxe-gantt-view--chart-bar',
|
|
44
|
+
rowid
|
|
45
|
+
}, [
|
|
46
|
+
h('div', {
|
|
47
|
+
class: 'vxe-gantt-view--chart-progress',
|
|
48
|
+
style: progressValue
|
|
49
|
+
? {
|
|
50
|
+
width: `${progressValue}%`
|
|
51
|
+
}
|
|
52
|
+
: undefined
|
|
53
|
+
}),
|
|
54
|
+
h('div', {
|
|
55
|
+
class: 'vxe-gantt-view--chart-content'
|
|
56
|
+
})
|
|
57
|
+
])
|
|
58
|
+
]));
|
|
59
|
+
});
|
|
60
|
+
return h('div', {
|
|
61
|
+
ref: refElem,
|
|
62
|
+
class: 'vxe-gantt-view--chart-wrapper'
|
|
63
|
+
}, trVNs);
|
|
64
|
+
};
|
|
65
|
+
onMounted(() => {
|
|
66
|
+
const { elemStore } = internalData;
|
|
67
|
+
const prefix = 'main-chart-';
|
|
68
|
+
elemStore[`${prefix}wrapper`] = refElem;
|
|
69
|
+
});
|
|
70
|
+
onUnmounted(() => {
|
|
71
|
+
const { elemStore } = internalData;
|
|
72
|
+
const prefix = 'main-chart-';
|
|
73
|
+
elemStore[`${prefix}wrapper`] = null;
|
|
74
|
+
});
|
|
75
|
+
return renderVN;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { h, inject, ref, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
|
+
export default defineVxeComponent({
|
|
4
|
+
name: 'VxeGanttView',
|
|
5
|
+
setup() {
|
|
6
|
+
const $xeGanttView = inject('$xeGanttView', {});
|
|
7
|
+
const { reactData, internalData } = $xeGanttView;
|
|
8
|
+
const refElem = ref();
|
|
9
|
+
const refHeaderScroll = ref();
|
|
10
|
+
const refHeaderTable = ref();
|
|
11
|
+
const refHeaderXSpace = ref();
|
|
12
|
+
const renderVN = () => {
|
|
13
|
+
const { tableColumn, headerGroups } = reactData;
|
|
14
|
+
return h('div', {
|
|
15
|
+
ref: refElem,
|
|
16
|
+
class: 'vxe-gantt-view--header-wrapper'
|
|
17
|
+
}, [
|
|
18
|
+
h('div', {
|
|
19
|
+
ref: refHeaderScroll,
|
|
20
|
+
class: 'vxe-gantt-view--header-inner-wrapper',
|
|
21
|
+
onScroll: $xeGanttView.triggerHeaderScrollEvent
|
|
22
|
+
}, [
|
|
23
|
+
h('div', {
|
|
24
|
+
ref: refHeaderXSpace,
|
|
25
|
+
class: 'vxe-body--x-space'
|
|
26
|
+
}),
|
|
27
|
+
h('table', {
|
|
28
|
+
ref: refHeaderTable,
|
|
29
|
+
class: 'vxe-gantt-view--header-table'
|
|
30
|
+
}, [
|
|
31
|
+
h('colgroup', {}, tableColumn.map((column, cIndex) => {
|
|
32
|
+
return h('col', {
|
|
33
|
+
key: cIndex
|
|
34
|
+
});
|
|
35
|
+
})),
|
|
36
|
+
h('thead', {}, headerGroups.map((cols, rIndex) => {
|
|
37
|
+
return h('tr', {
|
|
38
|
+
key: rIndex
|
|
39
|
+
}, cols.map((column, cIndex) => {
|
|
40
|
+
return h('th', {
|
|
41
|
+
key: cIndex,
|
|
42
|
+
class: 'vxe-gantt-view--header-column',
|
|
43
|
+
colspan: column.children ? column.children.length : null,
|
|
44
|
+
title: `${column.field}`
|
|
45
|
+
}, column.title);
|
|
46
|
+
}));
|
|
47
|
+
}))
|
|
48
|
+
])
|
|
49
|
+
])
|
|
50
|
+
]);
|
|
51
|
+
};
|
|
52
|
+
onMounted(() => {
|
|
53
|
+
const { elemStore } = internalData;
|
|
54
|
+
const prefix = 'main-header-';
|
|
55
|
+
elemStore[`${prefix}wrapper`] = refElem;
|
|
56
|
+
elemStore[`${prefix}scroll`] = refHeaderScroll;
|
|
57
|
+
elemStore[`${prefix}table`] = refHeaderTable;
|
|
58
|
+
elemStore[`${prefix}xSpace`] = refHeaderXSpace;
|
|
59
|
+
});
|
|
60
|
+
onUnmounted(() => {
|
|
61
|
+
const { elemStore } = internalData;
|
|
62
|
+
const prefix = 'main-header-';
|
|
63
|
+
elemStore[`${prefix}wrapper`] = null;
|
|
64
|
+
elemStore[`${prefix}scroll`] = null;
|
|
65
|
+
elemStore[`${prefix}table`] = null;
|
|
66
|
+
elemStore[`${prefix}xSpace`] = null;
|
|
67
|
+
});
|
|
68
|
+
return renderVN;
|
|
69
|
+
}
|
|
70
|
+
});
|