You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
327 lines
11 KiB
327 lines
11 KiB
layui.define(['layer'], function (exports) {
|
|
|
|
var formField = {
|
|
components: {
|
|
input: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "单行文本",
|
|
tag: "input",
|
|
tagIcon: 'input',
|
|
placeholder: "请输入",
|
|
defaultValue: null,
|
|
labelWidth: 110,
|
|
width: "100%",
|
|
fieldType: "1",
|
|
clearable: true,
|
|
maxlength: null,
|
|
showWordLimit: false,
|
|
// readonly: false,
|
|
// disabled: false,
|
|
required: false
|
|
// hideLabel: false,
|
|
// dimension: false,
|
|
// expression: ""
|
|
// document: '',
|
|
},
|
|
select: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "下拉框",
|
|
tag: "select",
|
|
tagIcon: 'select',
|
|
labelWidth: 110,
|
|
width: "100%",
|
|
// disabled: false,
|
|
required: false,
|
|
// hideLabel: false,
|
|
// document: '',
|
|
// datasourceType: 'local',
|
|
// remoteUrl: 'http://',
|
|
// remoteMethod: 'post',
|
|
// remoteOptionText: 'options.data.dictName',//映射到text
|
|
// remoteOptionValue: 'options.data.dictId',//映射到value text和value可以是一样的
|
|
// remoteDefaultValue: '12',//表示对应的remoteOptionValue的值
|
|
options: [
|
|
{
|
|
text: 'option1',
|
|
value: 'value1',
|
|
checked: true,
|
|
},
|
|
{
|
|
text: 'option2',
|
|
value: 'value2',
|
|
checked: false,
|
|
},
|
|
{
|
|
text: 'option3',
|
|
value: 'value3',
|
|
checked: false,
|
|
},
|
|
]
|
|
},
|
|
radio: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "单选组",
|
|
tag: "radio",
|
|
tagIcon: 'radio',
|
|
labelWidth: 110,
|
|
required: false,
|
|
// disabled: false,
|
|
// hideLabel: false,
|
|
// document: '',
|
|
// datasourceType: 'local',
|
|
// remoteUrl: 'http://',
|
|
// remoteMethod: 'post',
|
|
// remoteOptionText: 'options.data.dictName',//映射到text
|
|
// remoteOptionValue: 'options.data.dictId',//映射到value text和value可以是一样的
|
|
options: [
|
|
{
|
|
text: 'option1',
|
|
value: 'value1',
|
|
checked: true,
|
|
},
|
|
{
|
|
text: 'option2',
|
|
value: 'value2',
|
|
checked: false,
|
|
},
|
|
{
|
|
text: 'option3',
|
|
value: 'value3',
|
|
checked: false,
|
|
},
|
|
]
|
|
},
|
|
checkbox: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "复选组",
|
|
tag: "checkbox",
|
|
tagIcon: 'checkbox',
|
|
labelWidth: 110,
|
|
// disabled: false,
|
|
required: false,
|
|
// hideLabel: false,
|
|
// document: '',
|
|
// datasourceType: 'local',
|
|
// remoteUrl: 'http://',
|
|
// remoteMethod: 'post',
|
|
// remoteOptionText: 'options.data.dictName',//映射到text
|
|
// remoteOptionValue: 'options.data.dictId',//映射到value text和value可以是一样的
|
|
options: [
|
|
{
|
|
text: 'option1',
|
|
value: 'value1',
|
|
checked: true,
|
|
},
|
|
{
|
|
text: 'option2',
|
|
value: 'value2',
|
|
checked: true,
|
|
},
|
|
{
|
|
text: 'option3',
|
|
value: 'value3',
|
|
checked: false,
|
|
},
|
|
]
|
|
},
|
|
labelGeneration: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "标签组件",
|
|
tag: "labelGeneration",
|
|
tagIcon: 'labelGeneration',
|
|
labelWidth: 110,
|
|
width: "100%",
|
|
isEnter: false,
|
|
disabled: false,
|
|
document: '',
|
|
},
|
|
|
|
date: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "日期",
|
|
tag: "date",
|
|
tagIcon: 'date',
|
|
labelWidth: 110,
|
|
width: "100%",
|
|
clearable: true,
|
|
maxlength: null,
|
|
dateDefaultValue: '',
|
|
dateType: "date",//year month date time datetime
|
|
range: false,
|
|
dateFormat: "yyyy-MM-dd",
|
|
isInitValue: false,
|
|
dataMaxValue: "2088-12-31",
|
|
dataMinValue: "1900-01-01",
|
|
trigger: null,//自定义弹出控件的事件
|
|
position: "absolute",//fixed,static,abolute
|
|
theme: "default",
|
|
mark: null,//每年的日期 {'0-9-18': '国耻'} 0 即代表每一年
|
|
showBottom: true,
|
|
zindex: 66666666,
|
|
// disabled: false,
|
|
required: false,
|
|
// hideLabel: false,
|
|
// document: '',
|
|
},
|
|
dateRange: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "日期范围",
|
|
tag: "dateRange",
|
|
tagIcon: 'dateRange',
|
|
labelWidth: 110,
|
|
//width:"100%",
|
|
dateRangeDefaultValue: "2021-06-19 - 2021-07-17",
|
|
clearable: true,
|
|
maxlength: null,
|
|
dateType: "date",//year month date time datetime
|
|
dateFormat: "yyyy-MM-dd",
|
|
isInitValue: true,
|
|
dataMaxValue: "2088-12-31",
|
|
dataMinValue: "1900-01-01",
|
|
trigger: null,//自定义弹出控件的事件
|
|
position: "absolute",//fixed,static,abolute
|
|
theme: "default",
|
|
mark: null,//每年的日期 {'0-9-18': '国耻'} 0 即代表每一年
|
|
showBottom: true,
|
|
zindex: 66666666,
|
|
disabled: false,
|
|
required: true,
|
|
hideLabel: false,
|
|
document: '',
|
|
},
|
|
rate: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "评分",
|
|
tag: "rate",
|
|
tagIcon: 'rate',
|
|
labelWidth: 110,
|
|
defaultValue: 0,
|
|
rateLength: 5,//星星长度
|
|
half: false,
|
|
text: false,
|
|
theme: "default",
|
|
colorSelection: "#ffb800",
|
|
required: false,
|
|
showBottom: true
|
|
// readonly: false,
|
|
// hideLabel: false,
|
|
// document: '',
|
|
},
|
|
image: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "上传图片",
|
|
tag: "image",
|
|
tagIcon: 'image',
|
|
placeholder: "请输入",
|
|
defaultValue: null,
|
|
labelWidth: null,
|
|
// disabled: false,
|
|
required: false,
|
|
// document: '',
|
|
// uploadUrl: '',
|
|
},
|
|
file: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "上传文件",
|
|
tag: "file",
|
|
tagIcon: 'file',
|
|
// placeholder: "请输入",
|
|
// defaultValue: null,
|
|
// labelWidth: null,
|
|
// disabled: false,
|
|
required: false,
|
|
// document: '',
|
|
// uploadUrl: '',
|
|
},
|
|
textarea: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "多行文本",
|
|
tag: "textarea",
|
|
tagIcon: 'textarea',
|
|
placeholder: "请输入",
|
|
defaultValue: null,
|
|
width: "100%",
|
|
// readonly: false,
|
|
// disabled: false,//这里就是readonly的医生
|
|
required: false,
|
|
// hideLabel: false,
|
|
// document: ''
|
|
},
|
|
blockquote: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "便签信息",
|
|
tag: "blockquote",
|
|
tagIcon: 'blockquote',
|
|
defaultValue: "便签信息",
|
|
width: "100%",
|
|
colorSelection: "#5fb878",
|
|
document: ''
|
|
},
|
|
line: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "分割线",
|
|
tag: "line",
|
|
tagIcon: 'line',
|
|
defaultValue: "分割线",
|
|
width: "100%",
|
|
colorSelection: "#5fb878",
|
|
document: ''
|
|
},
|
|
textField: {
|
|
id: '-1',
|
|
index: '-1',
|
|
label: "HTML",
|
|
tag: "textField",
|
|
tagIcon: 'textField',
|
|
defaultValue: "HTML",
|
|
document: ''
|
|
}
|
|
},
|
|
componentsLang: [
|
|
{
|
|
component: "c1",
|
|
name: "输入型组件",
|
|
list: [
|
|
{ "key": "input", "icon": "layui-icon layui-icon-layer" },
|
|
{ "key": "textarea", "icon": "layui-icon layui-icon-list" }
|
|
]
|
|
},
|
|
{
|
|
component: "c2",
|
|
name: "选择型组件",
|
|
list: [
|
|
{ "key": "select", "icon": "layui-icon layui-icon-align-left" },
|
|
{ "key": "radio", "icon": "layui-icon layui-icon-radio" },
|
|
{ "key": "checkbox", "icon": "layui-icon layui-icon-list" },
|
|
{ "key": "date", "icon": "layui-icon layui-icon-time" },
|
|
{ "key": "rate", "icon": "layui-icon layui-icon-rate-solid" },
|
|
{ "key": "image", "icon": "layui-icon layui-icon-picture" },
|
|
{ "key": "file", "icon": "layui-icon layui-icon-export" }
|
|
]
|
|
},
|
|
{
|
|
component: "c3",
|
|
name: "布局型组件",
|
|
list: [
|
|
{ "key": "blockquote", "icon": "layui-icon layui-icon-note" },
|
|
{ "key": "line", "icon": "layui-icon layui-icon-subtraction" }
|
|
]
|
|
}
|
|
],
|
|
}
|
|
exports('formField', formField);
|
|
|
|
}); |