vxe-gantt 4.0.11 → 4.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.
@@ -20,7 +20,7 @@ const { getConfig, getIcon, getI18n, commands, hooks, useFns, createEvent, globa
20
20
  const tableProps = (VxeTableComponent as any).props
21
21
 
22
22
  const tableComponentPropKeys = Object.keys(tableProps) as (keyof VxeTableProps)[]
23
- const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect']
23
+ const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeRowLevel', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect']
24
24
 
25
25
  const defaultLayouts: VxeGanttPropTypes.Layouts = [['Form'], ['Toolbar', 'Top', 'Gantt', 'Bottom', 'Pager']]
26
26
 
@@ -48,6 +48,7 @@ function getViewTypeLevel (type: VxeGanttDefines.ColumnScaleType) {
48
48
 
49
49
  export default defineVxeComponent({
50
50
  name: 'VxeGantt',
51
+ mixins: [],
51
52
  props: {
52
53
  ...(tableProps as {
53
54
  border: PropType<VxeTablePropTypes.Border>
@@ -82,6 +83,8 @@ export default defineVxeComponent({
82
83
  taskViewConfig: Object as PropType<VxeGanttPropTypes.TaskViewConfig>,
83
84
  taskBarConfig: Object as PropType<VxeGanttPropTypes.TaskBarConfig>,
84
85
  taskSplitConfig: Object as PropType<VxeGanttPropTypes.TaskSplitConfig>,
86
+ taskResizeConfig: Object as PropType<VxeGanttPropTypes.TaskResizeConfig>,
87
+ taskDragConfig: Object as PropType<VxeGanttPropTypes.TaskDragConfig>,
85
88
  size: {
86
89
  type: String as PropType<VxeGridPropTypes.Size>,
87
90
  default: () => getConfig().gantt.size || getConfig().size
@@ -1743,6 +1746,9 @@ export default defineVxeComponent({
1743
1746
  const loadingSlot = slots.loading
1744
1747
  const rowDragIconSlot = slots.rowDragIcon || slots['row-drag-icon']
1745
1748
  const columnDragIconSlot = slots.columnDragIcon || slots['column-drag-icon']
1749
+ const headerTooltipSlot = slots.headerTooltip || slots['header-tooltip']
1750
+ const tooltipSlot = slots.tooltip
1751
+ const footerTooltipSlot = slots.footerTooltip || slots['footer-tooltip']
1746
1752
  if (proxyConfig && isEnableConf(proxyOpts)) {
1747
1753
  if (proxyOpts.sort) {
1748
1754
  tableOns.onSortChange = sortChangeEvent
@@ -1758,6 +1764,9 @@ export default defineVxeComponent({
1758
1764
  loading?(params: any): any
1759
1765
  rowDragIcon?(params: any): any
1760
1766
  columnDragIcon?(params: any): any
1767
+ headerTooltip?(params: any): any
1768
+ tooltip?(params: any): any
1769
+ footerTooltip?(params: any): any
1761
1770
  } = {}
1762
1771
  if (emptySlot) {
1763
1772
  slotObj.empty = emptySlot
@@ -1771,6 +1780,15 @@ export default defineVxeComponent({
1771
1780
  if (columnDragIconSlot) {
1772
1781
  slotObj.columnDragIcon = columnDragIconSlot
1773
1782
  }
1783
+ if (headerTooltipSlot) {
1784
+ slotObj.headerTooltip = headerTooltipSlot
1785
+ }
1786
+ if (tooltipSlot) {
1787
+ slotObj.tooltip = tooltipSlot
1788
+ }
1789
+ if (footerTooltipSlot) {
1790
+ slotObj.footerTooltip = footerTooltipSlot
1791
+ }
1774
1792
  return h('div', {
1775
1793
  ref: refTableWrapper,
1776
1794
  class: 'vxe-gantt--table-wrapper'
@@ -9,6 +9,10 @@ export const tableEmits: VxeTableEmits = [
9
9
  'copy',
10
10
  'cut',
11
11
 
12
+ 'columns-change',
13
+ 'data-change',
14
+ 'footer-data-change',
15
+
12
16
  'current-change', // 已废弃
13
17
 
14
18
  'current-row-change',