Closed lufinka closed 3 years ago
@chenshuai2144 antd pro V5中安装插件就直接显示了SettingDrawer,大佬哪里设置disableUrlParams这个参数?
在initialValues.setting 里设置一下
在initialValues.setting 里设置一下
没有找到配置入口,请问在哪里设置?
src/app.tsx
export async function getInitialState(): Promise<{
settings?: Partial<LayoutSettings>;
currentUser?: API.CurrentUser;
fetchUserInfo?: () => Promise<API.CurrentUser | undefined>;
}>
return {
fetchUserInfo,
settings: { disableUrlParams },
};
}
src/app.tsx
export async function getInitialState(): Promise<{ settings?: Partial<LayoutSettings>; currentUser?: API.CurrentUser; fetchUserInfo?: () => Promise<API.CurrentUser | undefined>; }> return { fetchUserInfo, settings: { disableUrlParams }, }; }
settings与disableUrlParams是平级关系,不能在settings中设置呀?
settings: { disableUrlParams },
不是平级的
🐛 bug 描述
"umi-plugin-setting-drawer": "^1.0.3" 安装后所有页面链接会自动加上config/defaultSettings.ts中LayoutSettings的配置项:http://localhost:8000/antdpro/manage/user/info?navTheme=light&layout=top&fixSiderbar=true&title=%E6%99%BA%E8%83%BD%E5%AE%A1%E6%A0%B8&primaryColor=%231890ff&colorWeak=false&pwa=false&logo=https%3A%2F%2Fgw.alipayobjects.com%2Fzos%2Frmsportal%2FKDpgvguMpGfqaHPjicRK.svg
📷 复现步骤
🏞 期望结果
期望不粗线在url中,不影响路由传参
💻 复现代码
© 版本信息
🚑 其他信息