vxe-gantt 4.0.0-beta.0 → 4.0.0-beta.2

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.
Files changed (80) hide show
  1. package/README.md +1 -1
  2. package/es/components.js +3 -2
  3. package/es/gantt/src/emits.js +5 -1
  4. package/es/gantt/src/gantt-body.js +14 -5
  5. package/es/gantt/src/gantt-chart.js +38 -17
  6. package/es/gantt/src/gantt-header.js +20 -3
  7. package/es/gantt/src/gantt-view.js +5 -1
  8. package/es/gantt/src/gantt.js +91 -36
  9. package/es/gantt/src/util.js +6 -0
  10. package/es/gantt/style.css +36 -25
  11. package/es/gantt/style.min.css +1 -1
  12. package/es/index.esm.js +2 -2
  13. package/es/style.css +1 -1
  14. package/es/style.min.css +1 -1
  15. package/es/ui/index.js +9 -3
  16. package/es/ui/src/log.js +3 -2
  17. package/es/ui/src/utils.js +3 -0
  18. package/es/vxe-gantt/style.css +36 -25
  19. package/es/vxe-gantt/style.min.css +1 -1
  20. package/helper/vetur/attributes.json +1 -1
  21. package/helper/vetur/tags.json +1 -1
  22. package/lib/components.js +14 -15
  23. package/lib/components.min.js +1 -1
  24. package/lib/gantt/src/emits.js +1 -1
  25. package/lib/gantt/src/emits.min.js +1 -1
  26. package/lib/gantt/src/gantt-body.js +19 -7
  27. package/lib/gantt/src/gantt-body.min.js +1 -1
  28. package/lib/gantt/src/gantt-chart.js +50 -15
  29. package/lib/gantt/src/gantt-chart.min.js +1 -1
  30. package/lib/gantt/src/gantt-header.js +24 -3
  31. package/lib/gantt/src/gantt-header.min.js +1 -1
  32. package/lib/gantt/src/gantt-view.js +6 -2
  33. package/lib/gantt/src/gantt-view.min.js +1 -1
  34. package/lib/gantt/src/gantt.js +122 -40
  35. package/lib/gantt/src/gantt.min.js +1 -1
  36. package/lib/gantt/src/util.js +7 -0
  37. package/lib/gantt/src/util.min.js +1 -1
  38. package/lib/gantt/style/style.css +36 -25
  39. package/lib/gantt/style/style.min.css +1 -1
  40. package/lib/index.common.js +5 -5
  41. package/lib/index.umd.js +25388 -6143
  42. package/lib/index.umd.min.js +1 -1
  43. package/lib/style.css +1 -1
  44. package/lib/style.min.css +1 -1
  45. package/lib/ui/index.js +13 -15
  46. package/lib/ui/index.min.js +1 -1
  47. package/lib/ui/src/log.js +6 -3
  48. package/lib/ui/src/log.min.js +1 -1
  49. package/lib/ui/src/utils.js +4 -0
  50. package/lib/ui/src/utils.min.js +1 -1
  51. package/lib/vxe-gantt/style/style.css +36 -25
  52. package/lib/vxe-gantt/style/style.min.css +1 -1
  53. package/package.json +4 -4
  54. package/packages/components.ts +6 -3
  55. package/packages/gantt/src/emits.ts +6 -1
  56. package/packages/gantt/src/gantt-body.ts +15 -6
  57. package/packages/gantt/src/gantt-chart.ts +31 -14
  58. package/packages/gantt/src/gantt-header.ts +24 -3
  59. package/packages/gantt/src/gantt-view.ts +6 -1
  60. package/packages/gantt/src/gantt.ts +133 -39
  61. package/packages/gantt/src/util.ts +7 -0
  62. package/packages/index.ts +2 -2
  63. package/packages/ui/index.ts +9 -3
  64. package/packages/ui/src/log.ts +3 -1
  65. package/packages/ui/src/utils.ts +4 -0
  66. package/styles/components/gantt-module/gantt-chart.scss +28 -9
  67. package/styles/components/gantt.scss +12 -13
  68. package/styles/theme/base.scss +5 -1
  69. package/es/gantt/src/grid-props.js +0 -7
  70. package/es/gantt/src/props.js +0 -2
  71. package/es/gantt/src/table-props.js +0 -298
  72. package/lib/gantt/src/grid-props.js +0 -24
  73. package/lib/gantt/src/grid-props.min.js +0 -1
  74. package/lib/gantt/src/props.js +0 -13
  75. package/lib/gantt/src/props.min.js +0 -1
  76. package/lib/gantt/src/table-props.js +0 -306
  77. package/lib/gantt/src/table-props.min.js +0 -1
  78. package/packages/gantt/src/grid-props.ts +0 -23
  79. package/packages/gantt/src/props.ts +0 -13
  80. package/packages/gantt/src/table-props.ts +0 -304
