| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Popover, Checkbox } from 'antd' |
| | | import { Popover, Checkbox, message } from 'antd' |
| | | import { PlusOutlined, PlusSquareOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SettingOutlined, ToolOutlined, ClockCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | } |
| | | |
| | | getWrapForms = () => { |
| | | const { wrap } = this.state.card |
| | | const { card } = this.state |
| | | |
| | | return getWrapForm(wrap) |
| | | let buttons = [] |
| | | card.elements && card.elements.forEach(item => { |
| | | if (item.eleType === 'button') { |
| | | buttons.push({ |
| | | value: item.uuid, |
| | | label: item.label |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | return getWrapForm(card.wrap, buttons, card.columns) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | |
| | | <CardCellComponent cards={card} cardCell={card} elements={card.elements} updateElement={this.updateCard}/> |
| | | <div className="component-name"> |
| | | <div className="center"> |
| | | <div className="title">{card.name}</div> |
| | | <div className="title" onDoubleClick={() => { |
| | | let oInput = document.createElement('input') |
| | | oInput.value = card.uuid |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | message.success('复制成功。') |
| | | }}>{card.name}</div> |
| | | <div className="content"> |
| | | {card.errors && card.errors.map((err, index) => { |
| | | if (err.level === 0) { |