vxe-gantt 0.0.3 → 3.0.0-beta.0
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/README.md +14 -46
- package/es/components.js +3 -2
- package/es/gantt/src/gantt-body.js +83 -49
- package/es/gantt/src/gantt-chart.js +91 -43
- package/es/gantt/src/gantt-header.js +63 -36
- package/es/gantt/src/gantt-view.js +638 -586
- package/es/gantt/src/gantt.js +1347 -1178
- package/es/gantt/src/util.js +1 -4
- package/es/gantt/style.css +42 -17
- package/es/gantt/style.min.css +1 -1
- package/es/index.esm.js +5 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +9 -3
- package/es/ui/src/comp.js +1 -2
- package/es/ui/src/log.js +3 -2
- package/es/ui/src/utils.js +17 -17
- package/es/vxe-gantt/style.css +42 -17
- package/es/vxe-gantt/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/components.js +20 -19
- package/lib/components.min.js +1 -1
- package/lib/gantt/index.js +3 -3
- package/lib/gantt/index.min.js +1 -1
- package/lib/gantt/src/gantt-body.js +109 -87
- package/lib/gantt/src/gantt-body.min.js +1 -1
- package/lib/gantt/src/gantt-chart.js +109 -69
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt-header.js +75 -56
- package/lib/gantt/src/gantt-header.min.js +1 -1
- package/lib/gantt/src/gantt-view.js +684 -686
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +1631 -1559
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/gantt/src/util.js +1 -4
- package/lib/gantt/src/util.min.js +1 -1
- package/lib/gantt/style/style.css +42 -17
- package/lib/gantt/style/style.min.css +1 -1
- package/lib/index.common.js +12 -7
- package/lib/index.umd.js +10705 -5870
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +12 -16
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/comp.js +3 -2
- package/lib/ui/src/comp.min.js +1 -1
- package/lib/ui/src/dom.js +33 -33
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +4 -3
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/utils.js +21 -24
- package/lib/ui/src/utils.min.js +1 -1
- package/lib/vxe-gantt/index.js +4 -2
- package/lib/vxe-gantt/index.min.js +1 -1
- package/lib/vxe-gantt/style/style.css +42 -17
- package/lib/vxe-gantt/style/style.min.css +1 -1
- package/lib/vxe-ui/index.js +4 -2
- package/lib/vxe-ui/index.min.js +1 -1
- package/package.json +13 -13
- package/packages/components.ts +8 -5
- package/packages/gantt/index.ts +2 -2
- package/packages/gantt/src/gantt-body.ts +89 -53
- package/packages/gantt/src/gantt-chart.ts +100 -49
- package/packages/gantt/src/gantt-header.ts +69 -39
- package/packages/gantt/src/gantt-view.ts +692 -624
- package/packages/gantt/src/gantt.ts +1460 -1240
- package/packages/gantt/src/util.ts +1 -4
- package/packages/index.ts +6 -2
- package/packages/ui/index.ts +9 -3
- package/packages/ui/src/comp.ts +2 -2
- package/packages/ui/src/log.ts +3 -1
- package/packages/ui/src/utils.ts +22 -21
- package/styles/components/gantt-module/gantt-chart.scss +28 -9
- package/styles/components/gantt.scss +12 -7
- package/styles/theme/base.scss +5 -1
- package/types/all.d.ts +3 -3
- package/types/index.d.ts +2 -2
- package/README.en.md +0 -72
- package/README.ja-JP.md +0 -72
- package/README.zh-TW.md +0 -73
- package/es/gantt/src/emits.js +0 -4
- package/es/gantt/src/grid-emits.js +0 -16
- package/es/gantt/src/grid-props.js +0 -7
- package/es/gantt/src/props.js +0 -2
- package/es/gantt/src/table-emits.js +0 -97
- package/es/gantt/src/table-props.js +0 -298
- package/lib/gantt/src/emits.js +0 -8
- package/lib/gantt/src/emits.min.js +0 -1
- package/lib/gantt/src/grid-emits.js +0 -8
- package/lib/gantt/src/grid-emits.min.js +0 -1
- package/lib/gantt/src/grid-props.js +0 -24
- package/lib/gantt/src/grid-props.min.js +0 -1
- package/lib/gantt/src/props.js +0 -13
- package/lib/gantt/src/props.min.js +0 -1
- package/lib/gantt/src/table-emits.js +0 -7
- package/lib/gantt/src/table-emits.min.js +0 -1
- package/lib/gantt/src/table-props.js +0 -306
- package/lib/gantt/src/table-props.min.js +0 -1
- package/packages/gantt/src/emits.ts +0 -7
- package/packages/gantt/src/grid-emits.ts +0 -19
- package/packages/gantt/src/grid-props.ts +0 -23
- package/packages/gantt/src/props.ts +0 -13
- package/packages/gantt/src/table-emits.ts +0 -109
- package/packages/gantt/src/table-props.ts +0 -304
|
@@ -1,42 +1,63 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateElement } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
|
|
4
|
-
import type { VxeGanttViewConstructor, VxeGanttViewPrivateMethods } from '../../../types'
|
|
4
|
+
import type { VxeGanttViewConstructor, VxeGanttViewPrivateMethods, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types'
|
|
5
5
|
|
|
6
6
|
export default defineVxeComponent({
|
|
7
7
|
name: 'VxeGanttView',
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
inject: {
|
|
9
|
+
$xeGantt: {
|
|
10
|
+
default: null
|
|
11
|
+
},
|
|
12
|
+
$xeGanttView: {
|
|
13
|
+
default: null
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
props: {},
|
|
17
|
+
data () {
|
|
18
|
+
return {}
|
|
19
|
+
},
|
|
20
|
+
computed: {
|
|
21
|
+
...({} as {
|
|
22
|
+
$xeGantt(): (VxeGanttConstructor & VxeGanttPrivateMethods)
|
|
23
|
+
$xeGanttView(): (VxeGanttViewConstructor & VxeGanttViewPrivateMethods)
|
|
24
|
+
})
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
//
|
|
28
|
+
// Render
|
|
29
|
+
//
|
|
30
|
+
renderVN (h: CreateElement) {
|
|
31
|
+
const _vm = this
|
|
32
|
+
const $xeGanttView = _vm.$xeGanttView
|
|
33
|
+
const { reactData } = $xeGanttView
|
|
17
34
|
|
|
18
|
-
|
|
19
|
-
const { tableColumn, headerGroups } = reactData
|
|
35
|
+
const { tableColumn, headerGroups, viewCellWidth } = reactData
|
|
20
36
|
return h('div', {
|
|
21
|
-
ref: refElem,
|
|
37
|
+
ref: 'refElem',
|
|
22
38
|
class: 'vxe-gantt-view--header-wrapper'
|
|
23
39
|
}, [
|
|
24
40
|
h('div', {
|
|
25
|
-
ref: refHeaderScroll,
|
|
41
|
+
ref: 'refHeaderScroll',
|
|
26
42
|
class: 'vxe-gantt-view--header-inner-wrapper',
|
|
27
|
-
|
|
43
|
+
on: {
|
|
44
|
+
scroll: $xeGanttView.triggerHeaderScrollEvent
|
|
45
|
+
}
|
|
28
46
|
}, [
|
|
29
47
|
h('div', {
|
|
30
|
-
ref: refHeaderXSpace,
|
|
48
|
+
ref: 'refHeaderXSpace',
|
|
31
49
|
class: 'vxe-body--x-space'
|
|
32
50
|
}),
|
|
33
51
|
h('table', {
|
|
34
|
-
ref: refHeaderTable,
|
|
52
|
+
ref: 'refHeaderTable',
|
|
35
53
|
class: 'vxe-gantt-view--header-table'
|
|
36
54
|
}, [
|
|
37
55
|
h('colgroup', {}, tableColumn.map((column, cIndex) => {
|
|
38
56
|
return h('col', {
|
|
39
|
-
key: cIndex
|
|
57
|
+
key: cIndex,
|
|
58
|
+
style: {
|
|
59
|
+
width: `${viewCellWidth}px`
|
|
60
|
+
}
|
|
40
61
|
})
|
|
41
62
|
})),
|
|
42
63
|
h('thead', {}, headerGroups.map((cols, rIndex) => {
|
|
@@ -46,8 +67,10 @@ export default defineVxeComponent({
|
|
|
46
67
|
return h('th', {
|
|
47
68
|
key: cIndex,
|
|
48
69
|
class: 'vxe-gantt-view--header-column',
|
|
49
|
-
|
|
50
|
-
|
|
70
|
+
attrs: {
|
|
71
|
+
colspan: column.children ? column.children.length : null,
|
|
72
|
+
title: `${column.field}`
|
|
73
|
+
}
|
|
51
74
|
}, column.title)
|
|
52
75
|
}))
|
|
53
76
|
}))
|
|
@@ -55,25 +78,32 @@ export default defineVxeComponent({
|
|
|
55
78
|
])
|
|
56
79
|
])
|
|
57
80
|
}
|
|
81
|
+
},
|
|
82
|
+
mounted () {
|
|
83
|
+
const _vm = this
|
|
84
|
+
const $xeGanttView = _vm.$xeGanttView
|
|
85
|
+
const { internalData } = $xeGanttView
|
|
58
86
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const prefix = 'main-header-'
|
|
71
|
-
elemStore[`${prefix}wrapper`] = null
|
|
72
|
-
elemStore[`${prefix}scroll`] = null
|
|
73
|
-
elemStore[`${prefix}table`] = null
|
|
74
|
-
elemStore[`${prefix}xSpace`] = null
|
|
75
|
-
})
|
|
87
|
+
const { elemStore } = internalData
|
|
88
|
+
const prefix = 'main-header-'
|
|
89
|
+
elemStore[`${prefix}wrapper`] = _vm.$refs.refElem as HTMLDivElement
|
|
90
|
+
elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll as HTMLDivElement
|
|
91
|
+
elemStore[`${prefix}table`] = _vm.$refs.refHeaderTable as HTMLDivElement
|
|
92
|
+
elemStore[`${prefix}xSpace`] = _vm.$refs.refHeaderXSpace as HTMLDivElement
|
|
93
|
+
},
|
|
94
|
+
destroyed () {
|
|
95
|
+
const _vm = this
|
|
96
|
+
const $xeGanttView = _vm.$xeGanttView
|
|
97
|
+
const { internalData } = $xeGanttView
|
|
76
98
|
|
|
77
|
-
|
|
99
|
+
const { elemStore } = internalData
|
|
100
|
+
const prefix = 'main-header-'
|
|
101
|
+
elemStore[`${prefix}wrapper`] = null
|
|
102
|
+
elemStore[`${prefix}scroll`] = null
|
|
103
|
+
elemStore[`${prefix}table`] = null
|
|
104
|
+
elemStore[`${prefix}xSpace`] = null
|
|
105
|
+
},
|
|
106
|
+
render (this: any, h) {
|
|
107
|
+
return this.renderVN(h)
|
|
78
108
|
}
|
|
79
109
|
})
|