vxe-gantt 4.0.0-beta.4 → 4.0.0-beta.6
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/es/gantt/src/gantt-view.js +60 -62
- package/es/gantt/src/gantt.js +3 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.js +7 -1
- package/lib/gantt/src/gantt-view.js +60 -69
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +4 -3
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/index.umd.js +96 -96
- package/lib/index.umd.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/vn.js +14 -1
- package/lib/ui/src/vn.min.js +1 -0
- package/package.json +1 -1
- package/packages/gantt/src/gantt-view.ts +67 -68
- package/packages/gantt/src/gantt.ts +3 -1
- package/packages/ui/src/vn.ts +9 -0
package/lib/ui/index.js
CHANGED
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.default=void 0;var _core=require("@vxe-ui/core"),_log=require("./src/log");let{setConfig,setIcon,checkVersion}=_core.VxeUI,iconPrefix=(_core.VxeUI.ganttVersion="4.0.0-beta.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.default=void 0;var _core=require("@vxe-ui/core"),_log=require("./src/log");let{setConfig,setIcon,checkVersion}=_core.VxeUI,iconPrefix=(_core.VxeUI.ganttVersion="4.0.0-beta.6",setConfig({gantt:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showLoading:!0,showResponseMsg:!0,showActionMsg:!0,response:{list:null,result:"result",total:"page.total",message:"message"}},taskSplitConfig:{enabled:!0,resize:!0,showCollapseTableButton:!0,showCollapseTaskButton:!0}}}),"vxe-icon-");setIcon({GANTT_VIEW_LEFT_OPEN:iconPrefix+"arrow-left",GANTT_VIEW_LEFT_CLOSE:iconPrefix+"arrow-right",GANTT_VIEW_RIGHT_OPEN:iconPrefix+"arrow-right",GANTT_VIEW_RIGHT_CLOSE:iconPrefix+"arrow-left"}),checkVersion(_core.VxeUI.tableVersion,4,16)||(0,_log.errLog)("vxe.error.errorVersion",["vxe-table@"+(_core.VxeUI.tableVersion||"?"),"vxe-table v4.16+"]);var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -8,6 +8,6 @@ var _core = require("@vxe-ui/core");
|
|
|
8
8
|
const {
|
|
9
9
|
log
|
|
10
10
|
} = _core.VxeUI;
|
|
11
|
-
const version = `gantt v${"4.0.0-beta.
|
|
11
|
+
const version = `gantt v${"4.0.0-beta.6"}`;
|
|
12
12
|
const warnLog = exports.warnLog = log.create('warn', version);
|
|
13
13
|
const errLog = exports.errLog = log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="gantt v4.0.0-beta.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="gantt v4.0.0-beta.6",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/lib/ui/src/vn.js
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSlotVNs = getSlotVNs;
|
|
7
|
+
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
function getSlotVNs(vns) {
|
|
10
|
+
if (_xeUtils.default.isArray(vns)) {
|
|
11
|
+
return vns;
|
|
12
|
+
}
|
|
13
|
+
return vns ? [vns] : [];
|
|
14
|
+
}
|
package/lib/ui/src/vn.min.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSlotVNs=getSlotVNs;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getSlotVNs(e){return _xeUtils.default.isArray(e)?e:e?[e]:[]}
|
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@ function createInternalData (): GanttViewInternalData {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
const maxYHeight = 5e6
|
|
44
|
-
const maxXWidth = 5e6
|
|
44
|
+
// const maxXWidth = 5e6
|
|
45
45
|
|
|
46
46
|
export default defineVxeComponent({
|
|
47
47
|
name: 'VxeGanttView',
|
|
@@ -75,9 +75,9 @@ export default defineVxeComponent({
|
|
|
75
75
|
// 是否启用了纵向 Y 可视渲染方式加载
|
|
76
76
|
scrollYLoad: false,
|
|
77
77
|
// 是否存在纵向滚动条
|
|
78
|
-
overflowY:
|
|
78
|
+
overflowY: true,
|
|
79
79
|
// 是否存在横向滚动条
|
|
80
|
-
overflowX:
|
|
80
|
+
overflowX: true,
|
|
81
81
|
// 纵向滚动条的宽度
|
|
82
82
|
scrollbarWidth: 0,
|
|
83
83
|
// 横向滚动条的高度
|
|
@@ -430,61 +430,60 @@ export default defineVxeComponent({
|
|
|
430
430
|
return nextTick()
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
-
const updateScrollXSpace = () => {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}
|
|
433
|
+
// const updateScrollXSpace = () => {
|
|
434
|
+
// const { scrollXLoad, scrollXWidth } = reactData
|
|
435
|
+
// const { elemStore } = internalData
|
|
436
|
+
// const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
|
|
437
|
+
// const bodyTableElem = getRefElem(elemStore['main-body-table'])
|
|
438
|
+
|
|
439
|
+
// let xSpaceLeft = 0
|
|
440
|
+
|
|
441
|
+
// let clientWidth = 0
|
|
442
|
+
// if (bodyScrollElem) {
|
|
443
|
+
// clientWidth = bodyScrollElem.clientWidth
|
|
444
|
+
// }
|
|
445
|
+
// // 虚拟渲染
|
|
446
|
+
// let isScrollXBig = false
|
|
447
|
+
// let ySpaceWidth = scrollXWidth
|
|
448
|
+
// if (scrollXWidth > maxXWidth) {
|
|
449
|
+
// // 触右
|
|
450
|
+
// if (bodyScrollElem && bodyTableElem && bodyScrollElem.scrollLeft + clientWidth >= maxXWidth) {
|
|
451
|
+
// xSpaceLeft = maxXWidth - bodyTableElem.clientWidth
|
|
452
|
+
// } else {
|
|
453
|
+
// xSpaceLeft = (maxXWidth - clientWidth) * (xSpaceLeft / (scrollXWidth - clientWidth))
|
|
454
|
+
// }
|
|
455
|
+
// ySpaceWidth = maxXWidth
|
|
456
|
+
// isScrollXBig = true
|
|
457
|
+
// }
|
|
458
|
+
|
|
459
|
+
// if (bodyTableElem) {
|
|
460
|
+
// bodyTableElem.style.transform = `translate(${xSpaceLeft}px, ${reactData.scrollYTop || 0}px)`
|
|
461
|
+
// }
|
|
462
|
+
|
|
463
|
+
// const layoutList = ['header', 'body', 'footer']
|
|
464
|
+
// layoutList.forEach(layout => {
|
|
465
|
+
// const xSpaceElem = getRefElem(elemStore[`main-${layout}-xSpace`])
|
|
466
|
+
// if (xSpaceElem) {
|
|
467
|
+
// xSpaceElem.style.width = scrollXLoad ? `${ySpaceWidth}px` : ''
|
|
468
|
+
// }
|
|
469
|
+
// })
|
|
470
|
+
|
|
471
|
+
// reactData.scrollXLeft = xSpaceLeft
|
|
472
|
+
// reactData.scrollXWidth = ySpaceWidth
|
|
473
|
+
// reactData.isScrollXBig = isScrollXBig
|
|
474
|
+
|
|
475
|
+
// const scrollXSpaceEl = refScrollXSpaceElem.value
|
|
476
|
+
// if (scrollXSpaceEl) {
|
|
477
|
+
// scrollXSpaceEl.style.width = `${ySpaceWidth}px`
|
|
478
|
+
// }
|
|
479
|
+
|
|
480
|
+
// calcScrollbar()
|
|
481
|
+
// return nextTick().then(() => {
|
|
482
|
+
// updateStyle()
|
|
483
|
+
// })
|
|
484
|
+
// }
|
|
485
485
|
|
|
486
486
|
const updateScrollYSpace = () => {
|
|
487
|
-
const { scrollYLoad, overflowY } = reactData
|
|
488
487
|
const { elemStore } = internalData
|
|
489
488
|
const $xeTable = internalData.xeTable
|
|
490
489
|
const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
|
|
@@ -516,21 +515,19 @@ export default defineVxeComponent({
|
|
|
516
515
|
}
|
|
517
516
|
ySpaceHeight = maxYHeight
|
|
518
517
|
}
|
|
519
|
-
if (!(scrollYLoad && overflowY)) {
|
|
520
|
-
scrollYTop = 0
|
|
521
|
-
}
|
|
522
518
|
|
|
519
|
+
const bodyChartWrapperElem = getRefElem(elemStore['main-chart-wrapper'])
|
|
523
520
|
if (bodyTableElem) {
|
|
524
521
|
bodyTableElem.style.transform = `translate(${reactData.scrollXLeft || 0}px, ${scrollYTop}px)`
|
|
525
522
|
}
|
|
523
|
+
if (bodyChartWrapperElem) {
|
|
524
|
+
bodyChartWrapperElem.style.transform = `translate(${reactData.scrollXLeft || 0}px, ${scrollYTop}px)`
|
|
525
|
+
}
|
|
526
526
|
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
ySpaceElem.style.height = ySpaceHeight ? `${ySpaceHeight}px` : ''
|
|
532
|
-
}
|
|
533
|
-
})
|
|
527
|
+
const bodyYSpaceElem = getRefElem(elemStore['main-body-ySpace'])
|
|
528
|
+
if (bodyYSpaceElem) {
|
|
529
|
+
bodyYSpaceElem.style.height = ySpaceHeight ? `${ySpaceHeight}px` : ''
|
|
530
|
+
}
|
|
534
531
|
|
|
535
532
|
const scrollYSpaceEl = refScrollYSpaceElem.value
|
|
536
533
|
if (scrollYSpaceEl) {
|
|
@@ -736,8 +733,10 @@ export default defineVxeComponent({
|
|
|
736
733
|
handleScrollEvent(evnt, isRollY, isRollX, currTopNum, wrapperEl.scrollLeft)
|
|
737
734
|
}
|
|
738
735
|
},
|
|
739
|
-
|
|
740
|
-
|
|
736
|
+
updateScrollYSpace,
|
|
737
|
+
updateScrollYStatus (sYLoad) {
|
|
738
|
+
reactData.scrollYLoad = sYLoad
|
|
739
|
+
}
|
|
741
740
|
}
|
|
742
741
|
|
|
743
742
|
const handleGlobalResizeEvent = () => {
|
|
@@ -3,6 +3,7 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
|
|
5
5
|
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit, addClass, removeClass } from '../../ui/src/dom'
|
|
6
|
+
import { getSlotVNs } from '../../ui/src/vn'
|
|
6
7
|
import { VxeUI } from '@vxe-ui/core'
|
|
7
8
|
import { ganttEmits } from './emits'
|
|
8
9
|
import { tableEmits } from './table-emits'
|
|
@@ -14,7 +15,7 @@ import type { VxeGanttConstructor, VxeGanttEmits, GanttReactData, GanttInternalD
|
|
|
14
15
|
import type { ValueOf, VxeFormEvents, VxeFormInstance, VxePagerEvents, VxeFormItemProps, VxePagerInstance, VxeComponentStyleType } from 'vxe-pc-ui'
|
|
15
16
|
import type { VxeTableMethods, VxeToolbarPropTypes, VxeTableProps, VxeTablePropTypes, VxeTableConstructor, VxeTablePrivateMethods, VxeTableEvents, VxeTableDefines, VxeTableEventProps, VxeToolbarInstance, VxeGridPropTypes } from 'vxe-table'
|
|
16
17
|
|
|
17
|
-
const { getConfig, getIcon, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement
|
|
18
|
+
const { getConfig, getIcon, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI
|
|
18
19
|
|
|
19
20
|
const tableProps = (VxeTableComponent as any).props
|
|
20
21
|
|
|
@@ -1971,6 +1972,7 @@ export default defineVxeComponent({
|
|
|
1971
1972
|
|
|
1972
1973
|
$xeGantt.renderVN = renderVN
|
|
1973
1974
|
|
|
1975
|
+
provide('$xeGrid', null)
|
|
1974
1976
|
provide('$xeGantt', $xeGantt)
|
|
1975
1977
|
|
|
1976
1978
|
return $xeGantt
|
package/packages/ui/src/vn.ts
CHANGED