1.0.7 • Published 5 years ago

justine-form v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

##表单的简单封装 在element-ui上进行的封装,具体的传参可以参考element-ui传参方式

####参数设置

参数说明类型默认值
inline行内表单模式booleanfalse
formOptions表单样式及保存按钮样式Object
formData表单模板Object
formTemplate表单模板Object
formRules表单验证规则,具体的使用可以参照eleemnt-ui表单的规则验证Object

####formOptions 参数设置

参数说明类型可选值默认值
labelWidth表单 label 宽度String
labelPosition表单 label 位置String
saveButtonSize保存按钮尺寸Stringmedium / small / mini
saveButtonType保存按钮类型Stringprimary / success / warning / danger / info / text
saveButtonIcon保存按钮图标类名String
saveButtonText保存按钮文字String
saveLoading保存按钮是否加载中状态Booleanfalse

####formTemplate参数设置

参数说明类型可选值默认值
title表单 label 的名称String
value表单模板的默认值
component.name表单渲染的组件名,组件请参考 组件,自定义组件写法请参考自定义组件示例Stringel-input / el-input-number / el-radio / el-checkbox / el-select / el-cascader / el-switch / el-slider / el-time-select / el-time-picker / el-date-picker / el-rate / el-color-picker / 自定义组件el-input
component.optionsel-radio / el-checkbox / el-select 中的 optionsArray
component.show是否显示此项Boolean
component.disabled是否禁用此项Boolean
component.span表单布局所占栅格数,栅格布局请参考 Layout 布局Number
component.offset表单栅格布局偏移量,栅格布局请参考 Layout 布局Number

####安装

npm i justine-form

####使用

    import Vue from 'vue'
    import ElementUI from 'element-ui'
    import 'element-ui/lib/theme-chalk/index.css'
    import JustineForm from 'justine-form'
    Vue.use(ElementUI)
    Vue.use(JustineForm)
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago