vxe-gantt
Version:
A vue based gantt component
124 lines (123 loc) • 2.63 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "VxeUI", {
enumerable: true,
get: function () {
return _core.VxeUI;
}
});
exports.default = void 0;
var _core = require("@vxe-ui/core");
const {
setConfig,
setIcon
} = _core.VxeUI;
_core.VxeUI.ganttVersion = "4.4.1";
const ymdFormat = 'yyyy-MM-dd';
const ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
setConfig({
gantt: {
// size: null,
// zoomConfig: {
// escRestore: true
// },
formConfig: {
enabled: true
},
pagerConfig: {
enabled: true
// perfect: false
},
toolbarConfig: {
enabled: true
// perfect: false
},
proxyConfig: {
enabled: true,
autoLoad: true,
showLoading: true,
showResponseMsg: true,
showActionMsg: true,
response: {
list: null,
result: 'result',
total: 'page.total',
message: 'message'
}
// beforeItem: null,
// beforeColumn: null,
// beforeQuery: null,
// afterQuery: null,
// beforeDelete: null,
// afterDelete: null,
// beforeSave: null,
// afterSave: null
},
taskBarTooltipConfig: {
enterable: true
},
taskLinkConfig: {
enabled: true,
isHover: true,
showArrow: true
},
taskViewScaleConfig: {
year: {
valueFormat: ymdFormat
},
quarter: {
valueFormat: ymdFormat
},
month: {
valueFormat: ymdFormat
},
week: {
startDay: 1,
valueFormat: ymdFormat
},
day: {
valueFormat: ymdFormat
},
date: {
valueFormat: ymdFormat
},
hour: {
valueFormat: ymdhmsFormat
},
minute: {
valueFormat: ymdhmsFormat
},
second: {
valueFormat: ymdhmsFormat
}
},
taskViewConfig: {
showNowLine: true,
gridding: {
leftSpacing: 1,
rightSpacing: 1
}
},
taskSplitConfig: {
enabled: true,
resize: true,
showCollapseTableButton: true,
showCollapseTaskButton: true
},
taskBarSubviewConfig: {
// showOverview: false
}
}
});
const iconPrefix = 'vxe-icon-';
setIcon({
// gantt
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',
GANTT_VIEW_TASK_MILESTONE: iconPrefix + 'square-fill rotate45'
});
var _default = exports.default = _core.VxeUI;