| | |
| | | let _style = resetStyle(card.style) |
| | | |
| | | return ( |
| | | <div className="menu-editor-sand-box" style={_style} onClick={this.clickComponent} id={card.uuid}> |
| | | <div className="menu-tree-box" style={_style} onClick={this.clickComponent} id={card.uuid}> |
| | | <NormalHeader config={card} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | |
| | | .menu-editor-sand-box { |
| | | .menu-tree-box { |
| | | position: relative; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 30px; |
| | | min-height: 50px; |
| | | overflow-y: auto; |
| | | |
| | | .anticon-tool { |
| | | position: absolute; |
| | |
| | | color: #bcbcbc; |
| | | } |
| | | } |
| | | .menu-editor-sand-box::after { |
| | | .menu-tree-box::after { |
| | | display: block; |
| | | content: ' '; |
| | | clear: both; |
| | | } |
| | | .menu-editor-sand-box:hover { |
| | | .menu-tree-box:hover { |
| | | z-index: 1; |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | } |
| | | .menu-tree-box::-webkit-scrollbar { |
| | | display: none; |
| | | } |
| | | |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Collapse, Form, Col, Icon, InputNumber, Select, Radio, Drawer, Button } from 'antd' |
| | | import { Collapse, Form, Col, InputNumber, Select, Radio, Drawer, Button } from 'antd' |
| | | import { |
| | | ColumnHeightOutlined, |
| | | FontSizeOutlined, |
| | | BoldOutlined, |
| | | LineHeightOutlined, |
| | | ColumnWidthOutlined, |
| | | FontColorsOutlined, |
| | | ItalicOutlined, |
| | | AlignLeftOutlined, |
| | | AlignCenterOutlined, |
| | | AlignRightOutlined, |
| | | UnderlineOutlined, |
| | | StrikethroughOutlined, |
| | | BgColorsOutlined, |
| | | BorderOutlined, |
| | | BorderOuterOutlined, |
| | | BorderLeftOutlined, |
| | | BorderRightOutlined, |
| | | BorderTopOutlined, |
| | | BorderBottomOutlined, |
| | | RadiusSettingOutlined, |
| | | ArrowUpOutlined, |
| | | ArrowDownOutlined, |
| | | ArrowLeftOutlined, |
| | | ArrowRightOutlined, |
| | | SwapOutlined, |
| | | } from '@ant-design/icons' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import ColorSketch from '@/mob/colorsketch' |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="高度" type="column-height" />} |
| | | label={<ColumnHeightOutlined title="高度" />} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={this.changeHeight}/> |
| | |
| | | </Panel> : null} |
| | | {options.includes('font') ? <Panel header="字体" key="font"> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<Icon title="字体大小" type="font-size" />}> |
| | | <Form.Item colon={false} label={<FontSizeOutlined title="字体大小"/>}> |
| | | <InputNumber defaultValue={''} min={12} max={100} precision={0} onChange={this.changeFontSize} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<Icon title="字体粗细" type="bold" />}> |
| | | <Form.Item colon={false} label={<BoldOutlined title="字体粗细"/>}> |
| | | <Select defaultValue={''} onChange={this.boldChange}> |
| | | <Option value="normal">normal</Option> |
| | | <Option value="bold">bold</Option> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<Icon title="行高" type="line-height" />}> |
| | | <Form.Item colon={false} label={<LineHeightOutlined title="行高" />}> |
| | | <InputNumber defaultValue={''} min={1} max={10} precision={1} onChange={this.changeLineHeight} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<Icon title="字间距" type="column-width" />}> |
| | | <Form.Item colon={false} label={<ColumnWidthOutlined title="字间距"/>}> |
| | | <InputNumber defaultValue={''} min={0} max={100} precision={0} onChange={this.changeLetterSpacing}/> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="字体颜色" type="font-colors" />} |
| | | label={<FontColorsOutlined title="字体颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch onChange={this.changeFontColor} /> |
| | |
| | | > |
| | | <Radio.Group defaultValue={''} onChange={this.changeFontStyle}> |
| | | <Radio.Button value="normal"><span title="标准">N</span></Radio.Button> |
| | | <Radio.Button value="italic"><Icon title="斜体" type="italic" /></Radio.Button> |
| | | <Radio.Button value="italic"><ItalicOutlined title="斜体"/></Radio.Button> |
| | | <Radio.Button value="oblique" style={{fontStyle: 'oblique'}}><span title="倾斜">B</span></Radio.Button> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group className="text-align" defaultValue={''} onChange={this.changeTextAlign}> |
| | | <Radio.Button value="left"><Icon title="左对齐" type="align-left" /></Radio.Button> |
| | | <Radio.Button value="center"><Icon title="居中对齐" type="align-center" /></Radio.Button> |
| | | <Radio.Button value="right"><Icon title="右对齐" type="align-right" /></Radio.Button> |
| | | <Radio.Button value="left"><AlignLeftOutlined title="左对齐"/></Radio.Button> |
| | | <Radio.Button value="center"><AlignCenterOutlined title="居中对齐"/></Radio.Button> |
| | | <Radio.Button value="right"><AlignRightOutlined title="右对齐"/></Radio.Button> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | > |
| | | <Radio.Group className="text-decoration" defaultValue={''} onChange={this.changeTextDecoration}> |
| | | <Radio.Button value="none"><span title="标准">N</span></Radio.Button> |
| | | <Radio.Button value="underline"><Icon title="下划线" type="underline" /></Radio.Button> |
| | | <Radio.Button value="line-through"><Icon title="中划线" type="strikethrough" /></Radio.Button> |
| | | <Radio.Button value="underline"><UnderlineOutlined title="下划线"/></Radio.Button> |
| | | <Radio.Button value="line-through"><StrikethroughOutlined title="中划线"/></Radio.Button> |
| | | <Radio.Button value="overline" style={{textDecoration: 'overline'}}><span title="上划线">O</span></Radio.Button> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="背景颜色" type="bg-colors" />} |
| | | label={<BgColorsOutlined title="背景颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch onChange={this.changeBackgroundColor} /> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="边框位置" type="border" />} |
| | | label={<BorderOutlined title="边框位置"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group className="border-position" defaultValue={'outer'} onChange={(e) => this.setState({borposition: e.target.value})}> |
| | | <Radio value="outer"><Icon title="外边框" type="border-outer" /></Radio> |
| | | <Radio value="left"><Icon title="左边框" type="border-left" /></Radio> |
| | | <Radio value="right"><Icon title="右边框" type="border-right" /></Radio> |
| | | <Radio value="top"><Icon title="上边框" type="border-top" /></Radio> |
| | | <Radio value="bottom"><Icon title="下边框" type="border-bottom" /></Radio> |
| | | <Radio value="outer"><BorderOuterOutlined title="外边框"/></Radio> |
| | | <Radio value="left"><BorderLeftOutlined title="左边框"/></Radio> |
| | | <Radio value="right"><BorderRightOutlined title="右边框"/></Radio> |
| | | <Radio value="top"><BorderTopOutlined title="上边框"/></Radio> |
| | | <Radio value="bottom"><BorderBottomOutlined title="下边框"/></Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="边框样式" type="border-outer" />} |
| | | label={<BorderOuterOutlined title="边框样式"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | {borposition === 'outer' ? <Select defaultValue={'solid'} onChange={this.changeBorderStyle}> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="边框宽度" type="column-width" />} |
| | | label={<ColumnWidthOutlined title="边框宽度"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | {borposition === 'outer' ? <StyleInput defaultValue={''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="边框颜色" type="bg-colors" />} |
| | | label={<BgColorsOutlined title="边框颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | {borposition === 'outer' ? <ColorSketch onChange={this.changeBorderColor} /> : null} |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="圆角" type="radius-setting" />} |
| | | label={<RadiusSettingOutlined title="圆角"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={'0px'} options={['px', '%']} onChange={(val) => this.changeNormalStyle(val, 'borderRadius')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="阴影颜色" type="bg-colors" />} |
| | | label={<BgColorsOutlined title="阴影颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch onChange={this.changeShadowColor} /> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="上边距" type="arrow-up"/>} |
| | | label={<ArrowUpOutlined title="上边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={(val) => this.changeNormalStyle(val, 'marginTop')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="下边距" type="arrow-down"/>} |
| | | label={<ArrowDownOutlined title="下边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={(val) => this.changeNormalStyle(val, 'marginBottom')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="左边距" type="arrow-left"/>} |
| | | label={<ArrowLeftOutlined title="左边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={(val) => this.changeNormalStyle(val, 'marginLeft')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="右边距" type="arrow-right"/>} |
| | | label={<ArrowRightOutlined title="右边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={(val) => this.changeNormalStyle(val, 'marginRight')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="上边距" type="arrow-up"/>} |
| | | label={<ArrowUpOutlined title="上边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={(val) => this.changeNormalStyle(val, 'paddingTop')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="下边距" type="arrow-down"/>} |
| | | label={<ArrowDownOutlined title="下边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={(val) => this.changeNormalStyle(val, 'paddingBottom')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="左边距" type="arrow-left"/>} |
| | | label={<ArrowLeftOutlined title="左边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={(val) => this.changeNormalStyle(val, 'paddingLeft')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="右边距" type="arrow-right"/>} |
| | | label={<ArrowRightOutlined title="右边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={''} options={['px', 'vh', 'vw']} onChange={(val) => this.changeNormalStyle(val, 'paddingRight')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="浮动" type="swap" />} |
| | | label={<SwapOutlined title="浮动"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group defaultValue={''} onChange={(e) => this.changeNormalStyle(e.target.value, 'float')}> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Collapse, Form, Col, Icon, InputNumber, Select, Radio, Drawer, Button } from 'antd' |
| | | import { Collapse, Form, Col, InputNumber, Select, Radio, Drawer, Button } from 'antd' |
| | | import { |
| | | ColumnHeightOutlined, |
| | | FontSizeOutlined, |
| | | BoldOutlined, |
| | | LineHeightOutlined, |
| | | ColumnWidthOutlined, |
| | | FontColorsOutlined, |
| | | ItalicOutlined, |
| | | AlignLeftOutlined, |
| | | AlignCenterOutlined, |
| | | AlignRightOutlined, |
| | | UnderlineOutlined, |
| | | StrikethroughOutlined, |
| | | BgColorsOutlined, |
| | | PictureOutlined, |
| | | BorderOutlined, |
| | | BorderOuterOutlined, |
| | | BorderLeftOutlined, |
| | | BorderRightOutlined, |
| | | BorderTopOutlined, |
| | | BorderBottomOutlined, |
| | | RadiusSettingOutlined, |
| | | ArrowUpOutlined, |
| | | ArrowDownOutlined, |
| | | ArrowLeftOutlined, |
| | | ArrowRightOutlined, |
| | | SwapOutlined, |
| | | } from '@ant-design/icons' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="宽度" type="column-width" />} |
| | | label={<ColumnWidthOutlined title="宽度"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.width || ''} options={['px', 'vh', 'vw', '%']} onChange={this.changeWidth}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="高度" type="column-height" />} |
| | | label={<ColumnHeightOutlined title="高度"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.height || ''} options={['px', 'vh', 'vw']} onChange={this.changeHeight}/> |
| | |
| | | </Panel> : null} |
| | | {options.includes('font') ? <Panel header="字体" key="font"> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<Icon title="字体大小" type="font-size" />}> |
| | | <Form.Item colon={false} label={<FontSizeOutlined title="字体大小"/>}> |
| | | <InputNumber defaultValue={card.fontSize || 14} min={12} max={100} precision={0} onChange={this.changeFontSize} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<Icon title="字体粗细" type="bold" />}> |
| | | <Form.Item colon={false} label={<BoldOutlined title="字体粗细"/>}> |
| | | <Select defaultValue={card.fontWeight || 'normal'} onChange={this.boldChange}> |
| | | <Option value="normal">normal</Option> |
| | | <Option value="bold">bold</Option> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<Icon title="行高" type="line-height" />}> |
| | | <Form.Item colon={false} label={<LineHeightOutlined title="行高"/>}> |
| | | <InputNumber defaultValue={card.lineHeight || 1.5} min={1} max={10} precision={1} onChange={this.changeLineHeight} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item colon={false} label={<Icon title="字间距" type="column-width" />}> |
| | | <Form.Item colon={false} label={<ColumnWidthOutlined title="字间距"/>}> |
| | | <InputNumber defaultValue={card.letterSpacing || 0} min={0} max={100} precision={0} onChange={this.changeLetterSpacing}/> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="字体颜色" type="font-colors" />} |
| | | label={<FontColorsOutlined title="字体颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch value={card.color || 'rgba(0, 0, 0, 0.85)'} onChange={this.changeFontColor} /> |
| | |
| | | > |
| | | <Radio.Group defaultValue={card.fontStyle || 'normal'} onChange={this.changeFontStyle}> |
| | | <Radio.Button value="normal"><span title="标准">N</span></Radio.Button> |
| | | <Radio.Button value="italic"><Icon title="斜体" type="italic" /></Radio.Button> |
| | | <Radio.Button value="italic"><ItalicOutlined title="斜体"/></Radio.Button> |
| | | <Radio.Button value="oblique" style={{fontStyle: 'oblique'}}><span title="倾斜">B</span></Radio.Button> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group className="text-align" defaultValue={card.textAlign || 'left'} onChange={this.changeTextAlign}> |
| | | <Radio.Button value="left"><Icon title="左对齐" type="align-left" /></Radio.Button> |
| | | <Radio.Button value="center"><Icon title="居中对齐" type="align-center" /></Radio.Button> |
| | | <Radio.Button value="right"><Icon title="右对齐" type="align-right" /></Radio.Button> |
| | | <Radio.Button value="left"><AlignLeftOutlined title="左对齐"/></Radio.Button> |
| | | <Radio.Button value="center"><AlignCenterOutlined title="居中对齐"/></Radio.Button> |
| | | <Radio.Button value="right"><AlignRightOutlined title="右对齐"/></Radio.Button> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | > |
| | | <Radio.Group className="text-decoration" defaultValue={card.textDecoration || 'none'} onChange={this.changeTextDecoration}> |
| | | <Radio.Button value="none"><span title="标准">N</span></Radio.Button> |
| | | <Radio.Button value="underline"><Icon title="下划线" type="underline" /></Radio.Button> |
| | | <Radio.Button value="line-through"><Icon title="中划线" type="strikethrough" /></Radio.Button> |
| | | <Radio.Button value="underline"><UnderlineOutlined title="下划线"/></Radio.Button> |
| | | <Radio.Button value="line-through"><StrikethroughOutlined title="中划线"/></Radio.Button> |
| | | <Radio.Button value="overline" style={{textDecoration: 'overline'}}><span title="上划线">O</span></Radio.Button> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="背景颜色" type="bg-colors" />} |
| | | label={<BgColorsOutlined title="背景颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch value={card.backgroundColor || '#ffffff'} onChange={this.changeBackgroundColor} /> |
| | |
| | | {!options.includes('backgroundColor') ? <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="背景图片" type="picture" />} |
| | | label={<PictureOutlined title="背景图片"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <SourceComponent value={backgroundImage} type="" placement="right" onChange={this.imgChange}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="边框位置" type="border" />} |
| | | label={<BorderOutlined title="边框位置"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group className="border-position" defaultValue={'outer'} onChange={(e) => this.setState({borposition: e.target.value})}> |
| | | <Radio value="outer"><Icon title="外边框" type="border-outer" /></Radio> |
| | | <Radio value="left"><Icon title="左边框" type="border-left" /></Radio> |
| | | <Radio value="right"><Icon title="右边框" type="border-right" /></Radio> |
| | | <Radio value="top"><Icon title="上边框" type="border-top" /></Radio> |
| | | <Radio value="bottom"><Icon title="下边框" type="border-bottom" /></Radio> |
| | | <Radio value="outer"><BorderOuterOutlined title="外边框"/></Radio> |
| | | <Radio value="left"><BorderLeftOutlined title="左边框"/></Radio> |
| | | <Radio value="right"><BorderRightOutlined title="右边框"/></Radio> |
| | | <Radio value="top"><BorderTopOutlined title="上边框"/></Radio> |
| | | <Radio value="bottom"><BorderBottomOutlined title="下边框"/></Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="边框样式" type="border-outer" />} |
| | | label={<BorderOuterOutlined title="边框样式"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | {borposition === 'outer' ? <Select defaultValue={card.borderStyle || 'solid'} onChange={this.changeBorderStyle}> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="边框宽度" type="column-width" />} |
| | | label={<ColumnWidthOutlined title="边框宽度"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | {borposition === 'outer' ? <StyleInput defaultValue={card.borderWidth || '0px'} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="边框颜色" type="bg-colors" />} |
| | | label={<BgColorsOutlined title="边框颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | {borposition === 'outer' ? <ColorSketch defaultValue={card.borderColor || 'transparent'} onChange={this.changeBorderColor} /> : null} |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="圆角" type="radius-setting" />} |
| | | label={<RadiusSettingOutlined title="圆角"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.borderRadius || '0px'} options={['px', '%']} onChange={(val) => this.changeNormalStyle(val, 'borderRadius')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="阴影颜色" type="bg-colors" />} |
| | | label={<BgColorsOutlined title="阴影颜色"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <ColorSketch value={card.shadowColor || 'transparent'} onChange={this.changeShadowColor} /> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="模糊距离" type="column-width" />} |
| | | label={<ColumnWidthOutlined title="模糊距离"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.shadowBlur || '0px'} options={['px']} onChange={this.changeShadowBlur}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="水平位置" type="arrow-right" />} |
| | | label={<ArrowRightOutlined title="水平位置"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.hShadow || '0px'} options={['px']} onChange={this.changeHShadow}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="垂直位置" type="arrow-down" />} |
| | | label={<ArrowDownOutlined title="垂直位置"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.vShadow || '0px'} options={['px']} onChange={this.changeVShadow}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="上边距" type="arrow-up"/>} |
| | | label={<ArrowUpOutlined title="上边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.marginTop || '0px'} options={['px', 'vh', 'vw', '%']} onChange={(val) => this.changeNormalStyle(val, 'marginTop')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="下边距" type="arrow-down"/>} |
| | | label={<ArrowDownOutlined title="下边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.marginBottom || '0px'} options={['px', 'vh', 'vw', '%']} onChange={(val) => this.changeNormalStyle(val, 'marginBottom')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="左边距" type="arrow-left"/>} |
| | | label={<ArrowLeftOutlined title="左边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.marginLeft || '0px'} options={['px', 'vh', 'vw', '%']} onChange={(val) => this.changeNormalStyle(val, 'marginLeft')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="右边距" type="arrow-right"/>} |
| | | label={<ArrowRightOutlined title="右边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.marginRight || '0px'} options={['px', 'vh', 'vw', '%']} onChange={(val) => this.changeNormalStyle(val, 'marginRight')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="上边距" type="arrow-up"/>} |
| | | label={<ArrowUpOutlined title="上边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.paddingTop || '0px'} options={['px', 'vh', 'vw', '%']} onChange={(val) => this.changeNormalStyle(val, 'paddingTop')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="下边距" type="arrow-down"/>} |
| | | label={<ArrowDownOutlined title="下边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.paddingBottom || '0px'} options={['px', 'vh', 'vw', '%']} onChange={(val) => this.changeNormalStyle(val, 'paddingBottom')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="左边距" type="arrow-left"/>} |
| | | label={<ArrowLeftOutlined title="左边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.paddingLeft || '0px'} options={['px', 'vh', 'vw', '%']} onChange={(val) => this.changeNormalStyle(val, 'paddingLeft')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="右边距" type="arrow-right"/>} |
| | | label={<ArrowRightOutlined title="右边距"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.paddingRight || '0px'} options={['px', 'vh', 'vw', '%']} onChange={(val) => this.changeNormalStyle(val, 'paddingRight')}/> |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="浮动" type="swap" />} |
| | | label={<SwapOutlined title="浮动"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} defaultValue={card.float || 'left'} onChange={(e) => this.changeNormalStyle(e.target.value, 'float')}> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Modal, Button, Icon, Popconfirm, message } from 'antd' |
| | | import { Modal, Button, Popconfirm, message } from 'antd' |
| | | import { StopTwoTone, CopyOutlined, EditOutlined, CheckCircleTwoTone, DeleteOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | ( |
| | | <div> |
| | | 禁用 |
| | | <Icon style={{marginLeft: '5px'}} type="stop" theme="twoTone" twoToneColor="#ff4d4f" /> |
| | | <StopTwoTone style={{marginLeft: '5px'}} twoToneColor="#ff4d4f" /> |
| | | </div> |
| | | ) : |
| | | ( |
| | | <div> |
| | | 启用 |
| | | <Icon style={{marginLeft: '5px'}} type="check-circle" theme="twoTone" twoToneColor="#52c41a" /> |
| | | <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" /> |
| | | </div> |
| | | ) |
| | | }, |
| | |
| | | dataIndex: 'operation', |
| | | render: (text, record) => |
| | | (<div style={{textAlign: 'center'}}> |
| | | <span onClick={() => this.handleEdit(record)} style={{color: '#1890ff', cursor: 'pointer', fontSize: '16px', marginRight: '15px'}}><Icon type="edit" /></span> |
| | | <span onClick={() => {this.copy(record)}} style={{color: '#26C281', cursor: 'pointer', fontSize: '16px', marginRight: '15px'}}><Icon type="copy" /></span> |
| | | <span onClick={() => this.handleEdit(record)} style={{color: '#1890ff', cursor: 'pointer', fontSize: '16px', marginRight: '15px'}}><EditOutlined /></span> |
| | | <span onClick={() => {this.copy(record)}} style={{color: '#26C281', cursor: 'pointer', fontSize: '16px', marginRight: '15px'}}><CopyOutlined /></span> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title="确定删除?" |
| | | onConfirm={() => this.deleteScript(record) |
| | | }> |
| | | <span style={{color: '#ff4d4f', cursor: 'pointer', fontSize: '16px'}}><Icon type="delete" /></span> |
| | | <span style={{color: '#ff4d4f', cursor: 'pointer', fontSize: '16px'}}><DeleteOutlined /></span> |
| | | </Popconfirm> |
| | | </div>) |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Icon, Button, notification, Select, Popconfirm, Typography, Modal, Radio } from 'antd' |
| | | import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio } from 'antd' |
| | | import { StopTwoTone, SwapOutlined, EditOutlined, CheckCircleTwoTone, DeleteOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | ( |
| | | <div> |
| | | {this.props.dict['model.status.forbidden']} |
| | | <Icon style={{marginLeft: '5px'}} type="stop" theme="twoTone" twoToneColor="#ff4d4f" /> |
| | | <StopTwoTone style={{marginLeft: '5px'}} twoToneColor="#ff4d4f" /> |
| | | </div> |
| | | ) : |
| | | ( |
| | | <div> |
| | | {this.props.dict['model.status.open']} |
| | | <Icon style={{marginLeft: '5px'}} type="check-circle" theme="twoTone" twoToneColor="#52c41a" /> |
| | | <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" /> |
| | | </div> |
| | | ) |
| | | }, |
| | |
| | | dataIndex: 'operation', |
| | | render: (text, record) => |
| | | (<div style={{textAlign: 'center'}}> |
| | | <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><Icon type="edit" /></span> |
| | | <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><Icon type="swap" /></span> |
| | | <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> |
| | | <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title={this.props.dict['model.query.delete']} |
| | | onConfirm={() => this.handleDelete(record) |
| | | }> |
| | | <span className="operation-btn" style={{color: '#ff4d4f'}}><Icon type="delete" /></span> |
| | | <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> |
| | | </Popconfirm> |
| | | </div>) |
| | | } |
| | |
| | | import PropTypes from 'prop-types' |
| | | // import { is, fromJS } from 'immutable' |
| | | import { SketchPicker } from 'react-color' |
| | | import { Popover, Icon } from 'antd' |
| | | import { Popover } from 'antd' |
| | | import { CloseOutlined } from '@ant-design/icons' |
| | | |
| | | import './index.scss' |
| | | |
| | |
| | | <div className="color-sketch-block-inner" style={ {background: color} }></div> |
| | | </div> |
| | | </Popover> |
| | | <div className="color-sketch-value">{color}{allowClear && color ? <Icon onClick={this.clear} type="close"/> : null}</div> |
| | | <div className="color-sketch-value">{color}{allowClear && color ? <CloseOutlined onClick={this.clear}/> : null}</div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | import React from 'react' |
| | | import { useDrag, useDrop } from 'react-dnd' |
| | | import { Icon, Button, Popover, Switch, Checkbox, Form, Rate } from 'antd' |
| | | import { Button, Popover, Switch, Checkbox, Form, Rate } from 'antd' |
| | | import { ScanOutlined, RightOutlined, PlusOutlined, StarFilled, EditOutlined, CopyOutlined, CloseOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import './index.scss' |
| | | |
| | | const CheckCard = asyncComponent(() => import('@/templates/modalconfig/checkCard')) |
| | |
| | | |
| | | let formItem = null |
| | | if (card.type === 'text' || card.type === 'number') { |
| | | formItem = (<div className={'am-list-item ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>{card.placeholder || ''}</span> }</div>{card.scan && card.scan !== 'false' ? <div className="am-list-extra"><Icon type="scan" /></div> : null}</div></div>) |
| | | formItem = (<div className={'am-list-item ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>{card.placeholder || ''}</span> }</div>{card.scan && card.scan !== 'false' ? <div className="am-list-extra"><ScanOutlined /></div> : null}</div></div>) |
| | | } else if (card.type === 'number') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval}</div></div></div>) |
| | | } else if (card.type === 'select' || card.type === 'link') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{selectval || '请选择'}</div><div className="am-list-extra"><Icon type="right" /></div></div></div>) |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{selectval || '请选择'}</div><div className="am-list-extra"><RightOutlined /></div></div></div>) |
| | | } else if (card.type === 'date') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{card.initval ? moment().subtract(card.initval, 'days').format('YYYY-MM-DD') : '请选择'}</div><div className="am-list-extra"><Icon type="right" /></div></div></div>) |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{card.initval ? moment().subtract(card.initval, 'days').format('YYYY-MM-DD') : '请选择'}</div><div className="am-list-extra"><RightOutlined /></div></div></div>) |
| | | } else if (card.type === 'datemonth') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{card.initval ? moment().subtract(card.initval, 'month').format('YYYY-MM') : '请选择'}</div><div className="am-list-extra"><Icon type="right" /></div></div></div>) |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{card.initval ? moment().subtract(card.initval, 'month').format('YYYY-MM') : '请选择'}</div><div className="am-list-extra"><RightOutlined /></div></div></div>) |
| | | } else if (card.type === 'datetime') { |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{card.initval ? moment().subtract(card.initval, 'days').format('YYYY-MM-DD HH:mm') : '请选择'}</div><div className="am-list-extra"><Icon type="right" /></div></div></div>) |
| | | formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{card.initval ? moment().subtract(card.initval, 'days').format('YYYY-MM-DD HH:mm') : '请选择'}</div><div className="am-list-extra"><RightOutlined /></div></div></div>) |
| | | } else if (card.type === 'textarea') { |
| | | let height = (card.maxRows || 2) * 25 |
| | | formItem = (<div className="am-list-item check-card"> |
| | |
| | | </div>) |
| | | } else if (card.type === 'rate') { |
| | | formItem = (<div className={'am-list-item ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div style={{textAlign: 'left'}} className={'am-input-control ' + (card.place === 'up_down' ? 'left' : '')}> |
| | | <Rate value={card.initval || 0} count={card.rateCount || 5} character={card.character ? <Icon type={card.character}/> : <Icon type="star" theme="filled"/>} allowHalf={card.allowHalf === 'true'} /> |
| | | <Rate value={card.initval || 0} count={card.rateCount || 5} character={card.character ? <MkIcon type={card.character}/> : <StarFilled />} allowHalf={card.allowHalf === 'true'} /> |
| | | </div></div></div>) |
| | | } else if (card.type === 'fileupload') { |
| | | formItem = ( |
| | |
| | | <div className="am-list-line"> |
| | | <div className="am-input-label">{card.label}</div> |
| | | <div className="am-input-control" style={{textAlign: 'left'}}> |
| | | {/* {card.fileType !== 'picture-card' ? <Icon type="upload" style={{position: 'absolute', right: '10px', top: '10px'}} /> : null} */} |
| | | {/* {card.fileType === 'picture-card' ? <Button style={{width: '100px', marginBottom: '10px', height: '100px', fontSize: '50px', color: '#d9d9d9'}}><Icon type="plus" /></Button> : null} */} |
| | | <Button style={{width: '100px', marginBottom: '10px', height: '100px', fontSize: '50px', color: '#d9d9d9'}}><Icon type="plus" /></Button> |
| | | <Button style={{width: '100px', marginBottom: '10px', height: '100px', fontSize: '50px', color: '#d9d9d9'}}><PlusOutlined /></Button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | return ( |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="edit" type="edit" onClick={edit} /> |
| | | <Icon className="copy" type="copy" onClick={copy} /> |
| | | <Icon className="close" type="close" onClick={close} /> |
| | | <EditOutlined className="edit" onClick={edit} /> |
| | | <CopyOutlined className="copy" onClick={copy} /> |
| | | <CloseOutlined className="close" onClick={close} /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className="page-card" style={{ opacity: opacity}}> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover, Modal } from 'antd' |
| | | import { Popover, Modal } from 'antd' |
| | | import { ToolOutlined, PlusOutlined, SettingOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | {card.wrap.title ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null} |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加菜单" onClick={this.addMenu} type="plus" /> |
| | | <PlusOutlined className="plus" title="添加菜单" onClick={this.addMenu}/> |
| | | <NormalForm title="菜单设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="menubar" card={card}/> |
| | | <PasteComponent config={card} options={['menucell']} updateConfig={this.updateComponent} /> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle} /> |
| | | <UserComponent config={card}/> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} |
| | | {card.wrap.datatype !== 'dynamic' ? <Icon style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null} |
| | | {card.wrap.datatype !== 'dynamic' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | {card.subMenus.map((menu, index) => (<MenuComponent key={menu.uuid} offset={!index ? offset : 0} cards={card} card={menu} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} |
| | | </div> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Popover, Icon, Col } from 'antd' |
| | | import { Popover, Col } from 'antd' |
| | | import { SwapOutlined, ArrowLeftOutlined, ArrowRightOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | | import Utils from '@/utils/utils.js' |
| | | import getSettingForm from './options' |
| | | import { resetStyle } from '@/utils/utils-custom.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <NormalForm title="菜单编辑" width={900} update={this.updateSetting} getForms={this.getSettingForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="menucell" card={card}/> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="左移" type="arrow-left" onClick={() => this.props.move(card, 'left')} /> |
| | | <Icon className="close" title="右移" type="arrow-right" onClick={() => this.props.move(card, 'right')} /> |
| | | <ArrowLeftOutlined className="plus" title="左移" onClick={() => this.props.move(card, 'left')} /> |
| | | <ArrowRightOutlined className="close" title="右移" onClick={() => this.props.move(card, 'right')} /> |
| | | </div> |
| | | } trigger="hover" getPopupContainer={() => document.getElementById(card.uuid + 'swap')}> |
| | | <Icon type="swap" id={card.uuid + 'swap'}/> |
| | | <SwapOutlined id={card.uuid + 'swap'}/> |
| | | </Popover> |
| | | <Icon className="close" title="删除菜单" type="delete" onClick={() => this.props.deleteElement(card)} /> |
| | | <DeleteOutlined className="close" title="删除菜单" onClick={() => this.props.deleteElement(card)} /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className="menu-item" onDoubleClick={() => this.changeMenu()} style={_style}> |
| | | {card.setting.sign === 'icon' ? <div className="menu-sign"> |
| | | <Icon style={{ |
| | | <MkIcon style={{ |
| | | fontSize: card.setting.iconFont || 20, |
| | | padding: card.setting.padding, |
| | | background: card.setting.background, |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover } from 'antd' |
| | | import { Popover } from 'antd' |
| | | import { SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | | |
| | | import MkIcon from '@/components/mk-icon' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import getWrapForm from './options' |
| | | import './index.scss' |
| | |
| | | <div className="mk-popover-control"> |
| | | <MenuComponent config={card} updateConfig={this.updateComponent} /> |
| | | <NormalForm title="菜单栏设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle} /> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} |
| | | {card.wrap.datatype === 'static' ? <Icon style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null} |
| | | {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <div className="menu"> |
| | | {card.menus.map(menu => { |
| | |
| | | <div key={menu.MenuID} className="am-tab-bar-tab" onDoubleClick={() => this.changeMenu(menu)}> |
| | | {menu.icon ? <div className="am-tab-bar-tab-icon"> |
| | | <span className="am-badge am-tab-bar-tab-badge tab-badge"> |
| | | <Icon type={menu.icon} /> |
| | | <MkIcon type={menu.icon} /> |
| | | {menu.tip ? <sup className="am-badge-text"></sup> : null} |
| | | </span> |
| | | </div> : null} |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Modal } from 'antd' |
| | | import { Modal } from 'antd' |
| | | import { MenuOutlined } from '@ant-design/icons' |
| | | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | |
| | | |
| | | return ( |
| | | <div className="model-menu-setting-wrap"> |
| | | <Icon type="menu" title="菜单" onClick={() => this.setState({ visible: true })}/> |
| | | <MenuOutlined title="菜单" onClick={() => this.setState({ visible: true })}/> |
| | | <Modal |
| | | wrapClassName="popview-modal" |
| | | title="菜单编辑" |
| | |
| | | _sync = false |
| | | } |
| | | |
| | | _config.wrap.contentHeight = config.wrap.title || config.wrap.searchable === 'true' ? 'calc(100% - 45px)' : '100%' |
| | | |
| | | this.setState({ |
| | | config: _config, |
| | | data: _data, |
| | |
| | | <span className="title">{config.wrap.title}</span> |
| | | {config.wrap.searchable === 'true' ? <Search allowClear onSearch={this.treeFilter} /> : null} |
| | | </div> : null} |
| | | {treeNodes && treeNodes.length > 0 ? <div className="tree-box"> |
| | | {treeNodes && treeNodes.length > 0 ? <div className="tree-box" style={{height: config.wrap.contentHeight}}> |
| | | <Tree |
| | | blockNode |
| | | onSelect={this.selectTreeNode} |
| | |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 180px; |
| | | min-height: 50px; |
| | | |
| | | .tree-header { |
| | | position: relative; |
| | |
| | | } |
| | | } |
| | | .tree-box { |
| | | overflow-x: auto; |
| | | overflow: auto; |
| | | padding-bottom: 10px; |
| | | |
| | | .ant-tree-node-content-wrapper-close > span > span > .anticon-folder-open { |
| | |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | .tree-box::-webkit-scrollbar { |
| | | height: 10px; |
| | | width: 7px; |
| | | } |
| | | .tree-box::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | |
| | | } |
| | | .tree-box::-webkit-scrollbar-track {/*滚动条里面轨道*/ |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border-radius: 3px; |
| | | border-radius: 5px; |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | } |