-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
Describe the bug
主子应用应该如何配置hash路由,才可以保证切换子应用不会重新加载,我主应用访问子应用的配置是通过url静态资源访问的,
且主子应用router都配置了hash
App.tsx:
router: {
type: 'hash'
},
getApps: async () => {
const apps = [{
path: '/dataDev',
title: '数据开发',
sandbox: true,
url: config.dataDev_url,
// hashType: true,
props: {
basename: '/dataDev'// 添加 hash 标识
}
}],}
routes.ts:
import { IRouterConfig } from 'ice';
import Login from '@/pages/Login';
import NotFound from '@/components/NotFound';
const routerConfig: IRouterConfig[] = [
{
path: '/',
redirect: '/dataDev',
exact: true,
}, {
path: '/login',
component: Login,
}, {
component: NotFound,
}
];
export default routerConfig;
Expected behavior
希望可以通过hash路由访问页面(子应用),而不会重新加载页面
Actual behavior
No response
Version of ice.js
ice.1x
Content of build.json or ice.config.mts
Additional context
No response