暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

doughnutChart.js 456B

1234567891011121314151617181920212223
  1. import { CHART } from '../actions/type';
  2. const initialState = {
  3. statistics: {
  4. name: 'Statistics',
  5. data: [33, 33, 34],
  6. },
  7. };
  8. const DoughnutChart = (state = initialState, action) => {
  9. const { payload, type } = action;
  10. switch (type) {
  11. case CHART:
  12. return {
  13. ...state,
  14. payload,
  15. };
  16. default:
  17. return state;
  18. }
  19. };
  20. export default DoughnutChart;