vxe-gantt 4.0.0-beta.1 → 4.0.0-beta.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.
Files changed (63) hide show
  1. package/es/components.js +3 -2
  2. package/es/gantt/src/gantt-body.js +3 -3
  3. package/es/gantt/src/gantt-chart.js +3 -3
  4. package/es/gantt/src/gantt-header.js +15 -1
  5. package/es/gantt/src/gantt.js +9 -5
  6. package/es/gantt/src/util.js +6 -0
  7. package/es/gantt/style.css +20 -11
  8. package/es/gantt/style.min.css +1 -1
  9. package/es/index.esm.js +2 -2
  10. package/es/style.css +1 -1
  11. package/es/style.min.css +1 -1
  12. package/es/ui/index.js +1 -2
  13. package/es/ui/src/log.js +1 -1
  14. package/es/vxe-gantt/style.css +20 -11
  15. package/es/vxe-gantt/style.min.css +1 -1
  16. package/lib/components.js +14 -15
  17. package/lib/components.min.js +1 -1
  18. package/lib/gantt/src/gantt-body.js +3 -5
  19. package/lib/gantt/src/gantt-body.min.js +1 -1
  20. package/lib/gantt/src/gantt-chart.js +3 -5
  21. package/lib/gantt/src/gantt-chart.min.js +1 -1
  22. package/lib/gantt/src/gantt-header.js +18 -1
  23. package/lib/gantt/src/gantt-header.min.js +1 -1
  24. package/lib/gantt/src/gantt.js +23 -6
  25. package/lib/gantt/src/gantt.min.js +1 -1
  26. package/lib/gantt/src/util.js +7 -0
  27. package/lib/gantt/src/util.min.js +1 -1
  28. package/lib/gantt/style/style.css +20 -11
  29. package/lib/gantt/style/style.min.css +1 -1
  30. package/lib/index.common.js +5 -5
  31. package/lib/index.umd.js +25482 -6377
  32. package/lib/index.umd.min.js +1 -1
  33. package/lib/style.css +1 -1
  34. package/lib/style.min.css +1 -1
  35. package/lib/ui/index.js +1 -13
  36. package/lib/ui/index.min.js +1 -1
  37. package/lib/ui/src/log.js +1 -1
  38. package/lib/ui/src/log.min.js +1 -1
  39. package/lib/vxe-gantt/style/style.css +20 -11
  40. package/lib/vxe-gantt/style/style.min.css +1 -1
  41. package/package.json +1 -1
  42. package/packages/components.ts +6 -3
  43. package/packages/gantt/src/gantt-body.ts +4 -4
  44. package/packages/gantt/src/gantt-chart.ts +5 -5
  45. package/packages/gantt/src/gantt-header.ts +19 -1
  46. package/packages/gantt/src/gantt-view.ts +1 -0
  47. package/packages/gantt/src/gantt.ts +47 -10
  48. package/packages/gantt/src/util.ts +7 -0
  49. package/packages/index.ts +2 -2
  50. package/packages/ui/index.ts +0 -2
  51. package/styles/components/gantt.scss +24 -14
  52. package/es/gantt/src/grid-props.js +0 -7
  53. package/es/gantt/src/props.js +0 -2
  54. package/es/gantt/src/table-props.js +0 -298
  55. package/lib/gantt/src/grid-props.js +0 -24
  56. package/lib/gantt/src/grid-props.min.js +0 -1
  57. package/lib/gantt/src/props.js +0 -14
  58. package/lib/gantt/src/props.min.js +0 -1
  59. package/lib/gantt/src/table-props.js +0 -306
  60. package/lib/gantt/src/table-props.min.js +0 -1
  61. package/packages/gantt/src/grid-props.ts +0 -23
  62. package/packages/gantt/src/props.ts +0 -14
  63. package/packages/gantt/src/table-props.ts +0 -304
@@ -10,6 +10,13 @@ export function getRefElem (refEl: any) {
10
10
  return null
11
11
  }
12
12
 
13
+ export function getCellHeight (height: number | 'unset' | undefined | null) {
14
+ if (height === 'unset') {
15
+ return 0
16
+ }
17
+ return height || 0
18
+ }
19
+
13
20
  export function getCellRestHeight (rowRest: VxeTableDefines.RowCacheItem, cellOpts: VxeTablePropTypes.CellConfig, rowOpts: VxeTablePropTypes.RowConfig, defaultRowHeight: number) {
14
21
  return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
15
22
  }
