@zhenliang/sheet 0.1.51 → 0.1.52

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.
@@ -141,6 +141,16 @@ var Sheet = function Sheet(props) {
141
141
  type: 'popHistory'
142
142
  });
143
143
  return history !== null && history !== void 0 && history.length ? history === null || history === void 0 ? void 0 : history[history.length - 1] : {};
144
+ },
145
+ dropHistory: function dropHistory() {
146
+ var history = state.history;
147
+ dispatch({
148
+ type: 'changes',
149
+ payload: {
150
+ history: []
151
+ }
152
+ });
153
+ return history !== null && history !== void 0 ? history : [];
144
154
  }
145
155
  };
146
156
  }, [state.history]);
@@ -93,6 +93,7 @@ export type SheetInstance = {
93
93
  end: SheetType.CellPosition;
94
94
  }) => void;
95
95
  popHistory: () => OperateHistory;
96
+ dropHistory: () => OperateHistory[];
96
97
  };
97
98
  export type SheetProps = {
98
99
  sheetInstance?: React.MutableRefObject<SheetInstance | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",