From 437c6d72f76072e5ab1b09e78101370805113c4b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 01 十月 2023 18:46:37 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/templates/sharecomponent/fieldscomponent/editcard/index.jsx | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx index 4387911..14338af 100644 --- a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx +++ b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx @@ -13,11 +13,12 @@ let _type = props.card.type if (!props.card.origin) { - if (props.type === 'columns') { - if (_type !== 'number') { - _type = 'text' - } - } else if (props.type === 'search') { + // if (props.type === 'columns') { + // if (_type !== 'number') { + // _type = 'text' + // } + // } + if (props.type === 'search') { if (_type === 'date' || _type === 'datetime') { _type = 'date' } else if (_type !== 'select') { @@ -74,8 +75,11 @@ render() { const { card, type } = this.state + + let hasPadding = type === 'search' || type === 'form' + return ( - <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '') + (card.origin ? ' fixed' : '')} > + <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '') + (card.origin ? ' fixed' : '') + (hasPadding ? ' has-padding' : '')} > <div className="base" onClick={this.changeSelect}> <CheckOutlined /> <p title={card.field}>瀛楁锛� <span>{card.field}</span></p> @@ -88,12 +92,12 @@ <Radio value="date">date</Radio> </Radio.Group> : null } - {type === 'columns' ? + {/* {type === 'columns' ? <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}> <Radio value="text">text</Radio> <Radio value="number">number</Radio> </Radio.Group> : null - } + } */} {type === 'form' ? <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}> <Radio value="text">text</Radio> -- Gitblit v1.8.0