king
2021-05-08 6afdec0062dacbded57e166230eb22cc55ced0c1
src/menu/components/search/main-search/dragsearch/index.jsx
@@ -2,12 +2,12 @@
import { useDrop } from 'react-dnd'
import { is, fromJS } from 'immutable'
import update from 'immutability-helper'
import { Col } from 'antd'
import { Col, Button } from 'antd'
import Utils from '@/utils/utils.js'
import Card from './card'
import './index.scss'
const Container = ({list, placeholder, handleList, handleMenu, deleteMenu }) => {
const Container = ({list, showField, placeholder, handleList, handleMenu, deleteMenu }) => {
  const [cards, setCards] = useState(list)
  const moveCard = (id, atIndex) => {
    const { card, index } = findCard(id)
@@ -67,7 +67,6 @@
    }
    const { index: overIndex } = findCard(id)
    const _cards = update(cards, { $splice: [[overIndex + 1, 0, copycard]] })
    handleList(_cards, copycard)
@@ -85,6 +84,7 @@
          <Card
            id={`${card.uuid}`}
            card={card}
            showField={showField}
            moveCard={moveCard}
            copyCard={copyCard}
            editCard={editCard}
@@ -93,7 +93,17 @@
          />
        </Col>
      ))}
      {cards.length > 0 ? <Col key="action" className="action" span={6}>
        <div className="ant-row ant-form-item" style={{lineHeight: '40px', height: '55px', marginBottom: 0}}>
          <div className="ant-col ant-form-item-label ant-col-xs-24 ant-col-sm-8">
          </div>
          <div className="ant-col ant-form-item-control-wrapper ant-col-xs-24 ant-col-sm-16">
            <Button type="primary">搜索</Button>
            <Button style={{ marginLeft: 8 }}>重置</Button>
            <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div>
          </div>
        </div>
      </Col> : null}
      {cards.length === 0 ?
        <div className="common-drawarea-placeholder">
          {placeholder}