vxe-gantt 3.0.11 → 3.0.13
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/index.js +13 -3
- package/es/gantt/src/gantt-chart.js +10 -4
- package/es/gantt/src/gantt-view.js +1 -1
- package/es/gantt/src/gantt.js +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/gantt/index.js +13 -3
- package/lib/gantt/index.min.js +1 -1
- package/lib/gantt/src/gantt-chart.js +13 -13
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt-view.js +1 -1
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +2 -0
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/index.umd.js +31 -19
- 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/package.json +3 -3
- package/packages/gantt/index.ts +14 -3
- package/packages/gantt/src/gantt-chart.ts +11 -4
- package/packages/gantt/src/gantt-view.ts +1 -1
- package/packages/gantt/src/gantt.ts +2 -0
package/lib/ui/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _log = require("./src/log");
|
|
|
15
15
|
var setConfig = _core.VxeUI.setConfig,
|
|
16
16
|
setIcon = _core.VxeUI.setIcon,
|
|
17
17
|
checkVersion = _core.VxeUI.checkVersion;
|
|
18
|
-
_core.VxeUI.ganttVersion = "3.0.
|
|
18
|
+
_core.VxeUI.ganttVersion = "3.0.13";
|
|
19
19
|
setConfig({
|
|
20
20
|
gantt: {
|
|
21
21
|
// size: null,
|
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"),setConfig=_core.VxeUI.setConfig,setIcon=_core.VxeUI.setIcon,checkVersion=_core.VxeUI.checkVersion,iconPrefix=(_core.VxeUI.ganttVersion="3.0.
|
|
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"),setConfig=_core.VxeUI.setConfig,setIcon=_core.VxeUI.setIcon,checkVersion=_core.VxeUI.checkVersion,iconPrefix=(_core.VxeUI.ganttVersion="3.0.13",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"}},taskViewScaleConfs:{week:{startDay:1}},taskViewConfig:{showNowLine:!0},taskSplitConfig:{enabled:!0,resize:!0,showCollapseTableButton:!0,showCollapseTaskButton:!0}}}),"vxe-icon-"),pVersion=(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"}),3),sVersion=18,_default=(checkVersion?checkVersion(_core.VxeUI.tableVersion,pVersion,sVersion)||(0,_log.errLog)("vxe.error.errorVersion",["vxe-table@".concat(_core.VxeUI.tableVersion||"?"),"vxe-table v".concat(pVersion,".").concat(sVersion,"+")]):(0,_log.errLog)("Requires vxe-table v".concat(pVersion,".").concat(sVersion,"+")),exports.default=_core.VxeUI);
|
package/lib/ui/src/log.js
CHANGED
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.warnLog = exports.errLog = void 0;
|
|
7
7
|
var _core = require("@vxe-ui/core");
|
|
8
8
|
var log = _core.VxeUI.log;
|
|
9
|
-
var version = "gantt v".concat("3.0.
|
|
9
|
+
var version = "gantt v".concat("3.0.13");
|
|
10
10
|
var warnLog = exports.warnLog = log.create('warn', version);
|
|
11
11
|
var 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"),log=_core.VxeUI.log,version="gantt v".concat("3.0.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),log=_core.VxeUI.log,version="gantt v".concat("3.0.13"),warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-gantt",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.13",
|
|
4
4
|
"description": "A vue based gantt component",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"vue": "~2.6.14",
|
|
65
65
|
"vue-i18n": "^8.15.1",
|
|
66
66
|
"vue-router": "^3.5.1",
|
|
67
|
-
"vxe-pc-ui": "^3.9.
|
|
68
|
-
"vxe-table": "^3.18.
|
|
67
|
+
"vxe-pc-ui": "^3.9.22",
|
|
68
|
+
"vxe-table": "^3.18.10"
|
|
69
69
|
},
|
|
70
70
|
"vetur": {
|
|
71
71
|
"tags": "helper/vetur/tags.json",
|
package/packages/gantt/index.ts
CHANGED
|
@@ -2,15 +2,26 @@ import { VueConstructor } from 'vue'
|
|
|
2
2
|
import { VxeUI } from '@vxe-ui/core'
|
|
3
3
|
import VxeGanttComponent from './src/gantt'
|
|
4
4
|
|
|
5
|
+
let isReg = false
|
|
6
|
+
|
|
5
7
|
export const VxeGantt = Object.assign({}, VxeGanttComponent, {
|
|
6
8
|
install (app: VueConstructor) {
|
|
9
|
+
if (typeof window !== 'undefined') {
|
|
10
|
+
const VxeGanttExtendGanttChart = (window as any).VxeGanttExtendGanttChart
|
|
11
|
+
if (VxeGanttExtendGanttChart && VxeGanttExtendGanttChart.use) {
|
|
12
|
+
VxeGanttExtendGanttChart.use(VxeUI)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (!isReg) {
|
|
16
|
+
isReg = true
|
|
17
|
+
if (VxeUI.dynamicApp) {
|
|
18
|
+
VxeUI.dynamicApp.use(VxeGantt)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
7
21
|
app.component(VxeGanttComponent.name as string, VxeGanttComponent)
|
|
8
22
|
}
|
|
9
23
|
})
|
|
10
24
|
|
|
11
|
-
if (VxeUI.dynamicApp) {
|
|
12
|
-
VxeUI.dynamicApp.use(VxeGantt)
|
|
13
|
-
}
|
|
14
25
|
VxeUI.component(VxeGanttComponent)
|
|
15
26
|
|
|
16
27
|
export const Gantt = VxeGantt
|
|
@@ -55,9 +55,10 @@ export default defineVxeComponent({
|
|
|
55
55
|
const titleField = $xeGantt.computeTitleField
|
|
56
56
|
const progressField = $xeGantt.computeProgressField
|
|
57
57
|
const taskBarOpts = $xeGantt.computeTaskBarOpts
|
|
58
|
+
const barParams = { $gantt: $xeGantt, row }
|
|
58
59
|
const { showProgress, showContent, contentMethod, barStyle } = taskBarOpts
|
|
59
60
|
const isBarRowStyle = XEUtils.isFunction(barStyle)
|
|
60
|
-
const barStyObj = (barStyle ? (isBarRowStyle ? barStyle(
|
|
61
|
+
const barStyObj = (barStyle ? (isBarRowStyle ? barStyle(barParams) : barStyle) : {}) || {}
|
|
61
62
|
const { round } = barStyObj
|
|
62
63
|
|
|
63
64
|
const rowRest = fullAllDataRowIdData[rowid] || {}
|
|
@@ -85,6 +86,7 @@ export default defineVxeComponent({
|
|
|
85
86
|
if (contentMethod) {
|
|
86
87
|
title = getStringValue(contentMethod({ row, title }))
|
|
87
88
|
}
|
|
89
|
+
|
|
88
90
|
return h('div', {
|
|
89
91
|
key: treeConfig ? rowid : $rowIndex,
|
|
90
92
|
attrs: {
|
|
@@ -106,14 +108,19 @@ export default defineVxeComponent({
|
|
|
106
108
|
},
|
|
107
109
|
on: {
|
|
108
110
|
click (evnt: MouseEvent) {
|
|
109
|
-
$xeGantt.handleTaskBarClickEvent(evnt,
|
|
111
|
+
$xeGantt.handleTaskBarClickEvent(evnt, barParams)
|
|
110
112
|
},
|
|
111
113
|
dblclick (evnt: MouseEvent) {
|
|
112
|
-
$xeGantt.handleTaskBarDblclickEvent(evnt,
|
|
114
|
+
$xeGantt.handleTaskBarDblclickEvent(evnt, barParams)
|
|
115
|
+
},
|
|
116
|
+
mousedown (evnt: MouseEvent) {
|
|
117
|
+
if ($xeGantt.handleTaskBarMousedownEvent) {
|
|
118
|
+
$xeGantt.handleTaskBarMousedownEvent(evnt, barParams)
|
|
119
|
+
}
|
|
113
120
|
}
|
|
114
121
|
}
|
|
115
122
|
}, taskBarSlot
|
|
116
|
-
? $xeGantt.callSlot(taskBarSlot,
|
|
123
|
+
? $xeGantt.callSlot(taskBarSlot, barParams, h)
|
|
117
124
|
: [
|
|
118
125
|
showProgress
|
|
119
126
|
? h('div', {
|
|
@@ -530,7 +530,7 @@ function updateStyle ($xeGanttView: VxeGanttViewConstructor & VxeGanttViewPrivat
|
|
|
530
530
|
const viewWidth = bodyScrollElem.clientWidth
|
|
531
531
|
const remainWidth = viewWidth - viewTableWidth
|
|
532
532
|
if (remainWidth > 0) {
|
|
533
|
-
viewCellWidth +=
|
|
533
|
+
viewCellWidth += remainWidth / visibleColumn.length
|
|
534
534
|
viewTableWidth = viewWidth
|
|
535
535
|
}
|
|
536
536
|
}
|
|
@@ -119,6 +119,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
119
119
|
taskViewConfig: Object as PropType<VxeGanttPropTypes.TaskViewConfig>,
|
|
120
120
|
taskBarConfig: Object as PropType<VxeGanttPropTypes.TaskBarConfig>,
|
|
121
121
|
taskSplitConfig: Object as PropType<VxeGanttPropTypes.TaskSplitConfig>,
|
|
122
|
+
taskResizeConfig: Object as PropType<VxeGanttPropTypes.TaskResizeConfig>,
|
|
123
|
+
taskDragConfig: Object as PropType<VxeGanttPropTypes.TaskDragConfig>,
|
|
122
124
|
size: {
|
|
123
125
|
type: String as PropType<VxeGridPropTypes.Size>,
|
|
124
126
|
default: () => getConfig().gantt.size || getConfig().size
|