//传参
history.push('/路径?参数名=参数值&参数名=参数值')
history.push({
pathname: '/路径',
query: {
参数名: 参数值
}
})
接受参数
import { useLocation } from 'umi';
const location = useLocation();
console.log(location.query)
//传参
history.push('/路径?参数名=参数值&参数名=参数值')
history.push({
pathname: '/路径',
query: {
参数名: 参数值
}
})
接受参数
import { useLocation } from 'umi';
const location = useLocation();
console.log(location.query)