aloudata-gantt 0.0.3 → 0.0.5

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/dist/index.esm.js CHANGED
@@ -4871,7 +4871,7 @@ var GanttStore = /*#__PURE__*/function () {
4871
4871
  }, {
4872
4872
  key: "initWidth",
4873
4873
  value: function initWidth() {
4874
- this.tableWidth = this.totalColumnWidth || 500;
4874
+ this.tableWidth = this.totalColumnWidth || window.customTableWidth || 500;
4875
4875
  this.viewWidth = this.width - this.tableWidth;
4876
4876
  // 图表宽度不能小于 200
4877
4877
  if (this.viewWidth < 200) {
@@ -6702,6 +6702,7 @@ var Body = function Body(_ref) {
6702
6702
  var GanttComponent = function GanttComponent(props) {
6703
6703
  var data = props.data,
6704
6704
  columns = props.columns,
6705
+ customTableWidth = props.customTableWidth,
6705
6706
  _props$dependencies = props.dependencies,
6706
6707
  dependencies = _props$dependencies === void 0 ? [] : _props$dependencies,
6707
6708
  onUpdate = props.onUpdate,
@@ -6763,6 +6764,9 @@ var GanttComponent = function GanttComponent(props) {
6763
6764
  useEffect(function () {
6764
6765
  if (isRestDay) store.setIsRestDay(isRestDay);
6765
6766
  }, [isRestDay, store]);
6767
+ useEffect(function () {
6768
+ window.customTableWidth = customTableWidth;
6769
+ }, [customTableWidth]);
6766
6770
  useEffect(function () {
6767
6771
  if (unit) store.switchSight(unit);
6768
6772
  }, [unit, store]);
@@ -36,6 +36,7 @@ export interface GanttProps<RecordType = DefaultRecordType> {
36
36
  * 自定义日期筛选维度
37
37
  */
38
38
  customSights?: Gantt.SightConfig[];
39
+ customTableWidth?: number;
39
40
  }
40
41
  export interface GanttRef {
41
42
  backToday: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloudata-gantt",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "license": "MIT",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/types/index.d.ts",