Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Vue generators produce invalid names for scoped slots

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

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

評価

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

調査の方向性

yarn test-gen を実行し、生成された {quasar|vuetify|vue}/components/[foo]/[FooList].vue コンポーネントを調査します。API プロパティ名が名前付きスコープ付きスロットになる仕組みを、特に '/' を含むプロパティについて追跡し、生成された Vue スロット名が有効でありながら実際の API プロパティにも一致していることを確認します。生成されたコンポーネントで Illegal '/' エラーが発生しなくなり、ジェネレーターのテストが成功すれば完了です。

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

説明

Description
Vue generators produce invalid names for scoped slots
For example:

     <template #item.admin/books="{ item }">
        <template v-if="router.hasRoute('BookShow')">
          <router-link
            v-for="book in item.raw.admin/books"
            :to="{ name: 'BookShow', params: { id: book['@id'] } }"
            :key="book['@id']"
          >
            {{ book["@id"] }}

            <br />
          </router-link>
        </template>

It show this error: Illegal '/' in tags.vue(22)

How to reproduce
Run the yarn test-gen command and look at the {quasar|vuetify|vue}/components/[foo]/[FooList].vue components

Possible Solution
The named scoped slots use the property names inside the table components to create the table cells and columns.

If we replace the slash with another character, we should make sure the slot name match the real property name from the API.
We need to check how the properties received from the API are named.

Another solution, maybe, would be to use variable for slot names.
But that would mean receiving them as props or declaring them in the script section, but it's not ideal.

Do you have an idea @dunglas ?

主要言語
TypeScript
スター
376
フォーク
133
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

api-platform/create-client のほかの issue

api-platform/create-client の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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