ionic-team / ionic-team/ionic-framework
feat: using ion-tab-bar without ion-tabs or ion-router-outlet
- 主要语言
- TypeScript
- 星标
- 52.7k
- 派生
- 13.3k
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 51
描述
### Prerequisites
- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.
### Ionic Framework Version
v8.x
### Current Behavior
```
[Vue warn]: injection "tabBarData" not found.
Vue warn]: Unhandled error during execution of native event handler
at
at
at
at
at
at
```
### Expected Behavior
to work without the need of ion-tabs or router outlet. The navigation will be done by method.
### Steps to Reproduce
https://stackblitz.com/edit/hknvlmdm
### Code Reproduction URL
https://stackblitz.com/edit/hknvlmdm
### Ionic Info
ionic info
Ionic:
Ionic CLI : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 8.5.3
Capacitor:
Capacitor CLI : 7.2.0
@capacitor/android : 7.2.0
@capacitor/core : 7.2.0
@capacitor/ios : 7.2.0
Utility:
cordova-res : 0.15.4
native-run : 2.0.1
System:
NodeJS : v22.12.0 (/Users/z0lo/.nvm/versions/node/v22.12.0/bin/node)
npm : 10.9.0
OS : macOS
### Additional Information
_No response_
贡献指南
调研方向
Start with the linked StackBlitz reproduction and inspect the IonTabBar and IonTabButton components involved in the warning. Determine how tab-bar state is provided when ion-tabs and ion-router-outlet are absent, then verify that a standalone tab bar can be used with method-driven navigation without the injection error.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- frontend, mobile-dev
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 32/100