插件地址:https://dhtmlx.com/docs/
我二次封装的dhtmlx-gantt 的组件如下:
// 配置参考: https://blog.csdn.net/qq_18209125/article/details/100552720
// 官方文档: https://dhtmlx.com/docs/products/dhtmlxGantt/
import { gantt } from 'dhtmlx-gantt'
import { format, diffDay } from '@common/utils/moment'
export default {
name: 'Custom_Gantt',
props: {
dataSource: {
type: Array,
default: () => []
},
replaceFields: {
type: Object,
default: () => {}
}
},
computed: {
fields() {
const defaultFields = {
'id': 'id',
'text': 'text',
'start_date': 'start_date',
'end_date': 'end_date',