@36node/redux-xlsx 中文文档教程
@36node/redux-xlsx
使用 Xlsx 和 redux,专注于管理状态中的 xlsx 数据,从文件导入到状态,并从状态导出到文件。
Xlsx Actions
import { makeXlsx } from "@36node/redux";
/**
* columns structure same as antd table, ref
* https://ant.design/components/table-cn/#%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8
*/
const xlsx = makeXlsx("someKey", { columns });
// start cron
dispatch(xlsx.import({ file }));
// stop xlsx
dispatch(xlsx.export({ rows }));
Xlsx Reducer
import { xlsxReducerRoot } from "@36node/redux";
export default combineReducers({
...xlsxReducerRoot,
});
Xlsx Selector
import { makeXlsxSelector } from "@36node/redux";
const select = makeXlsxSelector("someKey");
const some = select(state);
Xlsx Saga
redux-xlsx
应该与 saga 一起使用。
import { fork, all } from "redux-saga/effects";
import { watchXlsx } from "@36node/redux-xlsx";
export default function* root() {
yield all([fork(watchXlsx)]);
}
@36node/redux-xlsx
Work with Xlsx and redux, focus on manage xlsx data in state, import from file to state, and export from state to file.
Xlsx Actions
import { makeXlsx } from "@36node/redux";
/**
* columns structure same as antd table, ref
* https://ant.design/components/table-cn/#%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8
*/
const xlsx = makeXlsx("someKey", { columns });
// start cron
dispatch(xlsx.import({ file }));
// stop xlsx
dispatch(xlsx.export({ rows }));
Xlsx Reducer
import { xlsxReducerRoot } from "@36node/redux";
export default combineReducers({
...xlsxReducerRoot,
});
Xlsx Selector
import { makeXlsxSelector } from "@36node/redux";
const select = makeXlsxSelector("someKey");
const some = select(state);
Xlsx Saga
redux-xlsx
should use with saga.
import { fork, all } from "redux-saga/effects";
import { watchXlsx } from "@36node/redux-xlsx";
export default function* root() {
yield all([fork(watchXlsx)]);
}
更多
你可能也喜欢
- 3r-boilerplate 中文文档教程
- @0b5vr/automaton-with-gui 中文文档教程
- @40three/kendo-angular-extensions 中文文档教程
- @7factor/react-native-form-builder 中文文档教程
- @aamasri/dom-utils 中文文档教程
- @acc-toppings/api-acc-compiler 中文文档教程
- @accede-web/overlay 中文文档教程
- @acheetahk/request 中文文档教程
- @acoustic-content-sdk/ng-app-live 中文文档教程
- @action-agenda/default-config 中文文档教程