1.0.34 • Published 7 months ago
jsmom-form v1.0.34
表单组件
安装
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 - enumName
string
枚举名 - formRules
Array<Object>
表单验证规则 - 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 组件大小
String
medium|small|mini - configData
Object
- editLabelWidth
String
标签宽度 - headers
Object
请求头信息 - baseApi
String
请求地址
- editLabelWidth
1.0.33
7 months ago
1.0.34
7 months ago
1.0.29
12 months ago
1.0.32
11 months ago
1.0.31
12 months ago
1.0.30
12 months ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.22
1 year ago
1.0.21
1 year ago
1.0.20
1 year ago
1.0.26
1 year ago
1.0.25
1 year ago
1.0.24
1 year ago
1.0.23
1 year ago
1.0.28
1 year ago
1.0.27
1 year ago
1.0.15
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.9
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago