@snema/vue3-form-element
v1.14.5
Published
Vue3 ElementPlusJsonSchemaform
Downloads
1
Readme
@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