lljj-x / vue-json-schema-form

基于Vue/Vue3,Json Schema 和 ElementUi/antd/iview3/naiveUi 等生成 HTML Form 表单,用于活动编辑器、h5编辑器、cms等数据配置;支持可视化生成表单Schema 。 Generate a form using Vue/Vue3, Json Schema and ElementUi/antdv/iview3/naiveUi
https://form.lljj.me/
Apache License 2.0
2.01k stars 418 forks source link

help to show custom element #308

Closed binahub closed 11 months ago

binahub commented 1 year ago

反馈问题请先查看文档和务必提供详细的复现代码,遵循如下格式,描述不清楚的问题将会直接关闭。

vue和ui框架

Vue 3 , elementPlus

问题描述

i want to get jsonSchema if has some specifc format that its not in default like (my-date-time) not (date-time), render my own component, can you please help me with this?

thanks

binahub commented 1 year ago

i mean i have custom date picker package, i want to if i get for example "myDatePicker" format from jsonSchema, it renders that datePicker form another package or component, plz help

thanks

lljj-x commented 1 year ago

Custom format is not supported, but you can use your components through ui:widget

{
    "title": "测试专用页",
    "type": "object",
    "properties": {
        "selectWidgetOptions": {
            "title": "Custom date picker",
            "type": "string",
            "ui:widget": myDatePicker,
            "ui:youoption1": "1",
            "ui:youoption2": "2",
        }
    }
}

myDatePicker component must suport v-model

vue v-model https://vuejs.org/guide/components/v-model.html

Future versions are planned to support configuration through format.