@pisx/vue3-json-schema-form-ant
TypeScript icon, indicating that this package has built-in type declarations

1.19.0 • Public • Published

@lljj/vue3-form-ant

基于 Antd Vue 、Vue3、 JSON Schema 生成表单

通过 @lljj/vue3-form-core 适配 Ant Design Vue3 库

安装

## npm
npm install --save @lljj/vue3-form-ant

## yarn
yarn add @lljj/vue3-form-ant

使用

<VueForm
    v-model="formData"
    :schema="schema"
>
</VueForm>
//  使用
import VueForm from '@lljj/vue3-form-ant';

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

/@pisx/vue3-json-schema-form-ant/

    Package Sidebar

    Install

    npm i @pisx/vue3-json-schema-form-ant

    Weekly Downloads

    6

    Version

    1.19.0

    License

    Apache-2.0

    Unpacked Size

    78.1 kB

    Total Files

    16

    Last publish

    Collaborators

    • lucky_bear
    • eloves
    • fiikee