package/packages/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as VxeUIExport from './components'
1
+ import * as VxeUIGanttExport from './components'
2
2
 
3
3
  export * from './components'
4
- export default VxeUIExport
4
+ export default VxeUIGanttExport
@@ -59,8 +59,6 @@ setIcon({
59
59
  GANTT_VIEW_LEFT_CLOSE: iconPrefix + 'arrow-right',
60
60
  GANTT_VIEW_RIGHT_OPEN: iconPrefix + 'arrow-right',
61
61
  GANTT_VIEW_RIGHT_CLOSE: iconPrefix + 'arrow-left'
62
-
63
62
  })
64
63
 
65
- export * from '@vxe-ui/core'
66
64
  export default VxeUI
@@ -130,13 +130,6 @@
130
130
  border: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
131
131
  }
132
132
  .vxe-gantt {
133
- &.border--default,
134
- &.border--full,
135
- &.border--outer {
136
- .vxe-gantt-view--header-wrapper {
137
- background-color: var(--vxe-ui-table-header-background-color);
138
- }
139
- }
140
133
  &.border--full {
141
134
  .vxe-gantt-view--header-column,
142
135
  .vxe-gantt-view--body-column,
@@ -203,7 +196,6 @@
203
196
  }
204
197
  }
205
198
  }
206
-
207
199
  &.border--default,
208
200
  &.border--full {
209
201
  .vxe-gantt-view--scroll-y-top-corner {
@@ -256,6 +248,27 @@
256
248
  }
257
249
  }
258
250
  }
251
+ &.border--default,
252
+ &.border--inner {
253
+ .vxe-gantt-view--header-column,
254
+ .vxe-gantt-view--body-column,
255
+ .vxe-gantt-view--footer-column {
256
+ background-image: linear-gradient(var(--vxe-ui-table-border-color), var(--vxe-ui-table-border-color));
257
+ background-repeat: no-repeat;
258
+ background-size: 100% var(--vxe-ui-table-border-width);
259
+ background-position: right bottom;
260
+ }
261
+ }
262
+ &.border--inner {
263
+ .vxe-gantt--border-line {
264
+ border-width: 0 0 1px 0;
265
+ }
266
+ }
267
+ &.border--none {
268
+ .vxe-gantt--border-line {
269
+ display: none;
270
+ }
271
+ }
259
272
  }
260
273
 
261
274
  /*分割条*/
@@ -518,9 +531,6 @@
518
531
  float: left;
519
532
  }
520
533
  }
521
- .vxe-gantt-view--header-table {
522
- height: 100%;
523
- }
524
534
  .vxe-gantt-view--header-table,
525
535
  .vxe-gantt-view--body-table {
526
536
  border: 0;
@@ -531,6 +541,9 @@
531
541
  width: var(--vxe-ui-gantt-view-default-cell-width);
532
542
  }
533
543
  }
544
+ .vxe-gantt-view--header-wrapper {
545
+ background-color: var(--vxe-ui-table-header-background-color);
546
+ }
534
547
  .vxe-gantt-view--header-wrapper,
535
548
  .vxe-gantt-view--body-wrapper {
536
549
  overflow: hidden;
@@ -556,9 +569,6 @@
556
569
  text-align: center;
557
570
  font-size: 1em;
558
571
  }
559
- .vxe-gantt-view--body-column {
560
- height: 48px;
561
- }
562
572
  .vxe-gantt-view--header-column,
563
573
  .vxe-gantt-view--body-column,
564
574
  .vxe-gantt-view--footer-column {
@@ -1,7 +0,0 @@
1
- import { VxeUI } from '@vxe-ui/core';
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, taskSplitConfig: Object });
@@ -1,298 +0,0 @@
1
- import { VxeUI } from '@vxe-ui/core';
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 _core = require("@vxe-ui/core");
8
- var _tableProps = require("./table-props");
9
- const {
10
- getConfig
11
- } = _core.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 _core=require("@vxe-ui/core"),_tableProps=require("./table-props");let getConfig=_core.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,14 +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
- taskSplitConfig: Object
14
- });
@@ -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,taskSplitConfig:Object});