@@ -75,9 +75,11 @@
75
75
  }
76
76
  .vxe-gantt--view-split-bar {
77
77
  flex-shrink: 0;
78
- cursor: col-resize;
79
78
  width: var(--vxe-ui-gantt-view-split-bar-width);
80
79
  background-color: var(--vxe-ui-gantt-view-split-bar-background-color);
80
+ &.is--resize {
81
+ cursor: col-resize;
82
+ }
81
83
  }
82
84
  &.show--left {
83
85
  .vxe-gantt--table-wrapper {
@@ -87,7 +89,7 @@
87
89
  .vxe-gantt--table-wrapper {
88
90
  flex-grow: unset;
89
91
  flex-shrink: 0;
90
- width: 30%;
92
+ width: var(--vxe-ui-gantt-view-table-default-width);
91
93
  }
92
94
  }
93
95
  }
@@ -279,6 +281,12 @@
279
281
  transform: translate(-50%, -50%);
280
282
  z-index: 15;
281
283
  pointer-events: none;
284
+ & > div {
285
+ margin-top: 1em;
286
+ &:first-child {
287
+ margin-top: 0;
288
+ }
289
+ }
282
290
  }
283
291
  .vxe-gantt--view-split-bar-left-btn,
284
292
  .vxe-gantt--view-split-bar-right-btn {
@@ -304,9 +312,6 @@
304
312
  transform: scale(0.9);
305
313
  }
306
314
  }
307
- .vxe-gantt--view-split-bar-right-btn {
308
- margin-top: 1em;
309
- }
310
315
  .vxe-gantt--resizable-split-tip {
311
316
  display: none;
312
317
  position: absolute;
@@ -496,7 +501,7 @@
496
501
  overflow: hidden;
497
502
  }
498
503
  .vxe-gantt-view--column-info {
499
- width: var(--vxe-ui-gantt-view-column-width);
504
+ width: var(--vxe-ui-gantt-view-default-cell-width);
500
505
  }
501
506
 
502
507
  // 任务视图
@@ -513,9 +518,6 @@
513
518
  float: left;
514
519
  }
515
520
  }
516
- .vxe-gantt-view--header-table {
517
- height: 100%;
518
- }
519
521
  .vxe-gantt-view--header-table,
520
522
  .vxe-gantt-view--body-table {
521
523
  border: 0;
@@ -523,7 +525,7 @@
523
525
  border-collapse: separate;
524
526
  table-layout: fixed;
525
527
  col {
526
- width: var(--vxe-ui-gantt-view-column-width);
528
+ width: var(--vxe-ui-gantt-view-default-cell-width);
527
529
  }
528
530
  }
529
531
  .vxe-gantt-view--header-wrapper,
@@ -551,9 +553,6 @@
551
553
  text-align: center;
552
554
  font-size: 1em;
553
555
  }
554
- .vxe-gantt-view--body-column {
555
- height: 48px;
556
- }
557
556
  .vxe-gantt-view--header-column,
558
557
  .vxe-gantt-view--body-column,
