| | |
| | | import React, { Component } from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Popover, Icon, Input } from 'antd' |
| | | import { Popover, Icon, Input, Button } from 'antd' |
| | | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | |
| | | import getWrapForm from './options' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const { Search } = Input |
| | | |
| | | const NormalForm = asyncIconComponent(() => import('@/components/normalform')) |
| | | |
| | |
| | | width: 24, |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | wrap: { name: card.name, width: 24, label: '搜索', field: '', show: 'button' }, |
| | | wrap: { name: card.name, width: 24, label: '搜索', field: '', show: 'text' }, |
| | | style: { |
| | | marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px', |
| | | paddingLeft: '10px', paddingRight: '10px', paddingTop: '10px', paddingBottom: '10px', |
| | |
| | | } |
| | | |
| | | getWrapForms = () => { |
| | | const { wrap, action } = this.state.card |
| | | const { wrap } = this.state.card |
| | | |
| | | return getWrapForm(wrap, action) |
| | | return getWrapForm(wrap) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | |
| | | |
| | | return ( |
| | | <div className="single-search-edit-list" onClick={this.clickComponent} id={card.uuid} style={_style}> |
| | | <Search placeholder={card.wrap.label} value={card.initval} enterButton /> |
| | | <Input placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} /> |
| | | <div className="search-wrap" style={{borderRadius: card.wrap.borderRadius || 0}}> |
| | | <Input placeholder={card.wrap.label} value={card.initval} /> |
| | | {card.wrap.scan === 'show' ? <Icon type="scan" /> : null} |
| | | {card.wrap.show === 'text' ? <Button type="primary">搜索</Button> : <Button icon="search" type="primary"></Button>} |
| | | </div> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <NormalForm title="搜索设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |