jsmom-form
表单组件
安装
npm i jsmom-form -S
or
yarn add jsmom-form
使用
- 引入
import MyForm from "jsmom-form"; - 注册
components: { MyForm, } - 页面
<MyForm></MyForm>
配置
-
fieldData 字段配置
Array<Object>- name
string字段名 - text
string展示文本 - formType
String类型 select|cascader|selectData|textarea|datetime|date|calendar|images|file|number|switch|content|text|html|radio - enumName
string枚举名 - formRules
Array<Object>|Function表单验证规则 - formSpan
Number表单占栅格数 最大 24 - inputStyle
String表单输入项 style - selectMultiple
Boolean多选 - clearable
Boolean可被清理 - optionLoading
Boolean|Function选择列表加载中 - isLazy
Boolean懒加载(级联选择) - lazyLoadFunction
Function懒加载函数(级联选择) - showAllLevels
Function显示所有级(级联选择) - isCheckStrictly
Boolean父子不关联(级联选择) - isCollapseTags
Boolean折叠选项 - selectOption
Array<Object>|Function选择项 - allowCreate
Boolean手动创建选择项 - filterable
Boolean是否可搜索 手动创建开启时必须为 true - defaultFirstOption
Boolean回车时选择第一个 - dateType
String日期类型 year|month|date|dates| week|datetime|datetimerange|daterange|monthrange - selectTable
String选择表 - selectParams
Object|Function选择额外的参数(selectData) - formEventMaps
Object<Function>表单多动态事件- beforeUpload 图片上传前
- selectBind
Object<Function>关联其他字段(selectData) - disabled
Boolean|Function禁用表单 - valueFormat
String格式化时间值 - textareaRowNum
Number文本域显示行数 - limit
Number限制文件图片数量 - showStepControls
Boolean显示步进控制条 - numberMin
Number|Function最小数值 - numberMax
Number|Function最大数值 - numberPrecision
Number数值精度 - numberStep
Number步进值 - switchActiveValue
Number|String|Boolean开关打开时的的值 - switchinactiveValue
Number|String|Boolean开关关闭时的值 - uploadUrl
String|Function文件上传 URL - checkUrl
String|Function检查服务器文件是上传情况 - mergeUrl
String|Function请求文件合并 URL - fromTable
String文件关联表 - downloadUrl
String|Function文件下载 - placeholder
String表单占位符 - fileList
Array<Object>附件时,文件列表 - action
String|Function图片文件上传地址 - imageUrl
String|Function图片预览地址 将替换$id - listType
String图片组件类型 - showFormItem
Boolean|Function显示在表单中 - showPreviewItem
Boolean|Function显示在预览中 - initalValue
any初使值 - formatterFunction
Function格式化方法 postFormatterDataFunctionFunction添加更新时的数据格式化editFormatterDataFunctionFunction编辑时的数据格式化- downloadUrl
String下载链接 替换$id - formatTextFunction
Function格式化自定义日历的内容 - formLabelWidth
String|Number单标签宽度 - formOnClick
Function点击表单事件 - formatterFormFunction
Function格式化表单方法 参数 { formData, value }
- name
-
isPreview 预览
Boolean -
size 组件大小
Stringmedium|small|mini -
configData
Object- editLabelWidth
String标签宽度 - headers
Object请求头信息 - baseApi
String请求地址
- editLabelWidth
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.38 | ^2.6.12 | MIT | |
| 1.0.37 | ^2.6.12 | MIT | |
| 1.0.36 | ^2.6.12 | MIT | |
| 1.0.35 | ^2.6.12 | MIT | |
| 1.0.34 | ^2.6.12 | MIT | |
| 1.0.33 | ^2.6.12 | MIT | |
| 1.0.32 | ^2.6.12 | MIT | |
| 1.0.31 | ^2.6.12 | MIT | |
| 1.0.30 | ^2.6.12 | MIT | |
| 1.0.29 | ^2.6.12 | MIT | |
| 1.0.28 | ^2.6.12 | MIT | |
| 1.0.27 | ^2.6.12 | MIT | |
| 1.0.26 | ^2.6.12 | MIT | |
| 1.0.25 | ^2.6.12 | MIT | |
| 1.0.24 | ^2.6.12 | MIT | |
| 1.0.23 | ^2.6.12 | MIT | |
| 1.0.22 | ^2.6.12 | MIT | |
| 1.0.21 | ^2.6.12 | MIT | |
| 1.0.20 | ^2.6.12 | MIT | |
| 1.0.19 | ^2.6.12 | MIT | |
| 1.0.18 | ^2.6.12 | MIT | |
| 1.0.17 | ^2.6.12 | MIT | |
| 1.0.16 | ^2.6.12 | MIT | |
| 1.0.15 | ^2.6.12 | MIT | |
| 1.0.13 | ^2.6.12 | MIT | |
| 1.0.12 | ^2.6.12 | MIT | |
| 1.0.11 | ^2.6.12 | MIT | |
| 1.0.10 | ^2.6.12 | MIT | |
| 1.0.9 | ^2.6.12 | MIT | |
| 1.0.8 | ^2.6.12 | MIT |
Showing the latest 30 of 38. See every release on npm