@ezijing/vue-form

2.5.32 • Public • Published

vue-form

安装

npm install @ezijing/vue-form --save

yarn add @ezijing/vue-form --save

使用

全局使用

import VueForm from 'vue-form'

Vue.use(VueForm)

组件中使用

<template>
  <vue-form :model="formModel" :items="formItems" />
</template>
<script>
import VueForm from 'vue-form'

export default {
  components: { VueForm },
  data() {
    return {
      formModel: {
        name: ''
      },
      formItems: [
        {
          type: 'input',
          model: 'name',
          placeholder: '请输入昵称'
        }
      ]
    }
  }
}
</script>

属性

From 属性

属性 类型 说明
options Object el-form 属性配置参考:https://element.eleme.cn/#/zh-CN/component/form#form-attributes
model Object 数据模型
items Array 表单项

Form-Item 属性

参考:https://element.eleme.cn/#/zh-CN/component/form#form-item-attributes

方法

参考:https://element.eleme.cn/#/zh-CN/component/form#form-methods

事件

事件名 返回值 说明
submit 类型:Object; 说明:数据模型 提交

Readme

Keywords

Package Sidebar

Install

npm i @ezijing/vue-form

Weekly Downloads

299

Version

2.5.32

License

none

Unpacked Size

55.4 kB

Total Files

6

Last publish

Collaborators

  • god_zyx
  • haodaking