Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Tab not marked as selected on initial route

未关闭
#575 5 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
nuxt, typescript
领域
frontend, mobile

调研方向

在 modules playground project 中使用别名为 / 的 tab、ion-tab-bar 和 ion-tab-button,重现初始路由场景。将渲染出的 tab 与 active-tab 检测进行比较,并记录在不进行程序化路由检查的情况下应将初始 tab 标记为已选中的行为。

由索引模型根据 Issue 内容生成。

描述

📚 What are you trying to do?

Hi,

according to docs you should set alias to / on the tab you wish to render instead of having index.vue in pages directory. That works fine as the tab gets rendered but the button in <ion-tab-bar> is not marked as selected. This doesn't work even in the modules playground project.

Does anyone know please how to fix that other than checking for route programatically and setting selected to true ?

🔍 What have you tried?

I've tried to change the href on <ion-tab-button> to / but that completely ruined the active tab detection. Furthermore, can some please explain to me how does it even work please ? Like ...when i set alias in define page meta on specific tab how does it know to render the parent component as well ? It's pretty unclear from the docs :(

ℹ️ Additional context

No response

主要语言
TypeScript
星标
458
派生
53
平均合并
15 小时 54 分钟
30 天内合并 PR
25

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nuxt-modules/ionic 的其他 Issue

查看 nuxt-modules/ionic 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。