src/components/normalform/modalform/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/normalform/modalform/mkSelect/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/menu/components/carousel/prop-card/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/components/normalform/modalform/index.jsx
@@ -32,6 +32,7 @@ state = { formlist: [], // 表单项 formId: '' } record = {} @@ -40,6 +41,15 @@ let record = {} let controlFields = {} let fieldMap = new Map() let formId = (() => { let uuid = [] let _options = '0123456789abcdefghigklmnopqrstuv' for (let i = 0; i < 19; i++) { uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1)) } uuid = uuid.join('') return uuid })() let formlist = this.props.formlist.filter(item => { if (item.controlFields) { // 多层表单控制 @@ -56,6 +66,7 @@ if (item.options) { item.oriOptions = fromJS(item.options).toJS() } item.$formId = formId if (item.type === 'text') { let _rules = [{ @@ -162,7 +173,7 @@ this.record = record this.setState({ formlist }) this.setState({ formlist, formId }) } checkNumber = (rule, value, callback, item) => { @@ -385,7 +396,7 @@ } return ( <Form {...formItemLayout} className="normal-form-field" id="normal-form-field"> <Form {...formItemLayout} className="normal-form-field" id={this.state.formId}> <Row gutter={24}>{this.getFields()}</Row> </Form> ) src/components/normalform/modalform/mkSelect/index.jsx
@@ -125,7 +125,7 @@ filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} onSelect={this.selectChange} onChange={(val) => val === undefined && this.selectChange('')} getPopupContainer={() => document.getElementById('normal-form-field')} getPopupContainer={() => config.$formId ? document.getElementById(config.$formId) : document.body} > {options.map((option, i) => <Select.Option key={i} disabled={option.disabled} value={option.field || ''}>{`${option.label}(${option.field})`}</Select.Option> @@ -142,7 +142,7 @@ filterOption={(input, option) => (option.props.children + option.props.extend).toLowerCase().indexOf(input.toLowerCase()) >= 0} onSelect={this.selectChange} onChange={(val) => val === undefined && this.selectChange('')} getPopupContainer={() => document.getElementById('normal-form-field')} getPopupContainer={() => config.$formId ? document.getElementById(config.$formId) : document.body} > {options.map((option, i) => <Select.Option key={i} disabled={option.disabled} title={option.label || option.text} extend={config.extendName ? (option[config.extendName] || '') : ''} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option> @@ -156,7 +156,7 @@ defaultValue={value} filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} onChange={this.mutilselectChange} getPopupContainer={() => document.getElementById('normal-form-field')} getPopupContainer={() => config.$formId ? document.getElementById(config.$formId) : document.body} > {options.map((option, i) => <Select.Option key={i} disabled={option.disabled} value={option.value || option.field}>{option.label || option.text}</Select.Option> src/menu/components/carousel/prop-card/index.jsx
@@ -255,7 +255,6 @@ <CopyComponent type="carpropcard" card={card}/> <PasteComponent config={card} options={['cardcell']} updateConfig={this.updateComponent} /> <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> <ClockComponent config={card} updateConfig={this.updateComponent}/> {card.wrap.datatype === 'dynamic' ? <ClockComponent config={card} updateConfig={this.updateComponent}/> : <ClockCircleOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>} <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}