vxe-gantt 3.0.0-beta.5 → 3.0.1

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.
Files changed (43) hide show
  1. package/es/gantt/src/gantt-body.js +0 -4
  2. package/es/gantt/src/gantt-footer.js +51 -0
  3. package/es/gantt/src/gantt-header.js +1 -5
  4. package/es/gantt/src/gantt-view.js +16 -3
  5. package/es/gantt/src/gantt.js +12 -2
  6. package/es/gantt/style.css +8 -0
  7. package/es/gantt/style.min.css +1 -1
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/ui/index.js +10 -3
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-gantt/style.css +8 -0
  13. package/es/vxe-gantt/style.min.css +1 -1
  14. package/lib/gantt/src/gantt-body.js +0 -4
  15. package/lib/gantt/src/gantt-body.min.js +1 -1
  16. package/lib/gantt/src/gantt-footer.js +55 -0
  17. package/lib/gantt/src/gantt-footer.min.js +1 -0
  18. package/lib/gantt/src/gantt-header.js +1 -5
  19. package/lib/gantt/src/gantt-header.min.js +1 -1
  20. package/lib/gantt/src/gantt-view.js +14 -2
  21. package/lib/gantt/src/gantt-view.min.js +1 -1
  22. package/lib/gantt/src/gantt.js +12 -2
  23. package/lib/gantt/src/gantt.min.js +1 -1
  24. package/lib/gantt/style/style.css +8 -0
  25. package/lib/gantt/style/style.min.css +1 -1
  26. package/lib/index.umd.js +91 -19
  27. package/lib/index.umd.min.js +1 -1
  28. package/lib/style.css +1 -1
  29. package/lib/style.min.css +1 -1
  30. package/lib/ui/index.js +9 -3
  31. package/lib/ui/index.min.js +1 -1
  32. package/lib/ui/src/log.js +1 -1
  33. package/lib/ui/src/log.min.js +1 -1
  34. package/lib/vxe-gantt/style/style.css +8 -0
  35. package/lib/vxe-gantt/style/style.min.css +1 -1
  36. package/package.json +1 -1
  37. package/packages/gantt/src/gantt-body.ts +0 -4
  38. package/packages/gantt/src/gantt-footer.ts +62 -0
  39. package/packages/gantt/src/gantt-header.ts +1 -5
  40. package/packages/gantt/src/gantt-view.ts +17 -3
  41. package/packages/gantt/src/gantt.ts +14 -2
  42. package/packages/ui/index.ts +8 -2
  43. package/styles/components/gantt.scss +11 -0
