Add "append" and "prepend" slots for vue-vuetify extended renderers

オープン 初心者向け
#2,668 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

@simeyc がすでに取り組んでいます。

2026年11月12日 から。

  • #2669 @simeyc による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

まずVue Vuetifyパッケージ内でAutocompleteEnumControlRendererとAutocompleteOneOfEnumControlRendererを見つけ、他のコントロールレンダラーとスロットの扱いを比較します。両方の拡張レンダラーにprependスロットとappendスロットを追加し、スロットの内容が一貫した書式で基盤となるVuetifyコンポーネントに渡されることを確認します。

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

説明

Is your feature request related to a problem? Please describe.

The jsonforms/vue-vuetify README states that "all control renderers now support prepend and append slots". However, these slots are missing for the extended renderers, namely AutocompleteEnumControlRenderer and AutocompleteOneOfEnumControlRenderer. This means that when using extendedVuetifyRenderers, enum controls lack the slots while others have them.

Describe the solution you'd like

Add the "prepend" and "append" slots to the extended renderers, for consistency with the others.

Describe alternatives you've considered

My current workaround is to implement a custom renderer which wraps the autocomplete renderers in a div with the slot content either side, like:

<template>
    <!-- Adds slots to the default autocomplete oneOf enum renderer. -->
    <div class="d-flex align-center">
        <div v-if="$slots.prepend" class="mr-4">
            <slot name="prepend" />
        </div>
        <AutocompleteEnumControlRenderer class="flex-fill" v-bind="props" />
        <div v-if="$slots.append" class="ml-4">
            <slot name="append" />
        </div>
    </div>
</template>

<script setup lang="ts">
import { type RendererProps } from '@jsonforms/vue';
import { AutocompleteEnumControlRenderer } from '@jsonforms/vue-vuetify';

const props = defineProps<RendererProps>();
</script>

However, this doesn't actually pass the slot content to the underlying Vuetify components (v-select/v-autocomplete), so it's a bit of a hack and formatting is off.

Package

Vue Vuetify Renderers

Additional context

I intend to push a PR for this shortly.

主要言語
TypeScript
スター
2.8k
フォーク
423
平均マージ
5日 16時間
マージ済み PR(30日)
9

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

eclipsesource/jsonforms のほかの issue

eclipsesource/jsonforms の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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