We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/// 设置多个菜单,直至出现滚动条。 切换 关于我们1/关于我们2 时,menu会回到顶部,无法显示当前选中的菜单, /// 按照正常情况,切换菜单不会菜单,菜单不会滚回到顶部的
const asideMenuConfig: MenuDataItem[] = [ { name: '工作台', path: '/', }, { name: '表单', path: '/form', }, { name: '列表', path: '/list', }, { name: '结果&异常', children: [ { name: '成功', path: '/success', }, { name: '404', path: '/404', }, { name: '成功', path: '/success', }, { name: '404', path: '/404', }, { name: '成功', path: '/success', }, { name: '404', path: '/404', }, { name: '成功', path: '/success', }, { name: '404', path: '/404', }, { name: '成功', path: '/success', }, { name: '404', path: '/404', }, { name: '成功', path: '/success', }, { name: '404', path: '/404', }, { name: '成功', path: '/success', }, { name: '404', path: '/404', }, ], }, { name: '关于', children: [ { name: '关于我们1', // 这里是使用 ice.config.mts 中 routes 配置的, // routes: { // defineRoutes: (route) => { // route('/', 'layout.tsx', () => { // route('/about-me', 'custom-about-me/index.tsx'); // }); // }, // }, path: '/about-me', }, { name: '关于我们2', path: '/about', }, ], }, ];
如果使用文件夹生成的路由 切换的时候就没问题,但项目中需要这样子使用
{ name: '关于我们', children: [ { name: '关于我们', path: '/custom-about-me', }, { name: '关于我们', path: '/about', }, ], },
No response
3.4.0
The text was updated successfully, but these errors were encountered:
可以对比下 .ice 目前下 routes.ts 的结构,通过 defineRoutes 默认是追加路由,存在先后匹配规则影响
Sorry, something went wrong.
No branches or pull requests
Describe the bug
/// 设置多个菜单,直至出现滚动条。 切换 关于我们1/关于我们2 时,menu会回到顶部,无法显示当前选中的菜单,
/// 按照正常情况,切换菜单不会菜单,菜单不会滚回到顶部的
const asideMenuConfig: MenuDataItem[] = [
{
name: '工作台',
path: '/',
},
{
name: '表单',
path: '/form',
},
{
name: '列表',
path: '/list',
},
{
name: '结果&异常',
children: [
{
name: '成功',
path: '/success',
},
{
name: '404',
path: '/404',
},
{
name: '成功',
path: '/success',
},
{
name: '404',
path: '/404',
},
{
name: '成功',
path: '/success',
},
{
name: '404',
path: '/404',
},
{
name: '成功',
path: '/success',
},
{
name: '404',
path: '/404',
},
{
name: '成功',
path: '/success',
},
{
name: '404',
path: '/404',
},
{
name: '成功',
path: '/success',
},
{
name: '404',
path: '/404',
},
{
name: '成功',
path: '/success',
},
{
name: '404',
path: '/404',
},
],
},
{
name: '关于',
children: [
{
name: '关于我们1',
// 这里是使用 ice.config.mts 中 routes 配置的,
// routes: {
// defineRoutes: (route) => {
// route('/', 'layout.tsx', () => {
// route('/about-me', 'custom-about-me/index.tsx');
// });
// },
// },
path: '/about-me',
},
{
name: '关于我们2',
path: '/about',
},
],
},
];
Expected behavior
2024-07-26.14.12.05.mov
如果使用文件夹生成的路由 切换的时候就没问题,但项目中需要这样子使用
{
name: '关于我们',
children: [
{
name: '关于我们',
path: '/custom-about-me',
},
{
name: '关于我们',
path: '/about',
},
],
},
Actual behavior
No response
Version of ice.js
3.4.0
Content of build.json or ice.config.mts
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: