前端项目实战叁佰捌拾壹react-admin和material ui-refresh实现页面数据得刷新

  create('t_prod_step',
                {
                    data: {
                        machine_type_id: result.machine_type_id, part_id: result.part_id,
                        step_level_id: result.step_level_id, proc_solution_id: result.proc_solution_id, step_desc: result.step_desc,
                        step_no: result.step_no, stand_price: priceRef.current, stand_time: timeRef.current,
                    }
                }, {
                onSuccess: () => {
                    refresh();
                },
                onError: (error) => {
                    notify('插入错误', { type: 'error' });
                }
            }
            );
 const refresh = useRefresh();

posted @ 2023-09-06 11:35  前端导师歌谣  阅读(11)  评论(0)    收藏  举报  来源