| | |
| | | |
| | | let formItem = null |
| | | if (card.type === 'text' || card.type === 'number') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval}</div>{card.scan && card.scan !== 'false' ? <div className="am-list-extra"><Icon type="scan" /></div> : null}</div></div>) |
| | | formItem = (<div className={'am-list-item ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>{card.placeholder || ''}</span> }</div>{card.scan && card.scan !== 'false' ? <div className="am-list-extra"><Icon type="scan" /></div> : null}</div></div>) |
| | | } else if (card.type === 'number') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval}</div></div></div>) |
| | | } else if (card.type === 'select' || card.type === 'link') { |
| | |
| | | } |
| | | } |
| | | } |
| | | .am-list-item.up_down { |
| | | height: auto; |
| | | .am-list-line { |
| | | display: block; |
| | | .am-input-label { |
| | | width: auto; |
| | | line-height: 32px; |
| | | } |
| | | .am-input-control { |
| | | height: 40px; |
| | | line-height: 24px; |
| | | } |
| | | .am-list-extra { |
| | | display: none; |
| | | } |
| | | } |
| | | } |
| | | .am-list-item.check-card { |
| | | height: auto; |
| | | .am-list-line { |
| | |
| | | .menu-sign { |
| | | text-align: center; |
| | | .anticon { |
| | | border-radius: 50%; |
| | | border-radius: 15%; |
| | | } |
| | | img { |
| | | border-radius: 50%; |
| | | border-radius: 15%; |
| | | } |
| | | } |
| | | } |
| | |
| | | padding: card.setting.padding, |
| | | background: card.setting.background, |
| | | color: card.setting.color, |
| | | borderRadius: card.setting.borderRadius || '50%' |
| | | borderRadius: card.setting.borderRadius || '15%' |
| | | }} type={card.setting.icon}/> |
| | | </div> : <div className="menu-sign"> |
| | | <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '50%'}} src={card.setting.url} alt=""/> |
| | | <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url} alt=""/> |
| | | </div>} |
| | | <div className="menu-name">{card.setting.name}</div> |
| | | </div> |
| | |
| | | type: 'styleInput', |
| | | field: 'borderRadius', |
| | | label: '圆角', |
| | | initval: setting.borderRadius || '50%', |
| | | initval: setting.borderRadius || '15%', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'place', |
| | | label: '排列', |
| | | initVal: card.place || 'left_right', |
| | | tooltip: '提示文字与输入框的位置关系。注:上下排列是会禁用扫码功能。', |
| | | forbid: appType !== 'mob', |
| | | options: [{ |
| | | value: 'left_right', |
| | | text: '左右' |
| | | }, { |
| | | value: 'up_down', |
| | | text: '上下' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'count', |
| | | label: '计数功能', |
| | | initVal: card.count || 'false', |
| | |
| | | const DataTable = asyncComponent(() => import('./datatable')) |
| | | |
| | | const modalTypeOptions = { |
| | | text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder'], |
| | | number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline'], |
| | | text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place'], |
| | | number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place'], |
| | | select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown'], |
| | | checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange'], |
| | | radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange'], |
| | |
| | | error = `组件《${item.name}》未设置数据源!` |
| | | } else if (!item.setting.primaryKey) { |
| | | error = `组件《${item.name}》未设置主键!` |
| | | } else if (!item.setting.supModule) { |
| | | } else if (!item.setting.supModule && item.type !== 'balcony') { |
| | | error = `组件《${item.name}》未设置上级组件!` |
| | | } |
| | | } |
| | |
| | | error = `组件《${item.name}》未设置数据源!` |
| | | } else if (!item.setting.primaryKey) { |
| | | error = `组件《${item.name}》未设置主键!` |
| | | } else if (!item.setting.supModule && item.type !== 'navbar') { |
| | | } else if (!item.setting.supModule && item.type !== 'navbar' && item.type !== 'balcony') { |
| | | error = `组件《${item.name}》未设置上级组件!` |
| | | } |
| | | } |
| | |
| | | error = `组件《${item.name}》未设置数据源!` |
| | | } else if (!item.setting.primaryKey) { |
| | | error = `组件《${item.name}》未设置主键!` |
| | | } else if (!item.setting.supModule) { |
| | | } else if (!item.setting.supModule && item.type !== 'balcony') { |
| | | error = `组件《${item.name}》未设置上级组件!` |
| | | } |
| | | } |