| | |
| | | import './index.scss' |
| | | |
| | | const cardTypeOptions = { |
| | | text: ['eleType', 'datatype', 'format', 'fontSize', 'fontWeight', 'width', 'height', 'align', 'padding', 'prefix', 'postfix'], |
| | | number: ['eleType', 'datatype', 'format', 'fontSize', 'fontWeight', 'width', 'height', 'align', 'padding', 'prefix', 'postfix'], |
| | | picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'radius', 'padding', 'url'], |
| | | icon: ['eleType', 'icon', 'datatype', 'fontSize', 'width', 'align', 'padding'], |
| | | link: ['eleType', 'datatype', 'labelfield', 'fontSize', 'width', 'height', 'align', 'padding', 'prefix'], |
| | | slider: ['eleType', 'datatype', 'width', 'color', 'padding', 'maxValue'], |
| | | splitline: ['eleType', 'color', 'width', 'padding'], |
| | | text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix'], |
| | | number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix'], |
| | | picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'url'], |
| | | icon: ['eleType', 'icon', 'datatype', 'width'], |
| | | link: ['eleType', 'datatype', 'label', 'width', 'height', 'joint'], |
| | | slider: ['eleType', 'datatype', 'width', 'color', 'maxValue'], |
| | | splitline: ['eleType', 'color', 'width'], |
| | | } |
| | | |
| | | class MainSearch extends Component { |
| | |
| | | text: col.label |
| | | }) |
| | | } else if (/^Nvarchar/ig.test(col.datatype) && card.eleType !== 'number' && card.eleType !== 'slider') { |
| | | item.options.push({ |
| | | value: col.field, |
| | | text: col.label |
| | | }) |
| | | } |
| | | }) |
| | | } else if (item.key === 'labelfield') { |
| | | item.options = [] |
| | | config.columns.forEach(col => { |
| | | if (/^Nvarchar/ig.test(col.datatype)) { |
| | | item.options.push({ |
| | | value: col.field, |
| | | text: col.label |
| | |
| | | |
| | | if (item.type === 'text') { // 文本搜索 |
| | | let rules = [] |
| | | |
| | | if (item.key === 'padding') { |
| | | rules = [{ |
| | | pattern: /^\d+px$|^\d+px\s\d+px$|^\d+px\s\d+px\s\d+px$|^\d+px\s\d+px\s\d+px\s\d+px$/ig, |
| | | message: '请正确输入内边距!' |
| | | }] |
| | | } |
| | | |
| | | fields.push( |
| | | <Col span={12} key={index}> |