bug: Vue IonTabBar and IonButtons missing slot prop type

オープン
#30,545 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
frontend

調査の方向性

IonTabBar と IonButtons の Vue コンポーネントの型定義から始め、リンクされた StackBlitz プロジェクトを使って strictTemplates エラーを再現します。コンポーネント定義で slot 属性がどのように表現されているかを確認し、その後、両方のコンポーネントで vue-tsc と strictTemplates の下で名前付きスロットの使用が型チェックされることを検証します。

索引モデルが issue の本文から書いたものです。

説明

package: vue type: bug
Prerequisites
Ionic Framework Version

v8.x

Current Behavior

In a Vue application with a strict templates vue-tsc preset (that disallows undefined properties to be set), using the IonTabBar or IonButtons with a named slot (for example slot="bottom") leads to a TypeScript error.

This is due to the fact that vue-tsc doesn't recognise a slot prop.
There may be more components with the same issue.

Expected Behavior

I expect the component definition to include the slot property.

Steps to Reproduce

In a vue project with vue-tsc's configuration set like so (part of tsconfig.json)

"vueCompilerOptions": {
	"strictTemplates": true
}

Add this to any vue component's template:

<IonTabBar slot="bottom">
	<IonTabButton
		tab="tab-home"
		href="/tabs/tab-home"
	>
		<p>Home</p>
	</IonTabButton>
</IonTabBar>
Code Reproduction URL

https://stackblitz.com/edit/vue-kq5gzqta?file=package.json,src%2Fcomponents%2FHelloWorld.vue,tsconfig.json

Ionic Info

Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/vue 8.6.2

Capacitor:

Capacitor CLI : not installed
@capacitor/android : 7.4.0
@capacitor/core : 7.4.0
@capacitor/ios : 7.4.0

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.17.0
npm : 11.0.0
OS : macOS Unknown

Additional Information

No response

主要言語
TypeScript
スター
52.8k
フォーク
13.3k
平均マージ
3日 1時間
マージ済み PR(30日)
86

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/ionic-framework のほかの issue

ionic-team/ionic-framework の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。