king
2023-09-26 3140b58a56be4b1693766121dacb83fe6f6f21df
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>