559
558
  .vxe-gantt-view--footer-column {
@@ -1,7 +1,11 @@
1
1
  :root {
2
2
  /*gantt*/
3
- --vxe-ui-gantt-view-column-width: 40px;
3
+ --vxe-ui-gantt-view-default-cell-width: 40px;
4
4
  --vxe-ui-gantt-view-chart-bar-height: 1.6em;
5
5
  --vxe-ui-gantt-view-split-bar-width: 10px;
6
6
  --vxe-ui-gantt-view-split-bar-height: 6.8em;
7
+ --vxe-ui-gantt-view-table-default-width: 30%;
8
+ --vxe-ui-gantt-view-task-bar-border-radius: calc(var(--vxe-ui-gantt-view-split-bar-height) / 2);
9
+ --vxe-ui-gantt-view-task-bar-background-color: var(--vxe-ui-font-primary-lighten-color);
10
+ --vxe-ui-gantt-view-task-bar-completed-background-color: var(--vxe-ui-font-primary-color);
7
11
  }
@@ -1,7 +0,0 @@
1
- import { VxeUI } from '../../ui';
2
- import { tableProps } from './table-props';
3
- const { getConfig } = VxeUI;
4
- export const gridProps = Object.assign(Object.assign({}, tableProps), { layouts: Array, columns: Array, pagerConfig: Object, proxyConfig: Object, toolbarConfig: Object, formConfig: Object, zoomConfig: Object, size: {
5
- type: String,
6
- default: () => getConfig().gantt.size || getConfig().size
7
- } });
@@ -1,2 +0,0 @@
1
- import { gridProps } from './grid-props';
2
- export const ganttProps = Object.assign(Object.assign({}, gridProps), { layouts: Array, taskConfig: Object, taskViewConfig: Object, taskBarConfig: Object });
@@ -1,298 +0,0 @@
1
- import { VxeUI } from '../../ui';
2
- const { getConfig } = VxeUI;
3
- export const tableProps = {
4
- /** 基本属性 */
5
- id: [String, Function],
6
- // 数据
7
- data: Array,
8
- // 表格的高度
9
- height: [Number, String],
10
- // 表格的最小高度
11
- minHeight: {
12
- type: [Number, String],
13
- default: () => getConfig().table.minHeight
14
- },
15
- // 表格的最大高度
16
- maxHeight: [Number, String],
17
- // 已废弃,被 column-config.resizable 替换
18
- resizable: {
19
- type: Boolean,
20
- default: () => getConfig().table.resizable
21
- },
22
- // 是否带有斑马纹
23
- stripe: {
24
- type: Boolean,
25
- default: () => getConfig().table.stripe
26
- },
27
- // 是否带有边框
28
- border: {
29
- type: [Boolean, String],
30
- default: () => getConfig().table.border
31
- },
32
- // 已废弃,被 cell-config.padding 替换
33
- padding: {
34
- type: Boolean,
35
- default: null
36
- },
37
- // 是否圆角边框
38
- round: {
39
- type: Boolean,
40
- default: () => getConfig().table.round
41
- },
42
- // 表格的尺寸
43
- size: {
44
- type: String,
45
- default: () => getConfig().table.size || getConfig().size
46
- },
47
- // 列的宽度是否自撑开(可能会被废弃的参数,不要使用)
48
- fit: {
49
- type: Boolean,
50
- default: () => getConfig().table.fit
51
- },
52
- // 表格是否加载中
53
- loading: Boolean,
54
- // 所有的列对其方式
55
- align: {
56
- type: String,
57
- default: () => getConfig().table.align
58
- },
59
- // 所有的表头列的对齐方式
60
- headerAlign: {
61
- type: String,
62
- default: () => getConfig().table.headerAlign
63
- },
64
- // 所有的表尾列的对齐方式
65
- footerAlign: {
66
- type: String,
67
- default: () => getConfig().table.footerAlign
68
- },
69
- // 是否显示表头
70
- showHeader: {
71
- type: Boolean,
72
- default: () => getConfig().table.showHeader
73
- },
74
- // (即将废弃)是否要高亮当前选中行
75
- highlightCurrentRow: {
76
- type: Boolean,
77
- default: () => getConfig().table.highlightCurrentRow
78
- },
79
- // (即将废弃)鼠标移到行是否要高亮显示
80
- highlightHoverRow: {
81
- type: Boolean,
82
- default: () => getConfig().table.highlightHoverRow
83
- },
84
- /**
85
- * (即将废弃)是否要高亮当前选中列
86
- * @deprecated
87
- */
88
- highlightCurrentColumn: {
89
- type: Boolean,
90
- default: () => getConfig().table.highlightCurrentColumn
91
- },
92
- /**
93
- * (即将废弃)鼠标移到列是否要高亮显示
94
- * @deprecated
95
- */
96
- highlightHoverColumn: {
97
- type: Boolean,
98
- default: () => getConfig().table.highlightHoverColumn
99
- },
100
- // (即将废弃)激活单元格编辑时是否高亮显示
101
- highlightCell: Boolean,
102
- // 是否显示表尾合计
103
- showFooter: Boolean,
104
- // 表尾数据
105
- footerData: Array,
106
- // 表尾合计的计算方法
107
- footerMethod: Function,
108
- // 给行附加 className
109
- rowClassName: [String, Function],
110
- // 给单元格附加 className
111
- cellClassName: [String, Function],
112
- // 给表头的行附加 className
113
- headerRowClassName: [String, Function],
114
- // 给表头的单元格附加 className
115
- headerCellClassName: [String, Function],
116
- // 给表尾的行附加 className
117
- footerRowClassName: [String, Function],
118
- // 给表尾的单元格附加 className
119
- footerCellClassName: [String, Function],
120
- // 给单元格附加样式
121
- cellStyle: [Object, Function],
122
- // 给表头单元格附加样式
123
- headerCellStyle: [Object, Function],
124
- // 给表尾单元格附加样式
125
- footerCellStyle: [Object, Function],
126
- // 给行附加样式
127
- rowStyle: [Object, Function],
128
- // 给表头行附加样式
129
- headerRowStyle: [Object, Function],
130
- // 给表尾行附加样式
131
- footerRowStyle: [Object, Function],
132
- // 合并指定单元格
133
- mergeCells: Array,
134
- // 合并指定的表尾
135
- mergeFooterItems: Array,
136
- // 自定义合并行或列的方法
137
- spanMethod: Function,
138
- // 表尾合并行或列
139
- footerSpanMethod: Function,
140
- // 设置所有内容过长时显示为省略号
141
- showOverflow: {
142
- type: [Boolean, String],
143
- default: () => getConfig().table.showOverflow
144
- },
145
- // 设置表头所有内容过长时显示为省略号
146
- showHeaderOverflow: {
147
- type: [Boolean, String],
148
- default: () => getConfig().table.showHeaderOverflow
149
- },
150
- // 设置表尾所有内容过长时显示为省略号
151
- showFooterOverflow: {
152
- type: [Boolean, String],
153
- default: () => getConfig().table.showFooterOverflow
154
- },
155
- /** 高级属性 */
156
- /**
157
- * (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
158
- * @deprecated
159
- */
160
- columnKey: Boolean,
161
- /**
162
- * (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
163
- * @deprecated
164
- */
165
- rowKey: Boolean,
166
- /**
167
- * (即将废弃)rowId 已废弃,被 row-config.keyField 替换
168
- * @deprecated
169
- */
170
- rowId: {
171
- type: String,
172
- default: () => getConfig().table.rowId
173
- },
174
- zIndex: Number,
175
- emptyText: {
176
- type: String,
177
- default: () => getConfig().table.emptyText
178
- },
179
- keepSource: {
180
- type: Boolean,
181
- default: () => getConfig().table.keepSource
182
- },
183
- // 是否自动监听父容器变化去更新响应式表格宽高
184
- autoResize: {
185
- type: Boolean,
186
- default: () => getConfig().table.autoResize
187
- },
188
- // 是否自动根据状态属性去更新响应式表格宽高
189
- syncResize: [Boolean, String, Number],
190
- // 响应式布局配置项
191
- resizeConfig: Object,
192
- // 列配置项
193
- columnConfig: Object,
194
- // 当前列配置项
195
- currentColumnConfig: Object,
196
- // 单元格配置项
197
- cellConfig: Object,
198
- // 表头单元格配置项
199
- headerCellConfig: Object,
200
- // 表尾单元格配置项
201
- footerCellConfig: Object,
202
- // 行配置项
203
- rowConfig: Object,
204
- // 数据聚合配置项
205
- aggregateConfig: Object,
206
- /**
207
- * 已废弃,被 aggregateConfig 替换
208
- * @deprecated
209
- */
210
- rowGroupConfig: Object,
211
- // 当前行配置项
212
- currentRowConfig: Object,
213
- /**
214
- * 已废弃,被 rowDragConfig 替换
215
- * @deprecated
216
- */
217
- dragConfig: Object,
218
- // 行拖拽排序配置项
219
- rowDragConfig: Object,
220
- // 列拖拽排序配置项
221
- columnDragConfig: Object,
222
- // 列调整配置项
223
- resizableConfig: Object,
224
- // 序号配置项
225
- seqConfig: Object,
226
- // 排序配置项
227
- sortConfig: Object,
228
- // 筛选配置项
229
- filterConfig: Object,
230
- // 单选框配置
231
- radioConfig: Object,
232
- // 复选框配置项
233
- checkboxConfig: Object,
234
- // tooltip 配置项
235
- tooltipConfig: Object,
236
- // 导出配置项
237
- exportConfig: Object,
238
- // 导入配置项
239
- importConfig: Object,
240
- // 打印配置项
241
- printConfig: Object,
242
- // 展开行配置项
243
- expandConfig: Object,
244
- // 树形结构配置项
245
- treeConfig: Object,
246
- // 快捷菜单配置项
247
- menuConfig: Object,
248
- // 鼠标配置项
249
- mouseConfig: Object,
250
- // 区域配置项
251
- areaConfig: Object,
252
- // 按键配置项
253
- keyboardConfig: Object,
254
- // 复制粘/贴配置项
255
- clipConfig: Object,
256
- // 查找/替换配置项
257
- fnrConfig: Object,
258
- // 编辑配置项
259
- editConfig: Object,
260
- // 校验配置项
261
- validConfig: Object,
262
- // 校验规则配置项
263
- editRules: Object,
264
- // 加载中配置项
265
- loadingConfig: Object,
266
- // 空内容渲染配置项
267
- emptyRender: Object,
268
- // 自定义列配置项
269
- customConfig: Object,
270
- /**
271
- * (即将废弃)横向虚拟滚动配置项
272
- * @deprecated
273
- */
274
- scrollX: Object,
275
- /**
276
- * (即将废弃)纵向虚拟滚动配置项
277
- * @deprecated
278
- */
279
- scrollY: Object,
280
- // 横向虚拟滚动配置项
281
- virtualXConfig: Object,
282
- // 纵向虚拟滚动配置项
283
- virtualYConfig: Object,
284
- // 滚动条配置项
285
- scrollbarConfig: Object,
286
- // (即将废弃)优化相关
287
- animat: {
288
- type: Boolean,
289
- default: () => getConfig().table.animat
290
- },
291
- // (可能会被废弃的参数,不要使用)
292
- delayHover: {
293
- type: Number,
294
- default: () => getConfig().table.delayHover
295
- },
296
- // 额外的参数
297
- params: Object
298
- };
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.gridProps = void 0;
7
- var _ui = require("../../ui");
8
- var _tableProps = require("./table-props");
9
- const {
10
- getConfig
11
- } = _ui.VxeUI;
12
- const gridProps = exports.gridProps = Object.assign(Object.assign({}, _tableProps.tableProps), {
13
- layouts: Array,
14
- columns: Array,
15
- pagerConfig: Object,
16
- proxyConfig: Object,
17
- toolbarConfig: Object,
18
- formConfig: Object,
19
- zoomConfig: Object,
20
- size: {
21
- type: String,
22
- default: () => getConfig().gantt.size || getConfig().size
23
- }
24
- });
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.gridProps=void 0;var _ui=require("../../ui"),_tableProps=require("./table-props");let getConfig=_ui.VxeUI.getConfig,gridProps=exports.gridProps=Object.assign(Object.assign({},_tableProps.tableProps),{layouts:Array,columns:Array,pagerConfig:Object,proxyConfig:Object,toolbarConfig:Object,formConfig:Object,zoomConfig:Object,size:{type:String,default:()=>getConfig().gantt.size||getConfig().size}});
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ganttProps = void 0;
7
- var _gridProps = require("./grid-props");
8
- const ganttProps = exports.ganttProps = Object.assign(Object.assign({}, _gridProps.gridProps), {
9
- layouts: Array,
10
- taskConfig: Object,
11
- taskViewConfig: Object,
12
- taskBarConfig: Object
13
- });
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.ganttProps=void 0;var _gridProps=require("./grid-props");let ganttProps=exports.ganttProps=Object.assign(Object.assign({},_gridProps.gridProps),{layouts:Array,taskConfig:Object,taskViewConfig:Object,taskBarConfig:Object});