Add "append" and "prepend" slots for vue-vuetify extended renderers
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
首先在 Vue Vuetify 包中找到 AutocompleteEnumControlRenderer 和 AutocompleteOneOfEnumControlRenderer,然后将它们处理 slot 的方式与其他控件渲染器进行比较。为这两个扩展渲染器添加 prepend 和 append slot,并检查 slot 内容是否以一致的格式传递到 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 小时
- 30 天内合并 PR
- 9
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipsesource/jsonforms 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
eclipsesource/jsonforms#2664 ·
维护者通常 1 天内回复
-
angular material
难度 1/5 1 小时以内 新手友好度 88/100
eclipsesource/jsonforms#2662 · 1 条评论 ·
维护者通常 1 天内回复
-
core
难度 2/5 1-3 小时 新手友好度 75/100
eclipsesource/jsonforms#2570 · 1 条评论 ·
维护者通常 1 天内回复
-
dev
难度 2/5 1-3 小时 新手友好度 50/100
eclipsesource/jsonforms#2651 ·
维护者通常 1 天内回复
-
angular material
难度 4/5 3-5 天 新手友好度 68/100
eclipsesource/jsonforms#2630 ·
维护者通常 1 天内回复
查看 eclipsesource/jsonforms 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
README の通知条件を実際の判定処理に合わせる可能已有人在做 @unhappychoice 今天认领。 未关闭factory:in-progress priority:medium
难度 1/5 1 小时以内 新手友好度 90/100
unhappychoice/oss-issue-opener#395 · 1 条评论 ·
维护者通常 1 天内回复
-
bug Website
难度 2/5 1-3 小时 新手友好度 77/100
OWASP/OWASP-Hunting#88 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复