| | |
| | | if (url || !src) return |
| | | |
| | | let index = 0 |
| | | let _list = [] |
| | | |
| | | if (list.length > 0) { |
| | | if (list.length > 1) { |
| | | index = list.indexOf(src) |
| | | _list = list |
| | | } |
| | | |
| | | this.setState({url: src, className: 'opening', list, scale: 1, rotate: 0, index}) |
| | | this.setState({url: src, className: 'opening', list: _list, scale: 1, rotate: 0, index}) |
| | | setTimeout(() => { |
| | | this.setState({className: 'open'}) |
| | | }, 300) |
| | |
| | | return |
| | | } |
| | | |
| | | let style = null |
| | | |
| | | if (item.component === 'search') { // 搜索组件不可重复添加 |
| | | if (cards.filter(card => card.type === 'search').length > 0) { |
| | | notification.warning({ |
| | |
| | | }) |
| | | return |
| | | } |
| | | if (!menu.style.paddingBottom) { |
| | | style = {...menu.style, paddingBottom: '50px'} |
| | | } |
| | | } else if (item.component === 'topbar') { |
| | | if (cards.filter(card => card.type === 'topbar').length > 0) { |
| | | notification.warning({ |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | if (!menu.style.paddingTop) { |
| | | style = {...menu.style, paddingTop: '50px'} |
| | | } |
| | | } |
| | | |
| | |
| | | _cards.push(Navbar) |
| | | } |
| | | |
| | | handleList({...menu, components: _cards}) |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | } |
| | | setCards(_cards) |
| | | } |
| | | }) |
| | |
| | | return |
| | | } |
| | | |
| | | let style = null |
| | | |
| | | if (item.component === 'search') { // 搜索组件不可重复添加 |
| | | if (cards.filter(card => card.type === 'search').length > 0) { |
| | | notification.warning({ |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (!menu.style.paddingTop) { |
| | | style = {...menu.style, paddingTop: '50px'} |
| | | } |
| | | } |
| | | |
| | |
| | | const { index: overIndex } = findCard(`${targetId}`) |
| | | const _cards = update(cards, { $splice: [[overIndex + 1, 0, newcard]] }) |
| | | |
| | | handleList({...menu, components: _cards}) |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | } |
| | | setCards(_cards) |
| | | } |
| | | }) |
| | |
| | | |
| | | config.components.unshift(_config) |
| | | |
| | | if (sessionStorage.getItem('appType') !== 'pc' && !config.style.paddingBottom) { |
| | | config.style.paddingBottom = '50px' |
| | | } else if (sessionStorage.getItem('appType') === 'pc' && !config.style.paddingTop) { |
| | | config.style.paddingTop = '50px' |
| | | } |
| | | |
| | | this.setState({ |
| | | visible: false |
| | | }) |
| | |
| | | <div> |
| | | {photos.map((url, i) => ( |
| | | <Col key={i} span={cols}> |
| | | <div className="ant-mk-picture" style={{paddingTop, backgroundImage: `url('${url}')`}}></div> |
| | | <div className="ant-mk-picture" onClick={() => { |
| | | if (col.scale !== 'true') return |
| | | MKEmitter.emit('mkImageScale', url, photos) |
| | | }} style={{paddingTop, backgroundImage: `url('${url}')`}}></div> |
| | | </Col> |
| | | ))} |
| | | </div> |
| | |
| | | <div className="picture-col"> |
| | | {photos && photos.map((url, i) => { |
| | | if (item.scale === 'true') { |
| | | return <img style={{maxHeight: maxHeight}} className="image-scale" onClick={() => { |
| | | MKEmitter.emit('mkImageScale', url, photos.length > 1 ? photos : '') |
| | | return <img style={{maxHeight: maxHeight}} className="image-scale" onClick={(e) => { |
| | | e.stopPropagation() |
| | | MKEmitter.emit('mkImageScale', url, photos) |
| | | }} key={`${i}`} src={url} alt=""/> |
| | | } else { |
| | | return <img style={{maxHeight: maxHeight}} key={`${i}`} src={url} alt=""/> |
| | |
| | | <div className="content-fence-top" style={images[0] ? {textAlign: images[0].align} : null}> |
| | | {images.map((_img, index) => { |
| | | if (_img.scale) { |
| | | return <img style={{maxHeight: _img.maxHeight}} className="image-scale" onClick={() => { |
| | | MKEmitter.emit('mkImageScale', _img.url, images.length > 1 ? images.map(g => g.url) : '') |
| | | return <img style={{maxHeight: _img.maxHeight}} className="image-scale" onClick={(e) => { |
| | | e.stopPropagation() |
| | | MKEmitter.emit('mkImageScale', _img.url, images.map(g => g.url)) |
| | | }} key={`${index}`} src={_img.url} alt=""/> |
| | | } else { |
| | | return (<img style={{maxHeight: _img.maxHeight}} key={`${index}`} src={_img.url} alt=""/>) |
| | |
| | | {images.map((_img, index) => { |
| | | if (_img.scale) { |
| | | return <img style={{maxHeight: _img.maxHeight}} className="image-scale" onClick={() => { |
| | | MKEmitter.emit('mkImageScale', _img.url, images.length > 1 ? images.map(g => g.url) : '') |
| | | MKEmitter.emit('mkImageScale', _img.url, images.map(g => g.url)) |
| | | }} key={`${index}`} src={_img.url} alt=""/> |
| | | } else { |
| | | return (<img style={{maxHeight: _img.maxHeight}} key={`${index}`} src={_img.url} alt=""/>) |
| | |
| | | .picture-col { |
| | | img { |
| | | max-width: 100%; |
| | | display: block; |
| | | display: inline-block; |
| | | } |
| | | img + img { |
| | | margin-top: 10px; |
| | |
| | | line-height: 1.3; |
| | | float: left; |
| | | } |
| | | .ant-btn + .field-name { |
| | | float: none; |
| | | } |
| | | .ant-checkbox-group { |
| | | line-height: 40px; |
| | | .ant-checkbox-wrapper { |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <Select |
| | | getPopupContainer={() => document.getElementById('columncolspan')} |
| | | > |
| | | <Select getPopupContainer={() => document.getElementById('columncolspan')} > |
| | | <Select.Option value="vertical">{this.props.dict['header.form.vertical']}</Select.Option> |
| | | <Select.Option value="horizontal">{this.props.dict['header.form.horizontal']}</Select.Option> |
| | | <Select.Option value="vertical2">{this.props.dict['header.form.vertical2']}</Select.Option> |
| | |
| | | .ant-empty { |
| | | margin: 15vh 8px; |
| | | } |
| | | .ant-card-bordered { |
| | | border: 1px solid #e8e8e8; |
| | | } |
| | | } |
| | | .ant-modal-body::-webkit-scrollbar { |
| | | width: 7px; |