@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.
- package/dist/core/sheet/index.js +10 -0
- package/dist/type/sheet.d.ts +1 -0
- package/package.json +1 -1
package/dist/core/sheet/index.js
CHANGED
|
@@ -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]);
|
package/dist/type/sheet.d.ts
CHANGED