@snema/vue3-form-element
TypeScript icon, indicating that this package has built-in type declarations

1.14.5 • Public • Published

@snema/vue3-form-element

Element Plus Vue3 JSON Schema

@snema/vue3-form-core ElementPlus

## npm
npm install --save @snema/vue3-form-element

## yarn
yarn add @snema/vue3-form-element

<VueForm
    v-model="formData"
    :schema="schema"
>
</VueForm>
//
import VueForm from '@snema/vue3-form-element';

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

Package Sidebar

Install

npm i @snema/vue3-form-element

Weekly Downloads

3

Version

1.14.5

License

Apache-2.0

Unpacked Size

1.24 MB

Total Files

15

Last publish

Collaborators

  • emachine