package/lib/index.umd.js CHANGED
@@ -7579,21 +7579,24 @@ if (typeof window !== 'undefined') {
7579
7579
  var es_object_to_string = __webpack_require__(6099);
7580
7580
  // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
7581
7581
  var web_dom_collections_for_each = __webpack_require__(3500);
7582
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
7583
+ var es_array_concat = __webpack_require__(8706);
7582
7584
  // EXTERNAL MODULE: external {"root":"VxeUI","commonjs":"@vxe-ui/core","commonjs2":"@vxe-ui/core","amd":"@vxe-ui/core"}
7583
7585
  var core_ = __webpack_require__(4345);
7584
7586
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
7585
7587
 
7586
7588
  var log = core_.VxeUI.log;
7587
- var version = "gantt v".concat("3.0.0-beta.5");
7589
+ var version = "gantt v".concat("3.0.1");
7588
7590
  var warnLog = log.create('warn', version);
7589
7591
  var errLog = log.create('error', version);
7590
7592
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
7591
7593
 
7592
7594
 
7595
+
7593
7596
  var setConfig = core_.VxeUI.setConfig,
7594
7597
  setIcon = core_.VxeUI.setIcon,
7595
7598
  checkVersion = core_.VxeUI.checkVersion;
7596
- core_.VxeUI.ganttVersion = "3.0.0-beta.5";
7599
+ core_.VxeUI.ganttVersion = "3.0.1";
7597
7600
  setConfig({
7598
7601
  gantt: {
7599
7602
  // size: null,
@@ -7648,8 +7651,14 @@ setIcon({
7648
7651
  GANTT_VIEW_RIGHT_OPEN: iconPrefix + 'arrow-right',
7649
7652
  GANTT_VIEW_RIGHT_CLOSE: iconPrefix + 'arrow-left'
7650
7653
  });
7651
- if (!checkVersion(core_.VxeUI.tableVersion, 3, 18)) {
7652
- errLog('vxe.error.errorVersion', ["vxe-table@".concat(core_.VxeUI.tableVersion || '?'), 'vxe-table v3.18+']);
7654
+ var pVersion = 3;
7655
+ var sVersion = 18;
7656
+ if (checkVersion) {
7657
+ if (!checkVersion(core_.VxeUI.tableVersion, pVersion, sVersion)) {
7658
+ errLog('vxe.error.errorVersion', ["vxe-table@".concat(core_.VxeUI.tableVersion || '?'), "vxe-table v".concat(pVersion, ".").concat(sVersion, "+")]);
7659
+ }
7660
+ } else {
7661
+ errLog("Requires vxe-table v".concat(pVersion, ".").concat(sVersion, "+"));
7653
7662
  }
7654
7663
 
7655
7664
  /* harmony default export */ var ui = (core_.VxeUI);
@@ -7842,8 +7851,6 @@ function _objectSpread2(e) {
7842
7851
  return e;
7843
7852
  }
7844
7853
 
7845
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
7846
- var es_array_concat = __webpack_require__(8706);
7847
7854
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
7848
7855
  var es_array_includes = __webpack_require__(4423);
7849
7856
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
@@ -8295,7 +8302,7 @@ function getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) {
8295
8302
 
8296
8303
 
8297
8304
  /* harmony default export */ var gantt_header = (defineVxeComponent({
8298
- name: 'VxeGanttView',
8305
+ name: 'VxeGanttViewHeader',
8299
8306
  inject: {
8300
8307
  $xeGantt: {
8301
8308
  default: null
@@ -8304,10 +8311,6 @@ function getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) {
8304
8311
  default: null
8305
8312
  }
8306
8313
  },
8307
- props: {},
8308
- data: function data() {
8309
- return {};
8310
- },
8311
8314
  computed: _objectSpread2({}, {}),
8312
8315
  methods: {
8313
8316
  //
@@ -8569,10 +8572,6 @@ var renderEmptyElement = core_.VxeUI.renderEmptyElement;
8569
8572
  default: null
8570
8573
  }
8571
8574
  },
8572
- props: {},
8573
- data: function data() {
8574
- return {};
8575
- },
8576
8575
  computed: _objectSpread2({}, {}),
8577
8576
  methods: {
8578
8577
  //
@@ -8762,6 +8761,57 @@ var renderEmptyElement = core_.VxeUI.renderEmptyElement;
8762
8761
  return this.renderVN(h);
8763
8762
  }
8764
8763
  }));
8764
+ ;// CONCATENATED MODULE: ./packages/gantt/src/gantt-footer.ts
8765
+
8766
+
8767
+ /* harmony default export */ var gantt_footer = (defineVxeComponent({
8768
+ name: 'VxeGanttViewHeader',
8769
+ inject: {
8770
+ $xeGantt: {
8771
+ default: null
8772
+ },
8773
+ $xeGanttView: {
8774
+ default: null
8775
+ }
8776
+ },
8777
+ props: {},
8778
+ computed: _objectSpread2({}, {}),
8779
+ methods: {
8780
+ //
8781
+ // Render
8782
+ //
8783
+ renderVN: function renderVN(h) {
8784
+ return h('div', {
8785
+ ref: 'refElem',
8786
+ class: 'vxe-gantt-view--footer-wrapper'
8787
+ }, [h('div', {
8788
+ ref: 'refHeaderScroll',
8789
+ class: 'vxe-gantt-view--footer-inner-wrapper'
8790
+ }, [])]);
8791
+ }
8792
+ },
8793
+ mounted: function mounted() {
8794
+ var _vm = this;
8795
+ var $xeGanttView = _vm.$xeGanttView;
8796
+ var internalData = $xeGanttView.internalData;
8797
+ var elemStore = internalData.elemStore;
8798
+ var prefix = 'main-footer-';
8799
+ elemStore["".concat(prefix, "wrapper")] = _vm.$refs.refElem;
8800
+ elemStore["".concat(prefix, "scroll")] = _vm.$refs.refHeaderScroll;
8801
+ },
8802
+ destroyed: function destroyed() {
8803
+ var _vm = this;
8804
+ var $xeGanttView = _vm.$xeGanttView;
8805
+ var internalData = $xeGanttView.internalData;
8806
+ var elemStore = internalData.elemStore;
8807
+ var prefix = 'main-headefooterr-';
8808
+ elemStore["".concat(prefix, "wrapper")] = null;
8809
+ elemStore["".concat(prefix, "scroll")] = null;
8810
+ },
8811
+ render: function render(h) {
8812
+ return this.renderVN(h);
8813
+ }
8814
+ }));
8765
8815
  ;// CONCATENATED MODULE: ./packages/gantt/src/gantt-view.ts
8766
8816
 
8767
8817
 
@@ -8775,6 +8825,7 @@ var renderEmptyElement = core_.VxeUI.renderEmptyElement;
8775
8825
 
8776
8826
 
8777
8827
 
8828
+
8778
8829
  var globalEvents = core_.VxeUI.globalEvents;
8779
8830
  function createInternalData() {
8780
8831
  return {
@@ -9015,7 +9066,9 @@ function updateStyle($xeGanttView) {
9015
9066
  if (!el || !el.clientHeight) {
9016
9067
  return;
9017
9068
  }
9069
+ var scrollbarOpts = $xeGantt.computeScrollbarOpts;
9018
9070
  var scrollbarXToTop = $xeGantt.computeScrollbarXToTop;
9071
+ var scrollbarYToLeft = $xeGantt.computeScrollbarYToLeft;
9019
9072
  var xLeftCornerEl = $xeGanttView.$refs.refScrollXLeftCornerElem;
9020
9073
  var xRightCornerEl = $xeGanttView.$refs.refScrollXRightCornerElem;
9021
9074
  var scrollXVirtualEl = $xeGanttView.$refs.refScrollXVirtualElem;
@@ -9030,6 +9083,11 @@ function updateStyle($xeGanttView) {
9030
9083
  tHeaderHeight = tableInternalData.tHeaderHeight;
9031
9084
  tFooterHeight = tableInternalData.tFooterHeight;
9032
9085
  }
9086
+ var yScrollbarVisible = 'visible';
9087
+ if (scrollbarYToLeft || scrollbarOpts.y && scrollbarOpts.y.visible === false) {
9088
+ osbWidth = 0;
9089
+ yScrollbarVisible = 'hidden';
9090
+ }
9033
9091
  var headerScrollElem = getRefElem(elemStore['main-header-scroll']);
9034
9092
  if (headerScrollElem) {
9035
9093
  headerScrollElem.style.height = "".concat(tHeaderHeight, "px");
@@ -9038,6 +9096,10 @@ function updateStyle($xeGanttView) {
9038
9096
  if (bodyScrollElem) {
9039
9097
  bodyScrollElem.style.height = "".concat(tbHeight, "px");
9040
9098
  }
9099
+ var footerScrollElem = getRefElem(elemStore['main-footer-scroll']);
9100
+ if (footerScrollElem) {
9101
+ footerScrollElem.style.height = "".concat(tFooterHeight, "px");
9102
+ }
9041
9103
  if (scrollXVirtualEl) {
9042
9104
  scrollXVirtualEl.style.height = "".concat(osbHeight, "px");
9043
9105
  scrollXVirtualEl.style.visibility = 'visible';
@@ -9059,7 +9121,7 @@ function updateStyle($xeGanttView) {
9059
9121
  if (scrollYVirtualEl) {
9060
9122
  scrollYVirtualEl.style.width = "".concat(osbWidth, "px");
9061
9123
  scrollYVirtualEl.style.height = "".concat(tbHeight + tHeaderHeight + tFooterHeight, "px");
9062
- scrollYVirtualEl.style.visibility = 'visible';
9124
+ scrollYVirtualEl.style.visibility = yScrollbarVisible;
9063
9125
  }
9064
9126
  var yTopCornerEl = $xeGanttView.$refs.refScrollYTopCornerElem;
9065
9127
  if (yTopCornerEl) {
@@ -9599,7 +9661,7 @@ function syncTableScrollTop($xeGanttView, scrollTop) {
9599
9661
  renderViewport: function renderViewport(h) {
9600
9662
  return h('div', {
9601
9663
  class: 'vxe-gantt-view--viewport-wrapper'
9602
- }, [h(gantt_header), h(gantt_body)]);
9664
+ }, [h(gantt_header), h(gantt_body), h(gantt_footer)]);
9603
9665
  },
9604
9666
  renderBody: function renderBody(h) {
9605
9667
  var $xeGanttView = this;
@@ -9949,10 +10011,10 @@ function gantt_createInternalData() {
9949
10011
  var pagerOpts = $xeGantt.computePagerOpts;
9950
10012
  var isLoading = $xeGantt.computeIsLoading;
9951
10013
  var tProps = Object.assign({}, tableExtendProps, {
10014
+ // 不支持修改的属性
9952
10015
  showOverflow: true,
9953
10016
  showHeaderOverflow: true,
9954
- showFooterOverflow: true,
9955
- showFooter: false
10017
+ showFooterOverflow: true
9956
10018
  });
9957
10019
  if (isZMax) {
9958
10020
  if (tableExtendProps.maxHeight) {
@@ -11273,6 +11335,7 @@ function gantt_createInternalData() {
11273
11335
  var slots = $xeGantt.$scopedSlots;
11274
11336
  var $xeTable = $xeGantt.$refs.refTable;
11275
11337
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(columns, function (column) {
11338
+ var type = column.type;
11276
11339
  if (column.slots) {
11277
11340
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(column.slots, function (func) {
11278
11341
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
@@ -11282,6 +11345,9 @@ function gantt_createInternalData() {
11282
11345
  }
11283
11346
  });
11284
11347
  }
11348
+ if (type === 'expand') {
11349
+ errLog('vxe.error.errProp', ['type=expand', 'type=seq,radio,checkbox,html']);
11350
+ }
11285
11351
  });
11286
11352
  return $xeTable.loadColumn(columns);
11287
11353
  },
@@ -11721,6 +11787,12 @@ function gantt_createInternalData() {
11721
11787
  if (proxyOpts.props) {
11722
11788
  warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response']);
11723
11789
  }
11790
+ if (props.expandConfig) {
11791
+ warnLog('vxe.error.notProp', ['expand-config']);
11792
+ }
11793
+ if (props.aggregateConfig) {
11794
+ warnLog('vxe.error.notProp', ['aggregate-config']);
11795
+ }
11724
11796
  $xeGantt.$nextTick(function () {
11725
11797
  if (props.formConfig) {
11726
11798
  if (!VxeUIFormComponent) {