参数传递方
import React from 'react';
import { history } from 'umi';
const Sending: React.FC = () => {
// 跳转页面
handleClick: (record: any) => {
history.push({
pathname: '/页面路径/Detail/',
query: {
stockType: record.stockType,
pid: record.pId,
id: record.id,
},
});
},
};
export default Pending;
参数获取方
import React from 'react';
import { useLocation } from 'umi';
const Receive: React.FC = () => {
const { query = {} }: any = useLocation();
// 获取参数
const { stockType, pid, id } = query;
};
export default Receive;