ionic-team / ionic-team/ionic-framework
feat: configurable default icon for ion-item detail-icon in provideIonicAngular
- 主要语言
- 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 include this feature request, without success.
### Describe the Feature Request
A new config property to set the default icon for detail-icon on ``. Just as it works for setting the default icon for ``
### Describe the Use Case
We want to use our own custom icon for items with `detail="true"` and having to add the `detail-icon` attribute on every item is a lot of effort and prone to design issues if a developer forgets to do it.
### Describe Preferred Solution
Add new config property
### Describe Alternatives
_No response_
### Related Code
_No response_
### Additional Information
There was the same feature request already in https://github.com/ionic-team/ionic-framework/issues/19906
The answer with a custom wrapper component that default sets the attribute is imho not satisfying as it poses one critical problem: A default component renders markup which makes the Ionic default styling for items in lists, etc. with first-child selectors etc. not work anymore. This kind of breaks the framework and is not a good proposed solution
贡献指南
调研方向
Start by inspecting provideIonicAngular and the existing configuration for the ion-menu-button default icon, then trace how ion-item handles detail="true" and detail-icon. Done means a new configuration property consistently supplies the default detail icon without requiring the attribute on every item, with coverage matching the existing configuration behavior.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100