Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Vue generators produce invalid names for scoped slots

Aperta
#380 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Esegui yarn test-gen e ispeziona i componenti {quasar|vuetify|vue}/components/[foo]/[FooList].vue generati. Traccia come i nomi delle proprietà dell’API diventano slot con ambito denominati, in particolare le proprietà contenenti '/', e verifica che i nomi degli slot Vue generati siano validi continuando a corrispondere alle proprietà API reali. Il lavoro è completato quando i componenti generati non attivano più l’errore Illegal '/' e i test del generatore passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 ?

Lingua principale
TypeScript
Stelle
376
Fork
132
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di api-platform/create-client

Tutte le issue di api-platform/create-client

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.