vjs
@francis67/vue-json-schema-form
npm i @francis67/vue-json-schema-form
vjs

@francis67/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

by Liu

1.1.5 (see all)License:Apache-2.0TypeScript:Built-In
npm i @francis67/vue-json-schema-form
Readme

@francis67/vue-json-schema-form

基于 Element Ui 、Vue2、 JSON Schema 生成表单

通过 @lljj/vue2-form-core 适配 ElementUi 库

安装

## npm
npm install --save @francis67/vue-json-schema-form

## yarn
yarn add @francis67/vue-json-schema-form

使用

<VueForm
    v-model="formData"
    :schema="schema"
>
</VueForm>
//  使用
import VueForm from '@francis67/vue-json-schema-form';

export default {
    name: 'Demo',
    components: {
        VueForm
    },
    data() {
        return {
            formData: {},
            schema: {
                type: 'object',
                required: [
                    'userName',
                    'age',
                ],
                properties: {
                    userName: {
                        type: 'string',
                        title: '用户名',
                        default: 'Liu.Jun',
                    },
                    age: {
                        type: 'number',
                        title: '年龄'
                    },
                    bio: {
                        type: 'string',
                        title: '签名',
                        minLength: 10,
                        default: '知道的越多、就知道的越少',
                        'ui:options': {
                            placeholder: '请输入你的签名',
                            type: 'textarea',
                            rows: 1
                        }
                    }
                }
            }
        };
    }
};

License

Apache-2.0

Downloads/wk

0

GitHub Stars

1.4K

LAST COMMIT

9mos ago

MAINTAINERS

1

CONTRIBUTORS

6

OPEN ISSUES

11

OPEN PRs

1
VersionTagPublished
1.1.5
latest
2yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate