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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { tableEmits } from './table-emits'
|
|
2
|
+
|
|
3
|
+
import type { VxeGridEmits } from 'vxe-table'
|
|
4
|
+
|
|
5
|
+
export const gridEmits: VxeGridEmits = [
|
|
6
|
+
...tableEmits,
|
|
7
|
+
'page-change',
|
|
8
|
+
'form-submit',
|
|
9
|
+
'form-submit-invalid',
|
|
10
|
+
'form-reset',
|
|
11
|
+
'form-collapse',
|
|
12
|
+
'form-toggle-collapse',
|
|
13
|
+
'proxy-query',
|
|
14
|
+
'proxy-delete',
|
|
15
|
+
'proxy-save',
|
|
16
|
+
'toolbar-button-click',
|
|
17
|
+
'toolbar-tool-click',
|
|
18
|
+
'zoom'
|
|
19
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import { PropType } from 'vue'
|
|
3
|
+
import { VxeUI } from '../../ui'
|
|
4
|
+
import { tableProps } from './table-props'
|
|
5
|
+
|
|
6
|
+
import type { VxeGridPropTypes } from 'vxe-table'
|
|
7
|
+
|
|
8
|
+
const { getConfig } = VxeUI
|
|
9
|
+
|
|
10
|
+
export const gridProps = {
|
|
11
|
+
...tableProps,
|
|
12
|
+
layouts: Array as PropType<VxeGridPropTypes.Layouts>,
|
|
13
|
+
columns: Array as PropType<VxeGridPropTypes.Columns<any>>,
|
|
14
|
+
pagerConfig: Object as PropType<VxeGridPropTypes.PagerConfig>,
|
|
15
|
+
proxyConfig: Object as PropType<VxeGridPropTypes.ProxyConfig<any>>,
|
|
16
|
+
toolbarConfig: Object as PropType<VxeGridPropTypes.ToolbarConfig>,
|
|
17
|
+
formConfig: Object as PropType<VxeGridPropTypes.FormConfig>,
|
|
18
|
+
zoomConfig: Object as PropType<VxeGridPropTypes.ZoomConfig>,
|
|
19
|
+
size: {
|
|
20
|
+
type: String as PropType<VxeGridPropTypes.Size>,
|
|
21
|
+
default: () => getConfig().gantt.size || getConfig().size
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropType } from 'vue'
|
|
2
|
+
import { gridProps } from './grid-props'
|
|
3
|
+
|
|
4
|
+
import type { VxeGanttPropTypes } from '../../../types'
|
|
5
|
+
|
|
6
|
+
export const ganttProps = {
|
|
7
|
+
...gridProps,
|
|
8
|
+
|
|
9
|
+
layouts: Array as PropType<VxeGanttPropTypes.Layouts>,
|
|
10
|
+
taskConfig: Object as PropType<VxeGanttPropTypes.TaskConfig>,
|
|
11
|
+
taskViewConfig: Object as PropType<VxeGanttPropTypes.TaskViewConfig>,
|
|
12
|
+
taskBarConfig: Object as PropType<VxeGanttPropTypes.TaskBarConfig>
|
|
13
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { VxeTableEmits } from 'vxe-table'
|
|
2
|
+
|
|
3
|
+
export const tableEmits: VxeTableEmits = [
|
|
4
|
+
'update:data',
|
|
5
|
+
'keydown-start',
|
|
6
|
+
'keydown',
|
|
7
|
+
'keydown-end',
|
|
8
|
+
'paste',
|
|
9
|
+
'copy',
|
|
10
|
+
'cut',
|
|
11
|
+
|
|
12
|
+
'current-change', // 已废弃
|
|
13
|
+
|
|
14
|
+
'current-row-change',
|
|
15
|
+
'current-row-disabled',
|
|
16
|
+
'current-column-change',
|
|
17
|
+
'current-column-disabled',
|
|
18
|
+
'radio-change',
|
|
19
|
+
'checkbox-change',
|
|
20
|
+
'checkbox-all',
|
|
21
|
+
'checkbox-range-start',
|
|
22
|
+
'checkbox-range-change',
|
|
23
|
+
'checkbox-range-end',
|
|
24
|
+
'checkbox-range-select',
|
|
25
|
+
'cell-click',
|
|
26
|
+
'cell-dblclick',
|
|
27
|
+
'cell-menu',
|
|
28
|
+
'cell-mouseenter',
|
|
29
|
+
'cell-mouseleave',
|
|
30
|
+
'cell-selected',
|
|
31
|
+
'cell-delete-value',
|
|
32
|
+
'cell-backspace-value',
|
|
33
|
+
'header-cell-click',
|
|
34
|
+
'header-cell-dblclick',
|
|
35
|
+
'header-cell-menu',
|
|
36
|
+
'footer-cell-click',
|
|
37
|
+
'footer-cell-dblclick',
|
|
38
|
+
'footer-cell-menu',
|
|
39
|
+
'clear-merge',
|
|
40
|
+
'sort-change',
|
|
41
|
+
'clear-sort',
|
|
42
|
+
'clear-all-sort',
|
|
43
|
+
'filter-change',
|
|
44
|
+
'filter-visible',
|
|
45
|
+
'clear-filter',
|
|
46
|
+
'clear-all-filter',
|
|
47
|
+
|
|
48
|
+
'resizable-change', // 废弃
|
|
49
|
+
|
|
50
|
+
'column-resizable-change',
|
|
51
|
+
'row-resizable-change',
|
|
52
|
+
'toggle-row-group-expand',
|
|
53
|
+
'toggle-row-expand',
|
|
54
|
+
'toggle-tree-expand',
|
|
55
|
+
'menu-click',
|
|
56
|
+
'edit-closed',
|
|
57
|
+
|
|
58
|
+
'row-dragstart',
|
|
59
|
+
'row-dragover',
|
|
60
|
+
'row-dragend',
|
|
61
|
+
'column-dragstart',
|
|
62
|
+
'column-dragover',
|
|
63
|
+
'column-dragend',
|
|
64
|
+
|
|
65
|
+
'enter-append-row',
|
|
66
|
+
|
|
67
|
+
'edit-actived', // 废弃
|
|
68
|
+
|
|
69
|
+
'edit-activated',
|
|
70
|
+
'edit-disabled',
|
|
71
|
+
'valid-error',
|
|
72
|
+
'scroll',
|
|
73
|
+
'scroll-boundary',
|
|
74
|
+
'custom',
|
|
75
|
+
'custom-visible-change',
|
|
76
|
+
'custom-visible-all',
|
|
77
|
+
'custom-fixed-change',
|
|
78
|
+
|
|
79
|
+
'change-fnr', // 废弃
|
|
80
|
+
|
|
81
|
+
'open-fnr',
|
|
82
|
+
'show-fnr',
|
|
83
|
+
'hide-fnr',
|
|
84
|
+
'fnr-change',
|
|
85
|
+
'fnr-find',
|
|
86
|
+
'fnr-find-all',
|
|
87
|
+
'fnr-replace',
|
|
88
|
+
'fnr-replace-all',
|
|
89
|
+
'cell-area-copy',
|
|
90
|
+
'cell-area-cut',
|
|
91
|
+
'cell-area-paste',
|
|
92
|
+
'cell-area-merge',
|
|
93
|
+
'clear-cell-area-selection',
|
|
94
|
+
'clear-cell-area-merge',
|
|
95
|
+
'header-cell-area-selection',
|
|
96
|
+
'cell-area-selection-invalid',
|
|
97
|
+
'cell-area-selection-start',
|
|
98
|
+
'cell-area-selection-drag',
|
|
99
|
+
'cell-area-selection-end',
|
|
100
|
+
'cell-area-extension-start',
|
|
101
|
+
'cell-area-extension-drag',
|
|
102
|
+
'cell-area-extension-end',
|
|
103
|
+
'cell-area-selection-all-start',
|
|
104
|
+
'cell-area-selection-all-end',
|
|
105
|
+
'cell-area-arrows-start',
|
|
106
|
+
'cell-area-arrows-end',
|
|
107
|
+
'active-cell-change-start',
|
|
108
|
+
'active-cell-change-end'
|
|
109
|
+
]
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { PropType } from 'vue'
|
|
2
|
+
import { VxeUI } from '../../ui'
|
|
3
|
+
|
|
4
|
+
import type { VxeTablePropTypes } from 'vxe-table'
|
|
5
|
+
|
|
6
|
+
const { getConfig } = VxeUI
|
|
7
|
+
|
|
8
|
+
export const tableProps = {
|
|
9
|
+
/** 基本属性 */
|
|
10
|
+
id: [String, Function] as PropType<VxeTablePropTypes.ID>,
|
|
11
|
+
// 数据
|
|
12
|
+
data: Array as PropType<any[]>,
|
|
13
|
+
// 表格的高度
|
|
14
|
+
height: [Number, String] as PropType<VxeTablePropTypes.Height>,
|
|
15
|
+
// 表格的最小高度
|
|
16
|
+
minHeight: {
|
|
17
|
+
type: [Number, String] as PropType<VxeTablePropTypes.MinHeight>,
|
|
18
|
+
default: () => getConfig().table.minHeight
|
|
19
|
+
},
|
|
20
|
+
// 表格的最大高度
|
|
21
|
+
maxHeight: [Number, String] as PropType<VxeTablePropTypes.MaxHeight>,
|
|
22
|
+
// 已废弃,被 column-config.resizable 替换
|
|
23
|
+
resizable: {
|
|
24
|
+
type: Boolean as PropType<VxeTablePropTypes.Resizable>,
|
|
25
|
+
default: () => getConfig().table.resizable
|
|
26
|
+
},
|
|
27
|
+
// 是否带有斑马纹
|
|
28
|
+
stripe: {
|
|
29
|
+
type: Boolean as PropType<VxeTablePropTypes.Stripe>,
|
|
30
|
+
default: () => getConfig().table.stripe
|
|
31
|
+
},
|
|
32
|
+
// 是否带有边框
|
|
33
|
+
border: {
|
|
34
|
+
type: [Boolean, String] as PropType<VxeTablePropTypes.Border>,
|
|
35
|
+
default: () => getConfig().table.border
|
|
36
|
+
},
|
|
37
|
+
// 已废弃,被 cell-config.padding 替换
|
|
38
|
+
padding: {
|
|
39
|
+
type: Boolean as PropType<VxeTablePropTypes.Padding>,
|
|
40
|
+
default: null
|
|
41
|
+
},
|
|
42
|
+
// 是否圆角边框
|
|
43
|
+
round: {
|
|
44
|
+
type: Boolean as PropType<VxeTablePropTypes.Round>,
|
|
45
|
+
default: () => getConfig().table.round
|
|
46
|
+
},
|
|
47
|
+
// 表格的尺寸
|
|
48
|
+
size: {
|
|
49
|
+
type: String as PropType<VxeTablePropTypes.Size>,
|
|
50
|
+
default: () => getConfig().table.size || getConfig().size
|
|
51
|
+
},
|
|
52
|
+
// 列的宽度是否自撑开(可能会被废弃的参数,不要使用)
|
|
53
|
+
fit: {
|
|
54
|
+
type: Boolean as PropType<VxeTablePropTypes.Fit>,
|
|
55
|
+
default: () => getConfig().table.fit
|
|
56
|
+
},
|
|
57
|
+
// 表格是否加载中
|
|
58
|
+
loading: Boolean as PropType<VxeTablePropTypes.Loading>,
|
|
59
|
+
// 所有的列对其方式
|
|
60
|
+
align: {
|
|
61
|
+
type: String as PropType<VxeTablePropTypes.Align>,
|
|
62
|
+
default: () => getConfig().table.align
|
|
63
|
+
},
|
|
64
|
+
// 所有的表头列的对齐方式
|
|
65
|
+
headerAlign: {
|
|
66
|
+
type: String as PropType<VxeTablePropTypes.HeaderAlign>,
|
|
67
|
+
default: () => getConfig().table.headerAlign
|
|
68
|
+
},
|
|
69
|
+
// 所有的表尾列的对齐方式
|
|
70
|
+
footerAlign: {
|
|
71
|
+
type: String as PropType<VxeTablePropTypes.FooterAlign>,
|
|
72
|
+
default: () => getConfig().table.footerAlign
|
|
73
|
+
},
|
|
74
|
+
// 是否显示表头
|
|
75
|
+
showHeader: {
|
|
76
|
+
type: Boolean as PropType<VxeTablePropTypes.ShowHeader>,
|
|
77
|
+
default: () => getConfig().table.showHeader
|
|
78
|
+
},
|
|
79
|
+
// (即将废弃)是否要高亮当前选中行
|
|
80
|
+
highlightCurrentRow: {
|
|
81
|
+
type: Boolean as PropType<VxeTablePropTypes.HighlightCurrentRow>,
|
|
82
|
+
default: () => getConfig().table.highlightCurrentRow
|
|
83
|
+
},
|
|
84
|
+
// (即将废弃)鼠标移到行是否要高亮显示
|
|
85
|
+
highlightHoverRow: {
|
|
86
|
+
type: Boolean as PropType<VxeTablePropTypes.HighlightHoverRow>,
|
|
87
|
+
default: () => getConfig().table.highlightHoverRow
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* (即将废弃)是否要高亮当前选中列
|
|
91
|
+
* @deprecated
|
|
92
|
+
*/
|
|
93
|
+
highlightCurrentColumn: {
|
|
94
|
+
type: Boolean as PropType<VxeTablePropTypes.HighlightCurrentColumn>,
|
|
95
|
+
default: () => getConfig().table.highlightCurrentColumn
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* (即将废弃)鼠标移到列是否要高亮显示
|
|
99
|
+
* @deprecated
|
|
100
|
+
*/
|
|
101
|
+
highlightHoverColumn: {
|
|
102
|
+
type: Boolean as PropType<VxeTablePropTypes.HighlightHoverColumn>,
|
|
103
|
+
default: () => getConfig().table.highlightHoverColumn
|
|
104
|
+
},
|
|
105
|
+
// (即将废弃)激活单元格编辑时是否高亮显示
|
|
106
|
+
highlightCell: Boolean as PropType<VxeTablePropTypes.HighlightCell>,
|
|
107
|
+
// 是否显示表尾合计
|
|
108
|
+
showFooter: Boolean as PropType<VxeTablePropTypes.ShowFooter>,
|
|
109
|
+
// 表尾数据
|
|
110
|
+
footerData: Array as PropType<VxeTablePropTypes.FooterData>,
|
|
111
|
+
// 表尾合计的计算方法
|
|
112
|
+
footerMethod: Function as PropType<VxeTablePropTypes.FooterMethod>,
|
|
113
|
+
// 给行附加 className
|
|
114
|
+
rowClassName: [String, Function] as PropType<VxeTablePropTypes.RowClassName>,
|
|
115
|
+
// 给单元格附加 className
|
|
116
|
+
cellClassName: [String, Function] as PropType<VxeTablePropTypes.CellClassName>,
|
|
117
|
+
// 给表头的行附加 className
|
|
118
|
+
headerRowClassName: [String, Function] as PropType<VxeTablePropTypes.HeaderRowClassName>,
|
|
119
|
+
// 给表头的单元格附加 className
|
|
120
|
+
headerCellClassName: [String, Function] as PropType<VxeTablePropTypes.HeaderRowClassName>,
|
|
121
|
+
// 给表尾的行附加 className
|
|
122
|
+
footerRowClassName: [String, Function] as PropType<VxeTablePropTypes.FooterRowClassName>,
|
|
123
|
+
// 给表尾的单元格附加 className
|
|
124
|
+
footerCellClassName: [String, Function] as PropType<VxeTablePropTypes.FooterCellClassName>,
|
|
125
|
+
// 给单元格附加样式
|
|
126
|
+
cellStyle: [Object, Function] as PropType<VxeTablePropTypes.CellStyle>,
|
|
127
|
+
// 给表头单元格附加样式
|
|
128
|
+
headerCellStyle: [Object, Function] as PropType<VxeTablePropTypes.HeaderCellStyle>,
|
|
129
|
+
// 给表尾单元格附加样式
|
|
130
|
+
footerCellStyle: [Object, Function] as PropType<VxeTablePropTypes.FooterCellStyle>,
|
|
131
|
+
// 给行附加样式
|
|
132
|
+
rowStyle: [Object, Function] as PropType<VxeTablePropTypes.RowStyle>,
|
|
133
|
+
// 给表头行附加样式
|
|
134
|
+
headerRowStyle: [Object, Function] as PropType<VxeTablePropTypes.HeaderRowStyle>,
|
|
135
|
+
// 给表尾行附加样式
|
|
136
|
+
footerRowStyle: [Object, Function] as PropType<VxeTablePropTypes.FooterRowStyle>,
|
|
137
|
+
// 合并指定单元格
|
|
138
|
+
mergeCells: Array as PropType<VxeTablePropTypes.MergeCells>,
|
|
139
|
+
// 合并指定的表尾
|
|
140
|
+
mergeFooterItems: Array as PropType<VxeTablePropTypes.MergeFooterItems>,
|
|
141
|
+
// 自定义合并行或列的方法
|
|
142
|
+
spanMethod: Function as PropType<VxeTablePropTypes.SpanMethod>,
|
|
143
|
+
// 表尾合并行或列
|
|
144
|
+
footerSpanMethod: Function as PropType<VxeTablePropTypes.FooterSpanMethod>,
|
|
145
|
+
// 设置所有内容过长时显示为省略号
|
|
146
|
+
showOverflow: {
|
|
147
|
+
type: [Boolean, String] as PropType<VxeTablePropTypes.ShowOverflow>,
|
|
148
|
+
default: () => getConfig().table.showOverflow
|
|
149
|
+
},
|
|
150
|
+
// 设置表头所有内容过长时显示为省略号
|
|
151
|
+
showHeaderOverflow: {
|
|
152
|
+
type: [Boolean, String] as PropType<VxeTablePropTypes.ShowHeaderOverflow>,
|
|
153
|
+
default: () => getConfig().table.showHeaderOverflow
|
|
154
|
+
},
|
|
155
|
+
// 设置表尾所有内容过长时显示为省略号
|
|
156
|
+
showFooterOverflow: {
|
|
157
|
+
type: [Boolean, String] as PropType<VxeTablePropTypes.ShowFooterOverflow>,
|
|
158
|
+
default: () => getConfig().table.showFooterOverflow
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
/** 高级属性 */
|
|
162
|
+
/**
|
|
163
|
+
* (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
|
|
164
|
+
* @deprecated
|
|
165
|
+
*/
|
|
166
|
+
columnKey: Boolean as PropType<VxeTablePropTypes.ColumnKey>,
|
|
167
|
+
/**
|
|
168
|
+
* (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
|
|
169
|
+
* @deprecated
|
|
170
|
+
*/
|
|
171
|
+
rowKey: Boolean as PropType<VxeTablePropTypes.RowKey>,
|
|
172
|
+
/**
|
|
173
|
+
* (即将废弃)rowId 已废弃,被 row-config.keyField 替换
|
|
174
|
+
* @deprecated
|
|
175
|
+
*/
|
|
176
|
+
rowId: {
|
|
177
|
+
type: String as PropType<VxeTablePropTypes.RowId>,
|
|
178
|
+
default: () => getConfig().table.rowId
|
|
179
|
+
},
|
|
180
|
+
zIndex: Number as PropType<VxeTablePropTypes.ZIndex>,
|
|
181
|
+
emptyText: {
|
|
182
|
+
type: String as PropType<VxeTablePropTypes.EmptyText>,
|
|
183
|
+
default: () => getConfig().table.emptyText
|
|
184
|
+
},
|
|
185
|
+
keepSource: {
|
|
186
|
+
type: Boolean as PropType<VxeTablePropTypes.KeepSource>,
|
|
187
|
+
default: () => getConfig().table.keepSource
|
|
188
|
+
},
|
|
189
|
+
// 是否自动监听父容器变化去更新响应式表格宽高
|
|
190
|
+
autoResize: {
|
|
191
|
+
type: Boolean as PropType<VxeTablePropTypes.AutoResize>,
|
|
192
|
+
default: () => getConfig().table.autoResize
|
|
193
|
+
},
|
|
194
|
+
// 是否自动根据状态属性去更新响应式表格宽高
|
|
195
|
+
syncResize: [Boolean, String, Number],
|
|
196
|
+
// 响应式布局配置项
|
|
197
|
+
resizeConfig: Object as PropType<VxeTablePropTypes.ResizeConfig>,
|
|
198
|
+
// 列配置项
|
|
199
|
+
columnConfig: Object as PropType<VxeTablePropTypes.ColumnConfig>,
|
|
200
|
+
// 当前列配置项
|
|
201
|
+
currentColumnConfig: Object as PropType<VxeTablePropTypes.CurrentColumnConfig>,
|
|
202
|
+
// 单元格配置项
|
|
203
|
+
cellConfig: Object as PropType<VxeTablePropTypes.CellConfig>,
|
|
204
|
+
// 表头单元格配置项
|
|
205
|
+
headerCellConfig: Object as PropType<VxeTablePropTypes.HeaderCellConfig>,
|
|
206
|
+
// 表尾单元格配置项
|
|
207
|
+
footerCellConfig: Object as PropType<VxeTablePropTypes.FooterCellConfig>,
|
|
208
|
+
// 行配置项
|
|
209
|
+
rowConfig: Object as PropType<VxeTablePropTypes.RowConfig>,
|
|
210
|
+
// 数据聚合配置项
|
|
211
|
+
aggregateConfig: Object as PropType<VxeTablePropTypes.AggregateConfig>,
|
|
212
|
+
/**
|
|
213
|
+
* 已废弃,被 aggregateConfig 替换
|
|
214
|
+
* @deprecated
|
|
215
|
+
*/
|
|
216
|
+
rowGroupConfig: Object as PropType<VxeTablePropTypes.RowGroupConfig>,
|
|
217
|
+
// 当前行配置项
|
|
218
|
+
currentRowConfig: Object as PropType<VxeTablePropTypes.CurrentRowConfig>,
|
|
219
|
+
/**
|
|
220
|
+
* 已废弃,被 rowDragConfig 替换
|
|
221
|
+
* @deprecated
|
|
222
|
+
*/
|
|
223
|
+
dragConfig: Object as PropType<VxeTablePropTypes.DragConfig>,
|
|
224
|
+
// 行拖拽排序配置项
|
|
225
|
+
rowDragConfig: Object as PropType<VxeTablePropTypes.RowDragConfig>,
|
|
226
|
+
// 列拖拽排序配置项
|
|
227
|
+
columnDragConfig: Object as PropType<VxeTablePropTypes.ColumnDragConfig>,
|
|
228
|
+
// 列调整配置项
|
|
229
|
+
resizableConfig: Object as PropType<VxeTablePropTypes.ResizableConfig>,
|
|
230
|
+
// 序号配置项
|
|
231
|
+
seqConfig: Object as PropType<VxeTablePropTypes.SeqConfig>,
|
|
232
|
+
// 排序配置项
|
|
233
|
+
sortConfig: Object as PropType<VxeTablePropTypes.SortConfig>,
|
|
234
|
+
// 筛选配置项
|
|
235
|
+
filterConfig: Object as PropType<VxeTablePropTypes.FilterConfig>,
|
|
236
|
+
// 单选框配置
|
|
237
|
+
radioConfig: Object as PropType<VxeTablePropTypes.RadioConfig>,
|
|
238
|
+
// 复选框配置项
|
|
239
|
+
checkboxConfig: Object as PropType<VxeTablePropTypes.CheckboxConfig>,
|
|
240
|
+
// tooltip 配置项
|
|
241
|
+
tooltipConfig: Object as PropType<VxeTablePropTypes.TooltipConfig>,
|
|
242
|
+
// 导出配置项
|
|
243
|
+
exportConfig: Object as PropType<VxeTablePropTypes.ExportConfig>,
|
|
244
|
+
// 导入配置项
|
|
245
|
+
importConfig: Object as PropType<VxeTablePropTypes.ImportConfig>,
|
|
246
|
+
// 打印配置项
|
|
247
|
+
printConfig: Object as PropType<VxeTablePropTypes.PrintConfig>,
|
|
248
|
+
// 展开行配置项
|
|
249
|
+
expandConfig: Object as PropType<VxeTablePropTypes.ExpandConfig>,
|
|
250
|
+
// 树形结构配置项
|
|
251
|
+
treeConfig: Object as PropType<VxeTablePropTypes.TreeConfig>,
|
|
252
|
+
// 快捷菜单配置项
|
|
253
|
+
menuConfig: Object as PropType<VxeTablePropTypes.MenuConfig>,
|
|
254
|
+
// 鼠标配置项
|
|
255
|
+
mouseConfig: Object as PropType<VxeTablePropTypes.MouseConfig>,
|
|
256
|
+
// 区域配置项
|
|
257
|
+
areaConfig: Object as PropType<VxeTablePropTypes.AreaConfig>,
|
|
258
|
+
// 按键配置项
|
|
259
|
+
keyboardConfig: Object as PropType<VxeTablePropTypes.KeyboardConfig<any>>,
|
|
260
|
+
// 复制粘/贴配置项
|
|
261
|
+
clipConfig: Object as PropType<VxeTablePropTypes.ClipConfig<any>>,
|
|
262
|
+
// 查找/替换配置项
|
|
263
|
+
fnrConfig: Object as PropType<VxeTablePropTypes.FNRConfig>,
|
|
264
|
+
// 编辑配置项
|
|
265
|
+
editConfig: Object as PropType<VxeTablePropTypes.EditConfig<any>>,
|
|
266
|
+
// 校验配置项
|
|
267
|
+
validConfig: Object as PropType<VxeTablePropTypes.ValidConfig>,
|
|
268
|
+
// 校验规则配置项
|
|
269
|
+
editRules: Object as PropType<VxeTablePropTypes.EditRules>,
|
|
270
|
+
// 加载中配置项
|
|
271
|
+
loadingConfig: Object as PropType<VxeTablePropTypes.LoadingConfig>,
|
|
272
|
+
// 空内容渲染配置项
|
|
273
|
+
emptyRender: Object as PropType<VxeTablePropTypes.EmptyRender>,
|
|
274
|
+
// 自定义列配置项
|
|
275
|
+
customConfig: Object as PropType<VxeTablePropTypes.CustomConfig>,
|
|
276
|
+
/**
|
|
277
|
+
* (即将废弃)横向虚拟滚动配置项
|
|
278
|
+
* @deprecated
|
|
279
|
+
*/
|
|
280
|
+
scrollX: Object as PropType<VxeTablePropTypes.ScrollX>,
|
|
281
|
+
/**
|
|
282
|
+
* (即将废弃)纵向虚拟滚动配置项
|
|
283
|
+
* @deprecated
|
|
284
|
+
*/
|
|
285
|
+
scrollY: Object as PropType<VxeTablePropTypes.ScrollY>,
|
|
286
|
+
// 横向虚拟滚动配置项
|
|
287
|
+
virtualXConfig: Object as PropType<VxeTablePropTypes.VirtualXConfig>,
|
|
288
|
+
// 纵向虚拟滚动配置项
|
|
289
|
+
virtualYConfig: Object as PropType<VxeTablePropTypes.VirtualYConfig>,
|
|
290
|
+
// 滚动条配置项
|
|
291
|
+
scrollbarConfig: Object as PropType<VxeTablePropTypes.ScrollbarConfig>,
|
|
292
|
+
// (即将废弃)优化相关
|
|
293
|
+
animat: {
|
|
294
|
+
type: Boolean as PropType<VxeTablePropTypes.Animat>,
|
|
295
|
+
default: () => getConfig().table.animat
|
|
296
|
+
},
|
|
297
|
+
// (可能会被废弃的参数,不要使用)
|
|
298
|
+
delayHover: {
|
|
299
|
+
type: Number as PropType<VxeTablePropTypes.DelayHover>,
|
|
300
|
+
default: () => getConfig().table.delayHover as number
|
|
301
|
+
},
|
|
302
|
+
// 额外的参数
|
|
303
|
+
params: Object as PropType<VxeTablePropTypes.Params>
|
|
304
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { VxeTableDefines, VxeTablePropTypes } from 'vxe-table'
|
|
2
|
+
|
|
3
|
+
export function getRefElem (refEl: any) {
|
|
4
|
+
if (refEl) {
|
|
5
|
+
const rest = refEl.value
|
|
6
|
+
if (rest) {
|
|
7
|
+
return (rest.$el || rest) as HTMLElement
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return null
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function getCellRestHeight (rowRest: VxeTableDefines.RowCacheItem, cellOpts: VxeTablePropTypes.CellConfig, rowOpts: VxeTablePropTypes.RowConfig, defaultRowHeight: number) {
|
|
14
|
+
return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
|
|
15
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { VxeUI, setConfig, setIcon } from '@vxe-ui/core'
|
|
2
|
+
|
|
3
|
+
VxeUI.ganttVersion = process.env.VUE_APP_VXE_VERSION as string
|
|
4
|
+
|
|
5
|
+
setConfig({
|
|
6
|
+
gantt: {
|
|
7
|
+
// size: null,
|
|
8
|
+
// zoomConfig: {
|
|
9
|
+
// escRestore: true
|
|
10
|
+
// },
|
|
11
|
+
formConfig: {
|
|
12
|
+
enabled: true
|
|
13
|
+
},
|
|
14
|
+
pagerConfig: {
|
|
15
|
+
enabled: true
|
|
16
|
+
// perfect: false
|
|
17
|
+
},
|
|
18
|
+
toolbarConfig: {
|
|
19
|
+
enabled: true
|
|
20
|
+
// perfect: false
|
|
21
|
+
},
|
|
22
|
+
proxyConfig: {
|
|
23
|
+
enabled: true,
|
|
24
|
+
autoLoad: true,
|
|
25
|
+
showLoading: true,
|
|
26
|
+
showResponseMsg: true,
|
|
27
|
+
showActionMsg: true,
|
|
28
|
+
response: {
|
|
29
|
+
list: null,
|
|
30
|
+
result: 'result',
|
|
31
|
+
total: 'page.total',
|
|
32
|
+
message: 'message'
|
|
33
|
+
}
|
|
34
|
+
// beforeItem: null,
|
|
35
|
+
// beforeColumn: null,
|
|
36
|
+
// beforeQuery: null,
|
|
37
|
+
// afterQuery: null,
|
|
38
|
+
// beforeDelete: null,
|
|
39
|
+
// afterDelete: null,
|
|
40
|
+
// beforeSave: null,
|
|
41
|
+
// afterSave: null
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
const iconPrefix = 'vxe-icon-'
|
|
47
|
+
|
|
48
|
+
setIcon({
|
|
49
|
+
// gantt
|
|
50
|
+
GANTT_VIEW_LEFT_OPEN: iconPrefix + 'arrow-left',
|
|
51
|
+
GANTT_VIEW_LEFT_CLOSE: iconPrefix + 'arrow-right',
|
|
52
|
+
GANTT_VIEW_RIGHT_OPEN: iconPrefix + 'arrow-right',
|
|
53
|
+
GANTT_VIEW_RIGHT_CLOSE: iconPrefix + 'arrow-left'
|
|
54
|
+
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
export * from '@vxe-ui/core'
|
|
58
|
+
export default VxeUI
|