From bd1dfc9e6c9b9f8076ca2783ce598e0936b4c664 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 22 十二月 2021 14:36:03 +0800 Subject: [PATCH] 2021-12-22 --- src/templates/modalconfig/editcard/index.jsx | 5 src/templates/zshare/editcard/index.jsx | 5 src/mob/searchconfig/index.jsx | 13 src/tabviews/formtab/index.jsx | 6 src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx | 10 src/templates/sharecomponent/cardcomponent/index.scss | 4 src/pc/components/navbar/normal-navbar/linksetting/index.jsx | 5 src/templates/sharecomponent/actioncomponent/verifyprint/editable/index.jsx | 11 src/tabviews/verupmanage/index.scss | 2 src/templates/sharecomponent/cardcomponent/dragdetail/card.jsx | 7 src/templates/sharecomponent/columncomponent/markcolumn/index.jsx | 17 src/menu/stylecontroller/index.scss | 23 - src/templates/modalconfig/index.jsx | 5 src/templates/menuconfig/editthdmenu/index.jsx | 9 src/views/interface/workspace/index.jsx | 7 src/tabviews/zshare/actionList/newpagebutton/index.jsx | 5 src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx | 7 src/views/design/sidemenu/index.jsx | 10 src/mob/modalconfig/index.jsx | 5 src/templates/menuconfig/editfirstmenu/dragelement/card.jsx | 7 src/templates/sharecomponent/tabscomponent/tabdragelement/card.jsx | 11 src/tabviews/commontable/index.jsx | 7 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 10 src/tabviews/zshare/actionList/changeuserbutton/index.jsx | 5 src/templates/sharecomponent/actioncomponent/dragaction/card.jsx | 13 src/tabviews/custom/components/card/cardcellList/index.jsx | 123 +--- src/views/interface/history/index.scss | 4 src/mob/searchconfig/searchdragelement/card.jsx | 15 src/menu/components/search/main-search/dragsearch/card.jsx | 7 src/tabviews/custom/components/timeline/normal-timeline/index.jsx | 6 src/tabviews/home/defaulthome/index.scss | 2 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 122 +--- src/tabviews/zshare/topSearch/dategroup/index.jsx | 5 src/tabviews/zshare/mutilform/index.jsx | 7 src/tabviews/commontable/index.scss | 2 src/menu/components/table/edit-table/columns/index.scss | 2 src/templates/zshare/customscript/index.jsx | 10 src/tabviews/zshare/cardcomponent/index.jsx | 5 src/templates/sharecomponent/treesettingcomponent/index.jsx | 5 src/templates/zshare/modalform/modaleditable/index.jsx | 20 src/tabviews/treepage/index.jsx | 10 src/pc/components/navbar/normal-navbar/index.jsx | 14 src/templates/sharecomponent/searchcomponent/searcheditable/index.jsx | 17 src/assets/css/viewstyle.scss | 2 src/views/design/header/index.jsx | 17 src/views/login/loginform.jsx | 11 src/views/printTemplate/index.jsx | 11 src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx | 2 src/tabviews/zshare/topSearch/index.jsx | 5 src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx | 9 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 5 src/pc/modulesource/dragsource/index.jsx | 4 src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx | 5 src/mob/components/formdragelement/index.scss | 2 src/tabviews/subtable/index.jsx | 5 src/mob/searchconfig/groupform/index.jsx | 2 src/utils/asyncIconComponent.jsx | 4 src/templates/sharecomponent/cardcomponent/index.jsx | 27 src/templates/zshare/codemirror/index.jsx | 9 src/mob/components/search/single-search/index.jsx | 13 src/pc/bgcontroller/index.jsx | 19 src/views/pcdesign/index.jsx | 11 src/pc/components/login/normal-login/loginform.jsx | 9 src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx | 15 src/templates/sharecomponent/tabscomponent/tabform/index.jsx | 5 src/templates/menuconfig/menuelement/card.jsx | 11 src/mob/components/topbar/normal-navbar/index.jsx | 26 src/views/login/index.scss | 2 src/tabviews/zshare/settingcomponent/editTable/index.jsx | 8 src/views/printTemplate/dragelement/source.jsx | 5 src/pc/components/login/normal-login/index.scss | 2 src/templates/zshare/transferform/index.scss | 8 src/mob/searchconfig/groupdragelement/card.jsx | 10 src/templates/zshare/editTable/index.jsx | 17 src/templates/zshare/modalform/fieldtable/index.jsx | 5 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx | 10 src/mob/components/tabs/antv-tabs/index.jsx | 24 src/tabviews/custom/components/tree/antd-tree/index.jsx | 7 src/tabviews/zshare/actionList/popupbutton/index.jsx | 5 src/templates/sharecomponent/chartgroupcomponent/dragchartview/card.jsx | 11 src/tabviews/custom/components/tabs/antv-tabs/index.jsx | 5 src/tabviews/zshare/normalTable/index.jsx | 5 src/menu/picturecontroller/index.scss | 2 src/templates/sharecomponent/fieldscomponent/editcard/index.jsx | 5 src/pc/components/navbar/normal-navbar/menusetting/index.jsx | 5 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 5 src/views/interface/workspace/editTable/index.jsx | 5 src/views/pcdesign/index.scss | 4 src/templates/formtabconfig/dragelement/card.jsx | 15 src/tabviews/zshare/actionList/normalbutton/index.jsx | 6 src/templates/modalconfig/dragelement/card.jsx | 7 src/views/mobdesign/index.jsx | 11 src/mob/searchconfig/searchdragelement/index.scss | 2 src/views/interface/history/index.jsx | 11 src/mob/colorsketch/index.jsx | 1 src/tabviews/formtab/index.scss | 2 src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx | 9 src/templates/zshare/modalform/datatable/index.jsx | 11 src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 5 src/templates/calendarconfig/index.jsx | 5 src/views/login/logincloudform.jsx | 7 src/templates/menuconfig/editthdmenu/index.scss | 2 src/tabviews/scriptmanage/index.scss | 2 src/views/design/header/versions/index.jsx | 11 src/tabviews/verupmanage/index.jsx | 6 src/tabviews/home/defaulthome/index.jsx | 19 src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 5 src/templates/sharecomponent/settingcomponent/index.jsx | 5 src/views/design/header/index.scss | 2 src/templates/zshare/transferform/index.jsx | 8 src/views/printTemplate/index.scss | 2 src/mob/modulesource/dragsource/index.jsx | 4 src/menu/stylecombcontroller/index.scss | 23 - src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx | 20 src/templates/menuconfig/editfirstmenu/dragelement/index.jsx | 5 src/views/mobdesign/index.scss | 4 src/tabviews/custom/components/share/normalTable/index.jsx | 114 +--- src/menu/components/table/normal-table/columns/index.scss | 2 src/pc/components/navbar/normal-navbar/linksetting/linktable/index.jsx | 7 src/templates/sharecomponent/settingcalcomponent/index.jsx | 5 src/menu/components/search/main-search/index.scss | 9 src/templates/calendarconfig/calcomponent/index.jsx | 5 src/tabviews/zshare/actionList/tabbutton/index.jsx | 5 src/tabviews/rolemanage/index.jsx | 7 src/templates/menuconfig/menuform/index.jsx | 6 src/templates/formtabconfig/actionform/index.jsx | 6 src/tabviews/zshare/actionList/printbutton/index.jsx | 5 src/pc/components/login/normal-login/index.jsx | 11 src/tabviews/custom/components/table/edit-table/normalTable/index.scss | 2 src/templates/comtableconfig/index.scss | 2 src/templates/menuconfig/editsecmenu/index.jsx | 5 src/tabviews/zshare/fileupload/index.jsx | 7 src/templates/sharecomponent/chartgroupcomponent/index.jsx | 7 133 files changed, 645 insertions(+), 734 deletions(-) diff --git a/src/assets/css/viewstyle.scss b/src/assets/css/viewstyle.scss index 7e3c55b..bb53c91 100644 --- a/src/assets/css/viewstyle.scss +++ b/src/assets/css/viewstyle.scss @@ -72,7 +72,7 @@ .header-setting span { color: $font1; } - > .header-collapse i { + > .header-collapse .anticon { color: $font1; } > .header-menu { diff --git a/src/menu/components/search/main-search/dragsearch/card.jsx b/src/menu/components/search/main-search/dragsearch/card.jsx index bcfac90..d1bba4c 100644 --- a/src/menu/components/search/main-search/dragsearch/card.jsx +++ b/src/menu/components/search/main-search/dragsearch/card.jsx @@ -1,7 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' import { Select, DatePicker, Input, Popover, Form } from 'antd' -import { CopyOutlined, EditOutlined, RightOutlined, CloseOutlined } from '@ant-design/icons' +import { CopyOutlined, EditOutlined, CloseOutlined } from '@ant-design/icons' import moment from 'moment' import asyncComponent from '@/utils/asyncComponent' @@ -11,7 +11,6 @@ const { MonthPicker, WeekPicker, RangePicker } = DatePicker const { Search } = Input const CheckCard = asyncComponent(() => import('@/templates/modalconfig/checkCard')) -const appType = sessionStorage.getItem('appType') const Card = ({ id, card, showField, moveCard, copyCard, findCard, editCard, delCard }) => { const originalIndex = findCard(id).index @@ -73,10 +72,6 @@ } } else if (card.type === 'multiselect' || card.type === 'select' || card.type === 'link') { formItem = (<Select value={_defaultValue}></Select>) - } else if (card.type === 'date' && appType === 'mob') { - formItem = (<div className="mob-list-item">{card.initval ? moment().subtract(card.initval, 'days').format('YYYY-MM-DD') : '璇烽�夋嫨'}<RightOutlined /></div>) - } else if (card.type === 'datemonth' && appType === 'mob') { - formItem = (<div className="mob-list-item">{card.initval ? moment().subtract(card.initval, 'month').format('YYYY-MM') : '璇烽�夋嫨'}<RightOutlined /></div>) } else if (card.type === 'date') { formItem = (<Input style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} />) } else if (card.type === 'dateweek') { diff --git a/src/menu/components/search/main-search/index.scss b/src/menu/components/search/main-search/index.scss index d7eb2f7..e3fa843 100644 --- a/src/menu/components/search/main-search/index.scss +++ b/src/menu/components/search/main-search/index.scss @@ -93,15 +93,6 @@ .check-card-edit-box { margin-top: 5px!important; } - .mob-list-item { - text-align: right; - line-height: 40px; - white-space: nowrap; - padding-right: 5px; - i { - margin-left: 5px; - } - } .quickly-add { position: absolute; z-index: 3; diff --git a/src/menu/components/table/edit-table/columns/index.scss b/src/menu/components/table/edit-table/columns/index.scss index 320709e..2934fd7 100644 --- a/src/menu/components/table/edit-table/columns/index.scss +++ b/src/menu/components/table/edit-table/columns/index.scss @@ -67,7 +67,7 @@ z-index: 2; right: 0; top: -25px; - >i, >div > i { + >.anticon, >div > .anticon { font-size: 16px; margin-right: 10px; cursor: pointer; diff --git a/src/menu/components/table/normal-table/columns/index.scss b/src/menu/components/table/normal-table/columns/index.scss index f376b55..0261f7d 100644 --- a/src/menu/components/table/normal-table/columns/index.scss +++ b/src/menu/components/table/normal-table/columns/index.scss @@ -58,7 +58,7 @@ z-index: 2; right: 0; top: -25px; - >i, >div > i { + >.anticon, >div > .anticon { font-size: 16px; margin-right: 10px; cursor: pointer; diff --git a/src/menu/picturecontroller/index.scss b/src/menu/picturecontroller/index.scss index 35b9200..c059029 100644 --- a/src/menu/picturecontroller/index.scss +++ b/src/menu/picturecontroller/index.scss @@ -43,7 +43,7 @@ text-align: center; opacity: 0; transition: all 0.3s; - i { + .anticon { font-size: 20px; cursor: pointer; } diff --git a/src/menu/stylecombcontroller/index.scss b/src/menu/stylecombcontroller/index.scss index 1350691..7c91c4a 100644 --- a/src/menu/stylecombcontroller/index.scss +++ b/src/menu/stylecombcontroller/index.scss @@ -107,29 +107,6 @@ } } } - .fileupload-form-container { - .ant-btn { - height: 28px; - } - .ant-upload-list-item { - .ant-upload-list-item-info { - background: transparent; - color: rgba(255, 255, 255, 0.85); - i { - color: rgba(255, 255, 255, 0.85); - } - } - .anticon-close { - color: rgba(255, 255, 255, 0.85); - } - .anticon-close:hover { - color: rgba(255, 255, 255, 0.85); - } - } - .ant-upload-list-item:hover .ant-upload-list-item-info { - background: transparent; - } - } } } } diff --git a/src/menu/stylecontroller/index.scss b/src/menu/stylecontroller/index.scss index 43a8e7c..514e0b1 100644 --- a/src/menu/stylecontroller/index.scss +++ b/src/menu/stylecontroller/index.scss @@ -119,29 +119,6 @@ } } } - .fileupload-form-container { - .ant-btn { - height: 28px; - } - .ant-upload-list-item { - .ant-upload-list-item-info { - background: transparent; - color: rgba(255, 255, 255, 0.85); - i { - color: rgba(255, 255, 255, 0.85); - } - } - .anticon-close { - color: rgba(255, 255, 255, 0.85); - } - .anticon-close:hover { - color: rgba(255, 255, 255, 0.85); - } - } - .ant-upload-list-item:hover .ant-upload-list-item-info { - background: transparent; - } - } } } } diff --git a/src/mob/colorsketch/index.jsx b/src/mob/colorsketch/index.jsx index c56caab..e53ece9 100644 --- a/src/mob/colorsketch/index.jsx +++ b/src/mob/colorsketch/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -// import { is, fromJS } from 'immutable' import { SketchPicker } from 'react-color' import { Popover } from 'antd' import { CloseOutlined } from '@ant-design/icons' diff --git a/src/mob/components/formdragelement/index.scss b/src/mob/components/formdragelement/index.scss index c89ff7b..4438434 100644 --- a/src/mob/components/formdragelement/index.scss +++ b/src/mob/components/formdragelement/index.scss @@ -60,7 +60,7 @@ width: 15px; height: 15px; margin-left: 8px; - i { + .anticon { vertical-align: top; } } diff --git a/src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx b/src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx index 786ac21..3479f23 100644 --- a/src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx +++ b/src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx @@ -122,7 +122,7 @@ {getFieldDecorator('icon', { initialValue: menu.icon || '' })( - <MkEditIcon allowClear /> + <MkEditIcon options={['normal', 'data', 'direction', 'edit', 'hint']} allowClear /> )} </Form.Item> </Col> diff --git a/src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx b/src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx index 25a5ee3..9bdc73e 100644 --- a/src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx +++ b/src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx @@ -1,10 +1,12 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Table, Button, Modal, Icon } from 'antd' +import { Table, Button, Modal } from 'antd' +import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons' import MenuForm from '../menuform' import Utils from '@/utils/utils.js' +import MkIcon from '@/components/mk-icon' // import MKEmitter from '@/utils/events.js' import './index.scss' @@ -28,7 +30,7 @@ return trans[text] }}, { title: '鍥炬爣', dataIndex: 'icon', key: 'icon', render: (text, record) => { - return text ? <Icon type={text} /> : '' + return text ? <MkIcon type={text} /> : '' }}, { title: '鏄惁闅愯棌', dataIndex: 'hidden', key: 'hidden', render: (text, record) => { const trans = {'true': '鏄�', 'false': '鍚�'} @@ -38,8 +40,8 @@ (<div> <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>缂栬緫</Button> <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>鍒犻櫎</Button> - <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> - <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> + <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> + <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> </div>) } ] diff --git a/src/mob/components/search/single-search/index.jsx b/src/mob/components/search/single-search/index.jsx index cc28309..4631146 100644 --- a/src/mob/components/search/single-search/index.jsx +++ b/src/mob/components/search/single-search/index.jsx @@ -1,7 +1,8 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Popover, Icon, Input, Button } from 'antd' +import { Popover, Input, Button } from 'antd' +import { ToolOutlined, ScanOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -138,19 +139,19 @@ <div className="single-search-edit-list" onClick={this.clickComponent} id={card.uuid} style={_style}> <div className="search-wrap" style={{borderRadius: card.wrap.borderRadius || 0, height: card.wrap.height || 32}}> <Input placeholder={card.wrap.label} value={card.wrap.initval || ''} /> - {card.wrap.scan === 'show' ? <Icon type="scan" style={{lineHeight: `${card.wrap.height || 32}px`}} /> : null} + {card.wrap.scan === 'show' ? <ScanOutlined style={{lineHeight: `${card.wrap.height || 32}px`}} /> : 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}> - <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="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> + <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> + <DeleteOutlined className="close" onClick={() => this.props.deletecomponent(card.uuid)} /> </div> } trigger="hover"> - <Icon type="tool" /> + <ToolOutlined /> </Popover> </div> ) diff --git a/src/mob/components/tabs/antv-tabs/index.jsx b/src/mob/components/tabs/antv-tabs/index.jsx index e2835bd..c644570 100644 --- a/src/mob/components/tabs/antv-tabs/index.jsx +++ b/src/mob/components/tabs/antv-tabs/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Tabs, Icon, Popover, Modal } from 'antd' +import { Tabs, Popover, Modal } from 'antd' +import { ToolOutlined, PlusOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, CloseOutlined } from '@ant-design/icons' import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' @@ -11,6 +12,7 @@ import MenuUtils from '@/utils/utils-custom.js' import Utils from '@/utils/utils.js' import { getTabForm, getTabsSetForm } from './options' +import MkIcon from '@/components/mk-icon' import './index.scss' const NormalForm = asyncIconComponent(() => import('@/components/normalform')) @@ -387,18 +389,18 @@ <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <NormalForm title="鏍囩缂栬緫" width={600} update={this.updateTab} getForms={() => this.getTabForms(tab)}> - <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> + <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <PasteComponent Tab={tab} insert={this.insert} /> - <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeTabStyle} type="font-colors" /> - <Icon className="close" title="delete" type="close" onClick={() => this.delTab(tab)} /> + <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeTabStyle}/> + <CloseOutlined className="close" onClick={() => this.delTab(tab)} /> </div> } trigger="hover"> - <span style={_tabStyle}>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span> + <span style={_tabStyle}>{tab.icon ? <MkIcon type={tab.icon} /> : null}{tab.label}</span> </Popover> } key={tab.uuid}> {/* {appType === 'mob' && tabs.setting.display === 'inline-block' && tab.hasSearch === 'icon' ? - <Icon className="search-icon" onDoubleClick={() => this.setSearch(tab)} type="search" /> : null} */} + <SearchOutlined className="search-icon" onDoubleClick={() => this.setSearch(tab)}/> : null} */} <TabComponents config={tab} handleList={this.updateTabComponent} deleteCard={this.deleteCard} /> </TabPane> ))} @@ -406,17 +408,17 @@ <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <NormalForm title="娣诲姞鏍囩" width={600} update={this.updateTab} getForms={() => this.getTabForms()}> - <Icon type="plus" className="plus" title="娣诲姞鏍囩"/> + <PlusOutlined className="plus" title="娣诲姞鏍囩"/> </NormalForm> <NormalForm title="鏍囩椤佃缃�" width={700} update={this.updateTabs} getForms={this.getTabsForms}> - <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> + <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="tabs" card={tabs}/> - <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> - <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(tabs.uuid)} /> + <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/> + <DeleteOutlined className="close" onClick={() => this.props.deletecomponent(tabs.uuid)} /> </div> } trigger="hover"> - <Icon type="tool" /> + <ToolOutlined /> </Popover> </div> ) diff --git a/src/mob/components/topbar/normal-navbar/index.jsx b/src/mob/components/topbar/normal-navbar/index.jsx index 8bca7bb..3473c20 100644 --- a/src/mob/components/topbar/normal-navbar/index.jsx +++ b/src/mob/components/topbar/normal-navbar/index.jsx @@ -1,8 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Popover } from 'antd' -import { ExpandOutlined, ReloadOutlined } from '@ant-design/icons' +import { Popover } from 'antd' +import { ExpandOutlined, ReloadOutlined, EllipsisOutlined, LogoutOutlined, ToolOutlined, ScanOutlined, LeftOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SearchOutlined } from '@ant-design/icons' import asyncIconComponent from '@/utils/asyncIconComponent' import getWrapForm from './options' @@ -199,13 +199,13 @@ let right = null if (card.wrap.logout === 'true') { - right = <Icon type="logout" /> + right = <LogoutOutlined /> } if (card.wrap.scan === 'true') { - right = !right ? <ExpandOutlined onDoubleClick={this.skip}/> : <Icon type="ellipsis" /> + right = !right ? <ExpandOutlined onDoubleClick={this.skip}/> : <EllipsisOutlined /> } if (card.wrap.refresh === 'true') { - right = !right ? <ReloadOutlined /> : <Icon type="ellipsis" onDoubleClick={this.skip}/> + right = !right ? <ReloadOutlined /> : <EllipsisOutlined onDoubleClick={this.skip}/> } return ( @@ -213,35 +213,35 @@ <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <NormalForm title="瀵艰埅鏍忚缃�" width={750} update={this.updateWrap} getForms={this.getWrapForms}> - <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> + <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="topbar" card={card}/> - <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)} /> </div> } trigger="hover"> - <Icon type="tool" /> + <ToolOutlined /> </Popover> <div className="am-navbar"> <div className="am-navbar-left"> - {card.wrap.back !== 'false' ? <Icon type="left" /> : null} + {card.wrap.back !== 'false' ? <LeftOutlined /> : null} </div> {card.wrap.type !== 'search' ? <div className="am-navbar-title">{card.wrap.title || ''}</div> : <div className="am-navbar-search" onDoubleClick={this.setSearch}> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeSearchStyle} type="font-colors" /> + <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeSearchStyle}/> </div> } trigger="hover"> <div style={card.searchStyle} className="search-bar"> - {card.search && card.search.setting.scan === 'true' ? <Icon type="scan" /> : <Icon type="search" />} + {card.search && card.search.setting.scan === 'true' ? <ScanOutlined /> : <SearchOutlined />} </div> </Popover> </div> } <div className="am-navbar-right"> - {card.wrap.type === 'searchIcon' ? <Icon type="search" onDoubleClick={this.setSearch}/> : null} + {card.wrap.type === 'searchIcon' ? <SearchOutlined onDoubleClick={this.setSearch}/> : null} {right} </div> </div> diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx index 227d758..b05107d 100644 --- a/src/mob/modalconfig/index.jsx +++ b/src/mob/modalconfig/index.jsx @@ -4,7 +4,8 @@ import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' import moment from 'moment' -import { Button, Modal, Collapse, notification, Switch, Icon } from 'antd' +import { Button, Modal, Collapse, notification, Switch } from 'antd' +import { LeftOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -442,7 +443,7 @@ <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> <div className="mob-shell-inner"> <div className="am-navbar"> - <Icon type="left" /> + <LeftOutlined /> <div className="am-navbar-title">{config.setting.title}</div> {config.setting.btnPosition === 'top' ? <Button className="modal-submit-top">{config.setting.btnName || '纭畾'}</Button> : null} </div> diff --git a/src/mob/modulesource/dragsource/index.jsx b/src/mob/modulesource/dragsource/index.jsx index 0f13372..7b5a6ea 100644 --- a/src/mob/modulesource/dragsource/index.jsx +++ b/src/mob/modulesource/dragsource/index.jsx @@ -1,13 +1,13 @@ import React from 'react' import { useDrag } from 'react-dnd' -import { Icon } from 'antd' +import { CloseCircleOutlined } from '@ant-design/icons' import './index.scss' const MobSourceElement = ({item, triggerDel}) => { const [, drag] = useDrag({ item }) return ( <div className="menu-source-item"> - <div className="property"><span>{item.title}</span>{item.config ? <Icon onClick={() => triggerDel(item)} type="close-circle" /> : null}</div> + <div className="property"><span>{item.title}</span>{item.config ? <CloseCircleOutlined onClick={() => triggerDel(item)}/> : null}</div> <img ref={drag} src={item.url} alt=""/> </div> ) diff --git a/src/mob/searchconfig/groupdragelement/card.jsx b/src/mob/searchconfig/groupdragelement/card.jsx index b0e56e2..16db7b0 100644 --- a/src/mob/searchconfig/groupdragelement/card.jsx +++ b/src/mob/searchconfig/groupdragelement/card.jsx @@ -1,7 +1,9 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Popover } from 'antd' +import { Popover } from 'antd' +import { EditOutlined, CloseOutlined } from '@ant-design/icons' +import MkIcon from '@/components/mk-icon' import './index.scss' const Card = ({ id, card, moveCard, findCard, editCard, closeCard, changeGroup }) => { @@ -41,14 +43,14 @@ 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="close" type="close" onClick={close} /> + <EditOutlined className="edit" onClick={edit} /> + <CloseOutlined className="close" onClick={close} /> </div> } trigger="hover"> <div className="page-card" onDoubleClick={change} style={{ opacity: opacity}}> <div ref={node => drag(drop(node))}> {card.wrap.icon ? <div className="icon"> - <Icon type={card.wrap.icon} /> + <MkIcon type={card.wrap.icon} /> </div> : null} <div className="name"> {card.wrap.name} diff --git a/src/mob/searchconfig/groupform/index.jsx b/src/mob/searchconfig/groupform/index.jsx index 4266a39..81219b4 100644 --- a/src/mob/searchconfig/groupform/index.jsx +++ b/src/mob/searchconfig/groupform/index.jsx @@ -76,7 +76,7 @@ {getFieldDecorator('icon', { initialValue: config.wrap.icon })( - <MkEditIcon allowClear/> + <MkEditIcon options={['normal', 'data', 'direction', 'edit', 'hint']} allowClear/> )} </Form.Item> </Col> diff --git a/src/mob/searchconfig/index.jsx b/src/mob/searchconfig/index.jsx index 5e1e966..e8f380a 100644 --- a/src/mob/searchconfig/index.jsx +++ b/src/mob/searchconfig/index.jsx @@ -4,7 +4,8 @@ import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' import moment from 'moment' -import { Button, Modal, Collapse, notification, Switch, Icon } from 'antd' +import { Button, Modal, Collapse, notification, Switch } from 'antd' +import { SettingOutlined, LeftOutlined, SearchOutlined, PlusOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -496,16 +497,16 @@ <div className="setting"> <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> <div className="mob-shell-inner" style={{backgroundColor: group.setting.backgroundColor || '#ffffff'}}> - <Icon className="setting-group" onClick={this.changeSetting} type="setting" /> + <SettingOutlined className="setting-group" onClick={this.changeSetting}/> {group.setting.type === 'title' ? <div className="am-navbar"> - <Icon type="left" /> + <LeftOutlined /> <div className="am-navbar-title">{group.setting.title}</div> </div> : <div className="am-navbar"> - {/* <Icon type="left" /> */} - <div className="search-bar"><Icon type="search" /></div> + {/* <LeftOutlined /> */} + <div className="search-bar"><SearchOutlined /></div> <Button >鍙栨秷</Button> </div>} - {group.floor === 1 ? <Icon className="plus-group" type="plus" onClick={this.plusGroup} /> : null} + {group.floor === 1 ? <PlusOutlined className="plus-group" onClick={this.plusGroup} /> : null} <div style={{minHeight: 'calc(100% - 100px)'}}> {group.floor === 1 && group.groups.length > 0 ? <GDragElement list={group.groups} diff --git a/src/mob/searchconfig/searchdragelement/card.jsx b/src/mob/searchconfig/searchdragelement/card.jsx index 8e81a4e..df3e2c6 100644 --- a/src/mob/searchconfig/searchdragelement/card.jsx +++ b/src/mob/searchconfig/searchdragelement/card.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Popover, Form } from 'antd' +import { Popover, Form } from 'antd' +import { EditOutlined, RightOutlined, CopyOutlined, CloseOutlined } from '@ant-design/icons' import moment from 'moment' import asyncComponent from '@/utils/asyncComponent' @@ -50,7 +51,7 @@ <div className="am-list-line"> {card.labelShow !== 'false' ? <div className="am-input-label">{card.label}</div> : null} <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 className="am-list-extra"><RightOutlined /></div> </div> </div>) } else if (card.type === 'datemonth') { @@ -58,7 +59,7 @@ <div className="am-list-line"> {card.labelShow !== 'false' ? <div className="am-input-label">{card.label}</div> : null} <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 className="am-list-extra"><RightOutlined /></div> </div> </div>) } else if (card.type === 'range') { @@ -100,7 +101,7 @@ // <div className="am-list-line"> // {card.labelShow !== 'false' ? <div className="am-input-label">{card.label}</div> : null} // <div className="am-input-control">{value}</div> - // <div className="am-list-extra"><Icon type="right" /></div> + // <div className="am-list-extra"><RightOutlined /></div> // </div> // </div>) } else if (card.type === 'checkcard') { @@ -117,9 +118,9 @@ 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}}> diff --git a/src/mob/searchconfig/searchdragelement/index.scss b/src/mob/searchconfig/searchdragelement/index.scss index 2abb4bd..491a00f 100644 --- a/src/mob/searchconfig/searchdragelement/index.scss +++ b/src/mob/searchconfig/searchdragelement/index.scss @@ -58,7 +58,7 @@ width: 15px; height: 15px; margin-left: 8px; - i { + .anticon { vertical-align: top; } } diff --git a/src/pc/bgcontroller/index.jsx b/src/pc/bgcontroller/index.jsx index 717c932..63c0545 100644 --- a/src/pc/bgcontroller/index.jsx +++ b/src/pc/bgcontroller/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Form, Icon, Select } from 'antd' +import { Form, Select } from 'antd' +import { ArrowUpOutlined, ArrowDownOutlined, ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' import './index.scss' @@ -178,50 +179,50 @@ <p style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>鍐呰竟璺�</p> <Form.Item colon={false} - label={<Icon title="涓婅竟璺�" type="arrow-up"/>} + label={<ArrowUpOutlined title="涓婅竟璺�"/>} > <StyleInput defaultValue={config.style.paddingTop || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingTop')}/> </Form.Item> <Form.Item colon={false} - label={<Icon title="涓嬭竟璺�" type="arrow-down"/>} + label={<ArrowDownOutlined title="涓嬭竟璺�"/>} > <StyleInput defaultValue={config.style.paddingBottom || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingBottom')}/> </Form.Item> <Form.Item colon={false} - label={<Icon title="宸﹁竟璺�" type="arrow-left"/>} + label={<ArrowLeftOutlined title="宸﹁竟璺�"/>} > <StyleInput defaultValue={config.style.paddingLeft || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingLeft')}/> </Form.Item> <Form.Item colon={false} - label={<Icon title="鍙宠竟璺�" type="arrow-right"/>} + label={<ArrowRightOutlined title="鍙宠竟璺�"/>} > <StyleInput defaultValue={config.style.paddingRight || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingRight')}/> </Form.Item> <p style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>澶栬竟璺�</p> <Form.Item colon={false} - label={<Icon title="涓婅竟璺�" type="arrow-up"/>} + label={<ArrowUpOutlined title="涓婅竟璺�"/>} > <StyleInput defaultValue={config.style.marginTop || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginTop')}/> </Form.Item> <Form.Item colon={false} - label={<Icon title="涓嬭竟璺�" type="arrow-down"/>} + label={<ArrowDownOutlined title="涓嬭竟璺�"/>} > <StyleInput defaultValue={config.style.marginBottom || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginBottom')}/> </Form.Item> <Form.Item colon={false} - label={<Icon title="宸﹁竟璺�" type="arrow-left"/>} + label={<ArrowLeftOutlined title="宸﹁竟璺�"/>} > <StyleInput defaultValue={config.style.marginLeft || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginLeft')}/> </Form.Item> <Form.Item colon={false} - label={<Icon title="鍙宠竟璺�" type="arrow-right"/>} + label={<ArrowRightOutlined title="鍙宠竟璺�"/>} > <StyleInput defaultValue={config.style.marginRight || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginRight')}/> </Form.Item> diff --git a/src/pc/components/login/normal-login/index.jsx b/src/pc/components/login/normal-login/index.jsx index dcc63e2..59c4bed 100644 --- a/src/pc/components/login/normal-login/index.jsx +++ b/src/pc/components/login/normal-login/index.jsx @@ -1,7 +1,8 @@ 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 { EditOutlined, FontColorsOutlined, ToolOutlined, DeleteOutlined } from '@ant-design/icons' import asyncIconComponent from '@/utils/asyncIconComponent' import asyncComponent from '@/utils/asyncComponent' @@ -176,13 +177,13 @@ <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}> - <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)} /> </div> } trigger="hover"> - <Icon type="tool" /> + <ToolOutlined /> </Popover> <LoginForm loginWays={card.loginWays} wrap={card.wrap} menuId={card.uuid} /> </div> diff --git a/src/pc/components/login/normal-login/index.scss b/src/pc/components/login/normal-login/index.scss index 5eb7460..8ae6194 100644 --- a/src/pc/components/login/normal-login/index.scss +++ b/src/pc/components/login/normal-login/index.scss @@ -85,7 +85,7 @@ overflow: hidden; padding-bottom: 10px; cursor: pointer; - i { + .anticon { transform-origin: 0 0; transform: rotate(45deg); } diff --git a/src/pc/components/login/normal-login/loginform.jsx b/src/pc/components/login/normal-login/loginform.jsx index 8a225ec..bfcf920 100644 --- a/src/pc/components/login/normal-login/loginform.jsx +++ b/src/pc/components/login/normal-login/loginform.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Form, Icon, Input, Button, Checkbox } from 'antd' +import { Form, Input, Button, Checkbox } from 'antd' +import { QrcodeOutlined, UserOutlined, LockOutlined } from '@ant-design/icons' import asyncElementComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' @@ -104,17 +105,17 @@ return ( <Form className="login-edit-form"> <div className="login-way-title">{activeWay.label}</div> - {scanWay && activeWay.type !== 'app_scan' ? <div className="scan-icon" onClick={() => this.onChangeTab(scanWay)}><Icon type="qrcode" /></div> : null} + {scanWay && activeWay.type !== 'app_scan' ? <div className="scan-icon" onClick={() => this.onChangeTab(scanWay)}><QrcodeOutlined /></div> : null} {activeWay.type === 'uname_pwd' ? <div className={'form-item-wrap ' + (activeWay.shortcut === 'none' ? 'no-short' : '')}> <Form.Item> <Input - prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} + prefix={<UserOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} placeholder="鐢ㄦ埛鍚�" autoComplete="off" /> </Form.Item> <Form.Item> - <Input.Password placeholder="瀵嗙爜" prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} /> + <Input.Password placeholder="瀵嗙爜" prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} /> </Form.Item> {!activeWay.shortcut || activeWay.shortcut === 'remember' ? <Form.Item className="minline"> <Checkbox>璁颁綇瀵嗙爜</Checkbox> diff --git a/src/pc/components/navbar/normal-navbar/index.jsx b/src/pc/components/navbar/normal-navbar/index.jsx index a1eebd4..4c560c4 100644 --- a/src/pc/components/navbar/normal-navbar/index.jsx +++ b/src/pc/components/navbar/normal-navbar/index.jsx @@ -1,10 +1,10 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Popover, Menu, Button } from 'antd' +import { Popover, Menu, Button } from 'antd' +import { EditOutlined, FontColorsOutlined, DeleteOutlined, ToolOutlined } from '@ant-design/icons' import asyncIconComponent from '@/utils/asyncIconComponent' - import MKEmitter from '@/utils/events.js' import getWrapForm from './options' import './index.scss' @@ -179,18 +179,18 @@ <MenuComponent config={card} updateConfig={this.updateComponent} /> <LinkComponent 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)} /> </div> } trigger="hover"> - <Icon type="tool" /> + <ToolOutlined /> </Popover> <div className="navbar-wrap" style={{width: card.wrap.width + 'px', height: card.wrap.height + 'px', lineHeight: card.wrap.height + 'px'}}> {card.wrap.logo ? <Popover overlayClassName="mk-popover-control-wrap top-menu-popover" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeLogoStyle} type="font-colors" /> + <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeLogoStyle}/> </div> } trigger="hover"> <div className={'logo' + (card.wrap.logolink ? ' pointer' : '')} style={card.logoStyle} onDoubleClick={this.changeLogoMenu}><img src={card.wrap.logo} alt=""/></div> diff --git a/src/pc/components/navbar/normal-navbar/linksetting/index.jsx b/src/pc/components/navbar/normal-navbar/linksetting/index.jsx index 28bc15c..fa5449b 100644 --- a/src/pc/components/navbar/normal-navbar/linksetting/index.jsx +++ b/src/pc/components/navbar/normal-navbar/linksetting/index.jsx @@ -1,7 +1,8 @@ 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 { LinkOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -36,7 +37,7 @@ return ( <div className="model-link-setting-wrap"> - <Icon type="link" title="閾炬帴" onClick={() => this.setState({ visible: true })}/> + <LinkOutlined title="閾炬帴" onClick={() => this.setState({ visible: true })}/> <Modal wrapClassName="popview-modal" title="閾炬帴缂栬緫" diff --git a/src/pc/components/navbar/normal-navbar/linksetting/linktable/index.jsx b/src/pc/components/navbar/normal-navbar/linksetting/linktable/index.jsx index f4a693c..6a2d85a 100644 --- a/src/pc/components/navbar/normal-navbar/linksetting/linktable/index.jsx +++ b/src/pc/components/navbar/normal-navbar/linksetting/linktable/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Table, Button, Modal, Icon } from 'antd' +import { Table, Button, Modal } from 'antd' +import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons' import LinkForm from '../linkform' import Utils from '@/utils/utils.js' @@ -34,8 +35,8 @@ (<div> <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>缂栬緫</Button> <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>鍒犻櫎</Button> - <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> - <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> + <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> + <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> </div>) } ] diff --git a/src/pc/components/navbar/normal-navbar/menusetting/index.jsx b/src/pc/components/navbar/normal-navbar/menusetting/index.jsx index 18f00b1..f965b23 100644 --- a/src/pc/components/navbar/normal-navbar/menusetting/index.jsx +++ b/src/pc/components/navbar/normal-navbar/menusetting/index.jsx @@ -1,7 +1,8 @@ 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' @@ -37,7 +38,7 @@ 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="鑿滃崟缂栬緫" diff --git a/src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx b/src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx index 26f5f43..8891018 100644 --- a/src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx +++ b/src/pc/components/navbar/normal-navbar/menusetting/menutable/index.jsx @@ -1,11 +1,11 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Table, Button, Modal, Icon } from 'antd' +import { Table, Button, Modal } from 'antd' +import { PlusOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons' import MenuForm from '../menuform' import Utils from '@/utils/utils.js' -// import MKEmitter from '@/utils/events.js' import './index.scss' const { confirm } = Modal @@ -42,8 +42,8 @@ (<div> <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>缂栬緫</Button> <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>鍒犻櫎</Button> - <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> - <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> + <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> + <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> </div>) } ] @@ -164,7 +164,7 @@ return ( <div className="thdmenu-control-wrap"> - <Icon type="plus" style={{color: '#26C281', padding: '5px', fontSize: '16px'}} onClick={this.plusMenu}/> + <PlusOutlined style={{color: '#26C281', padding: '5px', fontSize: '16px'}} onClick={this.plusMenu}/> <Table rowKey="MenuID" size="small" @@ -224,8 +224,8 @@ (<div> <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>缂栬緫</Button> <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>鍒犻櫎</Button> - <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> - <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> + <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> + <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> </div>) } ] @@ -362,7 +362,7 @@ return ( <div className="submenu-control-wrap"> - <Icon type="plus" style={{color: '#26C281', padding: '5px', fontSize: '16px'}} onClick={this.plusMenu}/> + <PlusOutlined style={{color: '#26C281', padding: '5px', fontSize: '16px'}} onClick={this.plusMenu}/> <Table size="middle" rowKey="MenuID" @@ -423,8 +423,8 @@ (<div> <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>缂栬緫</Button> <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>鍒犻櫎</Button> - <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> - <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> + <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> + <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> </div>) } ] diff --git a/src/pc/modulesource/dragsource/index.jsx b/src/pc/modulesource/dragsource/index.jsx index 0f13372..7b5a6ea 100644 --- a/src/pc/modulesource/dragsource/index.jsx +++ b/src/pc/modulesource/dragsource/index.jsx @@ -1,13 +1,13 @@ import React from 'react' import { useDrag } from 'react-dnd' -import { Icon } from 'antd' +import { CloseCircleOutlined } from '@ant-design/icons' import './index.scss' const MobSourceElement = ({item, triggerDel}) => { const [, drag] = useDrag({ item }) return ( <div className="menu-source-item"> - <div className="property"><span>{item.title}</span>{item.config ? <Icon onClick={() => triggerDel(item)} type="close-circle" /> : null}</div> + <div className="property"><span>{item.title}</span>{item.config ? <CloseCircleOutlined onClick={() => triggerDel(item)}/> : null}</div> <img ref={drag} src={item.url} alt=""/> </div> ) diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index a330fc1..9469b12 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { notification, Spin, Tabs, Icon, Switch, Row, Col } from 'antd' +import { notification, Spin, Tabs, Switch, Row, Col } from 'antd' import Api from '@/api' import zhCN from '@/locales/zh-CN/main.js' @@ -13,6 +13,7 @@ import { updateCommonTable } from '@/utils/utils-update.js' import asyncComponent from '@/utils/asyncComponent' import asyncSpinComponent from '@/utils/asyncSpinComponent' +import MkIcon from '@/components/mk-icon' import MKEmitter from '@/utils/events.js' import NotFount from '@/components/404' import './index.scss' @@ -1114,7 +1115,7 @@ {/* 瑙嗗浘缁� */} {!config.expand ? <Tabs activeKey={chartId} onChange={this.changeChart}> {config.charts.map(item => ( - <TabPane tab={<Icon type={item.icon} />} key={item.uuid}></TabPane> + <TabPane tab={<MkIcon type={item.icon} />} key={item.uuid}></TabPane> ))} </Tabs> : null} {config.charts.map(item => { @@ -1196,7 +1197,7 @@ return ( <TabPane tab={ <span id={_tab.uuid}> - {_tab.icon ? <Icon type={_tab.icon} /> : null} + {_tab.icon ? <MkIcon type={_tab.icon} /> : null} {_tab.label} </span> } key={_tab.uuid}> diff --git a/src/tabviews/commontable/index.scss b/src/tabviews/commontable/index.scss index b35a9f4..242cdf2 100644 --- a/src/tabviews/commontable/index.scss +++ b/src/tabviews/commontable/index.scss @@ -49,7 +49,7 @@ padding: 0 10px; font-size: 15px; border-bottom: 1px solid #1890ff; - i { + .anticon { margin-right: 10px; } } diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index c563e29..747bad8 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -1,12 +1,13 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Col, Tooltip, notification } from 'antd' +import { Col, Tooltip, notification } from 'antd' import moment from 'moment' import asyncComponent from './asyncButtonComponent' import asyncElementComponent from '@/utils/asyncComponent' - +import { getMark } from '@/utils/utils.js' +import MkIcon from '@/components/mk-icon' import MKEmitter from '@/utils/events.js' import LostPng from '@/assets/img/lost.png' import './index.scss' @@ -152,79 +153,6 @@ window.open(url) } - getMark = (marks, style, content) => { - const { data } = this.props - - marks.some(mark => { - let originVal = data[mark.field[0]] + '' - let contrastVal = '' - let result = false - - if (mark.field[1] === 'static') { - contrastVal = mark.contrastValue + '' - } else { - contrastVal = data[mark.field[2]] + '' - } - - if (mark.match === '=') { - result = originVal === contrastVal - } else if (mark.match === '!=') { - result = originVal !== contrastVal - } else if (mark.match === 'like') { - result = originVal.indexOf(contrastVal) > -1 - } else if (mark.match === '>') { - try { - originVal = parseFloat(originVal) - contrastVal = parseFloat(contrastVal) - } catch (e) { - originVal = NaN - } - - if (!isNaN(originVal) && !isNaN(contrastVal) && originVal > contrastVal) { - result = true - } - } else if (mark.match === '<') { - try { - originVal = parseFloat(originVal) - contrastVal = parseFloat(contrastVal) - } catch (e) { - originVal = NaN - } - - if (!isNaN(originVal) && !isNaN(contrastVal) && originVal < contrastVal) { - result = true - } - } - - if (result && mark.signType) { - if (mark.signType[0] === 'font') { - style.color = mark.color - } else if (mark.signType[0] === 'background') { - style.background = mark.color - if (mark.fontColor) { - style.color = mark.fontColor - } - } else if (mark.signType[0] === 'underline') { - style.textDecoration = 'underline' - style.color = mark.color - } else if (mark.signType[0] === 'line-through') { - style.textDecoration = 'line-through' - style.color = mark.color - } else if (mark.signType[0] === 'icon') { - let icon = (<Icon style={{color: mark.color}} type={mark.signType[3]} />) - if (mark.signType[1] === 'front') { - content = <span>{icon} {content}</span> - } else { - content = <span>{content} {icon}</span> - } - } - } - return result - }) - - return content - } - getColor = (marks) => { const { data } = this.props let color = '' @@ -270,7 +198,10 @@ _style.width = card.innerHeight _style.height = card.innerHeight _style.lineHeight = card.innerHeight + 'px' - this.getMark(card.marks, _style) + + let mark = getMark(card.marks, data, _style) + + _style = mark.style } return ( <Col key={card.uuid} span={card.width}> @@ -363,7 +294,17 @@ } if (card.marks) { - val = this.getMark(card.marks, _style, val) + let mark = getMark(card.marks, data, _style) + + _style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span> + } else { + val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } if (card.link) { @@ -419,7 +360,17 @@ } if (card.marks) { - val = this.getMark(card.marks, _style, val) + let mark = getMark(card.marks, data, _style) + + _style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span> + } else { + val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } return ( @@ -442,8 +393,8 @@ <Col key={card.uuid} span={card.width}> <div style={card.style}> {val ? <Tooltip title={val}> - <Icon type={card.icon}/> - </Tooltip> : <Icon type={card.icon}/>} + <MkIcon type={card.icon}/> + </Tooltip> : <MkIcon type={card.icon}/>} </div> </Col> ) @@ -676,7 +627,17 @@ } if (card.marks) { - val = this.getMark(card.marks, _style, val) + let mark = getMark(card.marks, data, _style) + + _style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span> + } else { + val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } return ( diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index b27e7bb..15d0d33 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -3,9 +3,11 @@ import md5 from 'md5' import { connect } from 'react-redux' import { is, fromJS } from 'immutable' -import { Table, Typography, Icon, Col, Switch, message } from 'antd' +import { Table, Typography, Col, Switch, message } from 'antd' import asyncComponent from '@/utils/asyncComponent' +import { getMark } from '@/utils/utils.js' +import MkIcon from '@/components/mk-icon' import MKEmitter from '@/utils/events.js' import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' @@ -97,77 +99,6 @@ } class BodyCell extends React.Component { - getMark = (record, marks, style, content) => { - marks.some(mark => { - let originVal = record[mark.field[0]] + '' - let contrastVal = '' - let result = false - - if (mark.field[1] === 'static') { - contrastVal = mark.contrastValue + '' - } else { - contrastVal = record[mark.field[2]] + '' - } - - if (mark.match === '=') { - result = originVal === contrastVal - } else if (mark.match === '!=') { - result = originVal !== contrastVal - } else if (mark.match === 'like') { - result = originVal.indexOf(contrastVal) > -1 - } else if (mark.match === '>') { - try { - originVal = parseFloat(originVal) - contrastVal = parseFloat(contrastVal) - } catch (e) { - originVal = NaN - } - - if (!isNaN(originVal) && !isNaN(contrastVal) && originVal > contrastVal) { - result = true - } - } else if (mark.match === '<') { - try { - originVal = parseFloat(originVal) - contrastVal = parseFloat(contrastVal) - } catch (e) { - originVal = NaN - } - - if (!isNaN(originVal) && !isNaN(contrastVal) && originVal < contrastVal) { - result = true - } - } - - if (result) { - if (mark.signType[0] === 'font') { - style.color = mark.color - } else if (mark.signType[0] === 'background') { - style.background = mark.color - if (mark.fontColor) { - style.color = mark.fontColor - } - } else if (mark.signType[0] === 'underline') { - style.textDecoration = 'underline' - style.color = mark.color - } else if (mark.signType[0] === 'line-through') { - style.textDecoration = 'line-through' - style.color = mark.color - } else if (mark.signType[0] === 'icon') { - let icon = (<Icon style={{color: mark.color}} type={mark.signType[3]} />) - if (mark.signType[1] === 'front') { - content = <span>{icon} {content}</span> - } else { - content = <span>{content} {icon}</span> - } - } - } - return result - }) - - return content - } - shouldComponentUpdate (nextProps, nextState) { return !nextProps.record || !is(fromJS(this.props.record), fromJS(nextProps.record)) } @@ -194,8 +125,17 @@ } if (col.marks) { - style = style || {} - content = this.getMark(record, col.marks, style, content) + let mark = getMark(col.marks, record, style) + + style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + } else { + content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } if (col.blur) { content = md5(content) @@ -243,8 +183,17 @@ } if (col.marks) { - style = style || {} - content = this.getMark(record, col.marks, style, content) + let mark = getMark(col.marks, record, style) + + style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + } else { + content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } if (col.blur) { @@ -383,8 +332,17 @@ } if (col.marks) { - style = style || {} - content = this.getMark(record, col.marks, style, content) + let mark = getMark(col.marks, record, style) + + style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + } else { + content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } resProps.children = content diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 19a7ed6..5ec93f1 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -1,12 +1,14 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Table, Typography, Icon, Switch, Modal, Input, InputNumber, Tooltip, Button, notification, message } from 'antd' +import { Table, Typography, Switch, Modal, Input, InputNumber, Tooltip, Button, notification, message } from 'antd' +import { ExclamationCircleOutlined, EditOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' import asyncComponent from '@/utils/asyncComponent' -import Utils, { getEditTableSql } from '@/utils/utils.js' +import Utils, { getEditTableSql, getMark } from '@/utils/utils.js' +import MkIcon from '@/components/mk-icon' import MKEmitter from '@/utils/events.js' import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' @@ -97,77 +99,6 @@ state = { editing: false, err: null - } - - getMark = (record, marks, style, content) => { - marks.some(mark => { - let originVal = record[mark.field[0]] + '' - let contrastVal = '' - let result = false - - if (mark.field[1] === 'static') { - contrastVal = mark.contrastValue + '' - } else { - contrastVal = record[mark.field[2]] + '' - } - - if (mark.match === '=') { - result = originVal === contrastVal - } else if (mark.match === '!=') { - result = originVal !== contrastVal - } else if (mark.match === 'like') { - result = originVal.indexOf(contrastVal) > -1 - } else if (mark.match === '>') { - try { - originVal = parseFloat(originVal) - contrastVal = parseFloat(contrastVal) - } catch (e) { - originVal = NaN - } - - if (!isNaN(originVal) && !isNaN(contrastVal) && originVal > contrastVal) { - result = true - } - } else if (mark.match === '<') { - try { - originVal = parseFloat(originVal) - contrastVal = parseFloat(contrastVal) - } catch (e) { - originVal = NaN - } - - if (!isNaN(originVal) && !isNaN(contrastVal) && originVal < contrastVal) { - result = true - } - } - - if (result) { - if (mark.signType[0] === 'font') { - style.color = mark.color - } else if (mark.signType[0] === 'background') { - style.background = mark.color - if (mark.fontColor) { - style.color = mark.fontColor - } - } else if (mark.signType[0] === 'underline') { - style.textDecoration = 'underline' - style.color = mark.color - } else if (mark.signType[0] === 'line-through') { - style.textDecoration = 'line-through' - style.color = mark.color - } else if (mark.signType[0] === 'icon') { - let icon = (<Icon style={{color: mark.color}} type={mark.signType[3]} />) - if (mark.signType[1] === 'front') { - content = <span>{icon} {content}</span> - } else { - content = <span>{content} {icon}</span> - } - } - } - return result - }) - - return content } shouldComponentUpdate (nextProps, nextState) { @@ -295,15 +226,24 @@ } if (col.marks) { - style = style || {} - content = this.getMark(record, col.marks, style, content) + let mark = getMark(col.marks, record, style) + + style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + } else { + content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } if (col.editable === 'true') { if (editing) { return (<td className="editing_table_cell"> <Input id={col.uuid + record.$Index} defaultValue={value} onChange={(e) => this.onChange(e.target.value)} onPressEnter={this.enterPress} onBlur={this.onBlur}/> - {err ? <Tooltip title={err}><Icon type="exclamation-circle" /></Tooltip> : null} + {err ? <Tooltip title={err}><ExclamationCircleOutlined /></Tooltip> : null} </td>) } else { return (<td className={className + ' pointer'} style={style}><div className="mk-mask" onClick={this.focus}></div>{content}</td>) @@ -339,15 +279,24 @@ } if (col.marks) { - style = style || {} - content = this.getMark(record, col.marks, style, content) + let mark = getMark(col.marks, record, style) + + style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + } else { + content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } if (col.editable === 'true') { if (editing) { return (<td className="editing_table_cell"> <InputNumber id={col.uuid + record.$Index} defaultValue={value} onChange={(val) => this.onChange(val)} onPressEnter={this.enterPress} onBlur={this.onBlur}/> - {err ? <Tooltip title={err}><Icon type="exclamation-circle" /></Tooltip> : null} + {err ? <Tooltip title={err}><ExclamationCircleOutlined /></Tooltip> : null} </td>) } else { return (<td className={className + ' pointer'} style={style}><div className="mk-mask" onClick={this.focus}></div>{content}</td>) @@ -398,8 +347,17 @@ } if (col.marks) { - style = style || {} - content = this.getMark(record, col.marks, style, content) + let mark = getMark(col.marks, record, style) + + style = mark.style + + if (mark.icon) { + if (mark.position === 'front') { + content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + } else { + content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + } + } } children = content @@ -514,7 +472,7 @@ _copy.sorter = false if (item.editable === 'true') { - _copy.title = <span>{item.label}<Icon className="system-color" style={{position: 'absolute', bottom: 0, right: 0}} type="edit" /></span> + _copy.title = <span>{item.label}<EditOutlined className="system-color" style={{position: 'absolute', bottom: 0, right: 0}}/></span> } edColumns.push(_copy) } diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss index ee3ebc1..027503b 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss @@ -172,7 +172,7 @@ .ant-input { padding: 0px; } - i { + .anticon { color: #ff4d4f; position: absolute; right: 3px; diff --git a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx index 6ad66b0..a7f34c7 100644 --- a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx +++ b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx @@ -1,9 +1,10 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Tabs, Icon } from 'antd' +import { Tabs } from 'antd' import asyncComponent from '@/utils/asyncComponent' +import MkIcon from '@/components/mk-icon' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -101,7 +102,7 @@ <div className={'menu-antv-tabs-wrap ' + tabs.setting.tabLabel} style={tabs.style}> <Tabs defaultActiveKey="1" tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}> {tabs.subtabs.map(tab => ( - <TabPane tab={<span id={'tab' + tab.uuid}>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span>} key={tab.uuid}> + <TabPane tab={<span id={'tab' + tab.uuid}>{tab.icon ? <MkIcon type={tab.icon} /> : null}{tab.label}</span>} key={tab.uuid}> <TabTransfer BID={BID} config={tab} bids={bids} mainSearch={mainSearch}/> </TabPane> ))} diff --git a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx index 750a4a9..d49100c 100644 --- a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx +++ b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx @@ -1,10 +1,10 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Spin, notification, Timeline, Empty, Icon } from 'antd' +import { Spin, notification, Timeline, Empty } from 'antd' import Api from '@/api' -// import Utils from '@/utils/utils.js' +import MkIcon from '@/components/mk-icon' import asyncComponent from '@/utils/asyncComponent' import UtilsDM from '@/utils/utils-datamanage.js' import MKEmitter from '@/utils/events.js' @@ -288,7 +288,7 @@ color = item.color if (item.icon) { - dot = <Icon type={item.icon} style={{color}}/> + dot = <MkIcon type={item.icon} style={{color}}/> } return true } diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx index ebbd2d7..9788af1 100644 --- a/src/tabviews/custom/components/tree/antd-tree/index.jsx +++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Spin, Empty, notification, Input, Tree, Icon } from 'antd' +import { Spin, Empty, notification, Input, Tree } from 'antd' +import { FolderOpenOutlined, FolderOutlined, FileOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -365,12 +366,12 @@ return nodes.map(item => { if (item.children) { return ( - <TreeNode icon={<span><Icon type="folder-open" /><Icon type="folder" /></span>} title={item.$title} key={item.$key} dataRef={item}> + <TreeNode icon={<span><FolderOpenOutlined /><FolderOutlined /></span>} title={item.$title} key={item.$key} dataRef={item}> {this.renderTreeNodes(item.children)} </TreeNode> ) } - return <TreeNode icon={<Icon type="file" />} key={item.$key} title={item.$title} dataRef={item} isLeaf /> + return <TreeNode icon={<FileOutlined />} key={item.$key} title={item.$title} dataRef={item} isLeaf /> }) } diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx index f831a71..de39406 100644 --- a/src/tabviews/formtab/index.jsx +++ b/src/tabviews/formtab/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { notification, Spin, Tabs, Icon} from 'antd' +import { notification, Spin, Tabs} from 'antd' import moment from 'moment' import Api from '@/api' @@ -12,7 +12,7 @@ import options from '@/store/options.js' import asyncComponent from '@/utils/asyncLoadComponent' import MKEmitter from '@/utils/events.js' - +import MkIcon from '@/components/mk-icon' import FormGroup from './formgroup' import FormAction from './actionList' import NotFount from '@/components/404' @@ -631,7 +631,7 @@ return ( <TabPane tab={ <span> - {_tab.icon ? <Icon type={_tab.icon} /> : null} + {_tab.icon ? <MkIcon type={_tab.icon} /> : null} {_tab.label} </span> } key={`${index}`}> diff --git a/src/tabviews/formtab/index.scss b/src/tabviews/formtab/index.scss index ca82262..b5c70bb 100644 --- a/src/tabviews/formtab/index.scss +++ b/src/tabviews/formtab/index.scss @@ -85,7 +85,7 @@ padding: 0 10px; font-size: 15px; border-bottom: 1px solid #1890ff; - i { + .anticon { margin-right: 10px; } } diff --git a/src/tabviews/home/defaulthome/index.jsx b/src/tabviews/home/defaulthome/index.jsx index 77f61be..9358fd9 100644 --- a/src/tabviews/home/defaulthome/index.jsx +++ b/src/tabviews/home/defaulthome/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import { Chart } from '@antv/g2' -import { Icon, Tabs, Progress } from 'antd' +import { Tabs, Progress } from 'antd' +import { InfoCircleOutlined, CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons' import './index.scss' const { TabPane } = Tabs @@ -58,7 +59,7 @@ <span>缁翠慨鎬绘暟</span> </span> <span className="antd-action"> - <Icon type="info-circle-o" /> + <InfoCircleOutlined /> </span> </div> <div className="antd-total"> @@ -74,7 +75,7 @@ <span className="antd-trend-text">10%</span> </span> <span className="antd-trend-up"> - <Icon type="caret-up" /> + <CaretUpOutlined /> </span> </div> <div className="antd-trend-item"> @@ -83,7 +84,7 @@ <span className="antd-trend-text">10%</span> </span> <span className="antd-trend-down"> - <Icon type="caret-down" /> + <CaretDownOutlined /> </span> </div> </div> @@ -111,7 +112,7 @@ <span>瓒呮椂宸ュ崟</span> </span> <span className="antd-action"> - <Icon type="info-circle-o" /> + <InfoCircleOutlined /> </span> </div> <div className="antd-total"> @@ -147,7 +148,7 @@ <span>鍏冲崟</span> </span> <span className="antd-action"> - <Icon type="info-circle-o" /> + <InfoCircleOutlined /> </span> </div> <div className="antd-total"> @@ -183,7 +184,7 @@ <span>鍘熶欢閭瘎</span> </span> <span className="antd-action"> - <Icon type="info-circle-o" /> + <InfoCircleOutlined /> </span> </div> <div className="antd-total"> @@ -203,7 +204,7 @@ <span className="antd-trend-text">10%</span> </span> <span className="antd-trend-up"> - <Icon type="caret-up" /> + <CaretUpOutlined /> </span> </div> <div className="antd-trend-item"> @@ -212,7 +213,7 @@ <span className="antd-trend-text">10%</span> </span> <span className="antd-trend-down"> - <Icon type="caret-down" /> + <CaretDownOutlined /> </span> </div> </div> diff --git a/src/tabviews/home/defaulthome/index.scss b/src/tabviews/home/defaulthome/index.scss index 794aadc..ec0d0d0 100644 --- a/src/tabviews/home/defaulthome/index.scss +++ b/src/tabviews/home/defaulthome/index.scss @@ -51,7 +51,7 @@ top: 4px; right: 0; line-height: 1; - cursor: pointer; + cursor: default; } } .antd-total { diff --git a/src/tabviews/rolemanage/index.jsx b/src/tabviews/rolemanage/index.jsx index 6798ccf..6292715 100644 --- a/src/tabviews/rolemanage/index.jsx +++ b/src/tabviews/rolemanage/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Card, Col, Row, Icon, Menu, notification, Spin, Input, Tabs, Button, Tree, Empty, Select } from 'antd' +import { Card, Col, Row, Menu, notification, Spin, Input, Tabs, Button, Tree, Empty, Select } from 'antd' +import { BankOutlined } from '@ant-design/icons' import md5 from 'md5' import Api from '@/api' @@ -856,7 +857,7 @@ className="role-list" title={ <span className="role-title"> - <Icon type="bank" /> + <BankOutlined /> <span className="title">瑙掕壊</span> <Search placeholder="" value={primarykey} onChange={e => this.setState({primarykey: e.target.value})} onSearch={this.filterRole} /> </span> @@ -923,7 +924,7 @@ className="role-list" title={ <span className="role-title"> - <Icon type="bank" /> + <BankOutlined /> <span className="title">瑙掕壊</span> <Search placeholder="" value={primarykey} onChange={e => this.setState({primarykey: e.target.value})} onSearch={this.filterRole} /> </span> diff --git a/src/tabviews/scriptmanage/index.scss b/src/tabviews/scriptmanage/index.scss index 7575443..7068f22 100644 --- a/src/tabviews/scriptmanage/index.scss +++ b/src/tabviews/scriptmanage/index.scss @@ -44,7 +44,7 @@ padding: 0 10px; font-size: 15px; border-bottom: 1px solid #1890ff; - i { + .anticon { margin-right: 10px; } } diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index 6067557..b369753 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { notification, Spin, Switch, Row, Col, Icon, Tabs} from 'antd' +import { notification, Spin, Switch, Row, Col, Tabs} from 'antd' import Api from '@/api' import zhCN from '@/locales/zh-CN/main.js' @@ -13,6 +13,7 @@ import { updateSubTable } from '@/utils/utils-update.js' import asyncComponent from '@/utils/asyncComponent' import asyncSpinComponent from '@/utils/asyncSpinComponent' +import MkIcon from '@/components/mk-icon' import NotFount from '@/components/404' import MKEmitter from '@/utils/events.js' @@ -979,7 +980,7 @@ {/* 瑙嗗浘缁� */} {!config.expand ? <Tabs activeKey={chartId} onChange={this.changeChart}> {config.charts.map(item => ( - <TabPane tab={<Icon type={item.icon} />} key={item.uuid}></TabPane> + <TabPane tab={<MkIcon type={item.icon} />} key={item.uuid}></TabPane> ))} </Tabs> : null} {config.charts.map(item => { diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx index b80863d..8f3e22c 100644 --- a/src/tabviews/treepage/index.jsx +++ b/src/tabviews/treepage/index.jsx @@ -2,7 +2,8 @@ import PropTypes from 'prop-types' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { notification, Spin, Tabs, Icon, Tree, Row, Col, Card, Input, Empty } from 'antd' +import { notification, Spin, Tabs, Tree, Row, Col, Card, Input, Empty } from 'antd' +import { FolderOpenOutlined, FolderOutlined, FileOutlined } from '@ant-design/icons' import Api from '@/api' import zhCN from '@/locales/zh-CN/main.js' @@ -12,6 +13,7 @@ import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' import asyncSpinComponent from '@/utils/asyncSpinComponent' +import MkIcon from '@/components/mk-icon' import NotFount from '@/components/404' import './index.scss' @@ -362,12 +364,12 @@ return nodes.map(item => { if (item.children) { return ( - <TreeNode icon={<span><Icon type="folder-open" /><Icon type="folder" /></span>} title={item.title} key={item.key} dataRef={item}> + <TreeNode icon={<span><FolderOpenOutlined /><FolderOutlined /></span>} title={item.title} key={item.key} dataRef={item}> {this.renderTreeNodes(item.children)} </TreeNode> ) } - return <TreeNode icon={<Icon type="file" />} key={item.key} title={item.title} dataRef={item} isLeaf /> + return <TreeNode icon={<FileOutlined />} key={item.key} title={item.title} dataRef={item} isLeaf /> }) } @@ -609,7 +611,7 @@ return ( <TabPane tab={ <span id={_tab.uuid}> - {_tab.icon ? <Icon type={_tab.icon} /> : null} + {_tab.icon ? <MkIcon type={_tab.icon} /> : null} {_tab.label} </span> } key={_tab.uuid}> diff --git a/src/tabviews/verupmanage/index.jsx b/src/tabviews/verupmanage/index.jsx index c200505..22c47a4 100644 --- a/src/tabviews/verupmanage/index.jsx +++ b/src/tabviews/verupmanage/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { notification, Tabs, Icon, Switch } from 'antd' +import { notification, Tabs, Switch } from 'antd' import moment from 'moment' import Api from '@/api' @@ -12,8 +12,8 @@ import asyncComponent from '@/utils/asyncComponent' import asyncSpinComponent from '@/utils/asyncSpinComponent' import { verupMainTable, buttonConfig } from './config' +import MkIcon from '@/components/mk-icon' import MKEmitter from '@/utils/events.js' - import MainAction from './actionList' import './index.scss' @@ -494,7 +494,7 @@ return ( <TabPane tab={ <span> - {_tab.icon ? <Icon type={_tab.icon} /> : null} + {_tab.icon ? <MkIcon type={_tab.icon} /> : null} {_tab.label} </span> } key={`${index}`}> diff --git a/src/tabviews/verupmanage/index.scss b/src/tabviews/verupmanage/index.scss index 1027137..68df191 100644 --- a/src/tabviews/verupmanage/index.scss +++ b/src/tabviews/verupmanage/index.scss @@ -44,7 +44,7 @@ padding: 0 10px; font-size: 15px; border-bottom: 1px solid #1890ff; - i { + .anticon { margin-right: 10px; } } diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx index 4ad8b99..407912c 100644 --- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx +++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx @@ -1,12 +1,13 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Button, notification, Modal, Icon } from 'antd' +import { Button, notification, Modal } from 'antd' import Api from '@/api' import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' // import './index.scss' const { confirm } = Modal @@ -218,7 +219,7 @@ label = btn.label icon = btn.icon || '' } else if (show === 'link') { - label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> icon = '' } else if (show === 'icon') { icon = btn.icon || '' diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index f7656b3..36f0a62 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -3,7 +3,7 @@ import moment from 'moment' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { Button, Modal, notification, message, Icon } from 'antd' +import { Button, Modal, notification, message } from 'antd' import ExcelIn from './excelin' import Utils, { getExcelInSql } from '@/utils/utils.js' @@ -12,6 +12,7 @@ import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' // import './index.scss' class ExcelInButton extends Component { @@ -466,7 +467,7 @@ label = btn.label icon = btn.icon || '' } else if (show === 'link') { - label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> icon = '' } else if (show === 'icon') { icon = btn.icon || 'upload' diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 6d0f94a..d54aed8 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -3,7 +3,7 @@ import moment from 'moment' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { Button, Modal, notification, message, Icon } from 'antd' +import { Button, Modal, notification, message } from 'antd' import * as XLSX from 'xlsx' import Utils from '@/utils/utils.js' @@ -12,6 +12,7 @@ import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' // import './index.scss' class ExcelOutButton extends Component { @@ -893,7 +894,7 @@ label = btn.label icon = btn.icon || '' } else if (show === 'link') { - label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> icon = '' } else if (show === 'icon') { icon = btn.icon || 'download' diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx index 6f7b8cb..c203721 100644 --- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx +++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx @@ -1,11 +1,12 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Button, notification, Modal, Icon } from 'antd' +import { Button, notification, Modal } from 'antd' import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' import './index.scss' const { confirm } = Modal @@ -215,7 +216,7 @@ label = btn.label icon = btn.icon || '' } else if (show === 'link') { - label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> icon = '' } else if (show === 'icon') { icon = btn.icon || '' diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index c4fdb61..ba6f77f 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -3,7 +3,7 @@ import moment from 'moment' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { Button, Modal, notification, message, Drawer, Icon } from 'antd' +import { Button, Modal, notification, message, Drawer } from 'antd' import Api from '@/api' import Utils, { getSysDefaultSql } from '@/utils/utils.js' @@ -13,6 +13,7 @@ import asyncSpinComponent from '@/utils/asyncSpinComponent' import { updateForm } from '@/utils/utils-update.js' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' // import './index.scss' const MutilForm = asyncSpinComponent(() => import('@/tabviews/zshare/mutilform')) @@ -1992,11 +1993,10 @@ label = btn.label icon = btn.icon || '' } else if (show === 'link') { - label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> icon = '' } else if (show === 'icon') { icon = btn.icon || '' - // } else if (show === 'text') { } else { label = btn.label } diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx index b870f79..af830c6 100644 --- a/src/tabviews/zshare/actionList/popupbutton/index.jsx +++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx @@ -1,12 +1,13 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Button, Modal, notification, Icon, Drawer } from 'antd' +import { Button, Modal, notification, Drawer } from 'antd' import asyncSpinComponent from '@/utils/asyncSpinComponent' import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' import './index.scss' const SubTabTable = asyncSpinComponent(() => import('@/tabviews/subtabtable')) @@ -297,7 +298,7 @@ label = btn.label icon = btn.icon || '' } else if (show === 'link') { - label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> icon = '' } else if (show === 'icon') { icon = btn.icon || '' diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 288cd71..2c2e490 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -3,7 +3,7 @@ import moment from 'moment' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { Button, Modal, notification, message, Icon } from 'antd' +import { Button, Modal, notification, message } from 'antd' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -13,6 +13,7 @@ import asyncSpinComponent from '@/utils/asyncSpinComponent' import { updateForm } from '@/utils/utils-update.js' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' // import './index.scss' const MutilForm = asyncSpinComponent(() => import('@/tabviews/zshare/mutilform')) @@ -1592,7 +1593,7 @@ label = btn.label icon = btn.icon || '' } else if (show === 'link') { - label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> icon = '' } else if (show === 'icon') { icon = btn.icon || '' diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 3d77644..da66493 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -2,11 +2,12 @@ import PropTypes from 'prop-types' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { Button, notification, Icon } from 'antd' +import { Button, notification } from 'antd' import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' // import './index.scss' class TabButton extends Component { @@ -189,7 +190,7 @@ label = btn.label icon = btn.icon || '' } else if (show === 'link') { - label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> icon = '' } else if (show === 'icon') { icon = btn.icon || '' diff --git a/src/tabviews/zshare/cardcomponent/index.jsx b/src/tabviews/zshare/cardcomponent/index.jsx index df34ca4..0480ba8 100644 --- a/src/tabviews/zshare/cardcomponent/index.jsx +++ b/src/tabviews/zshare/cardcomponent/index.jsx @@ -1,11 +1,12 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Card, Spin, Empty } from 'antd' +import { Card, Spin, Empty } from 'antd' import asyncComponent from '@/utils/asyncComponent' import asyncExcelComponent from './asyncButtonComponent' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' import '@/assets/css/table.scss' import './index.scss' @@ -273,7 +274,7 @@ if (mark.position === 'front') { position = 'front' } - icon = <Icon className={'font ' + className} type={mark.icon} /> + icon = <MkIcon className={'font ' + className} type={mark.icon} /> className = '' } diff --git a/src/tabviews/zshare/fileupload/index.jsx b/src/tabviews/zshare/fileupload/index.jsx index 3ef6469..1e71103 100644 --- a/src/tabviews/zshare/fileupload/index.jsx +++ b/src/tabviews/zshare/fileupload/index.jsx @@ -2,7 +2,8 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import moment from 'moment' -import { Upload, Button, Icon, Progress, notification } from 'antd' +import { Upload, Button, Progress, notification } from 'antd' +import { UploadOutlined } from '@ant-design/icons' import SparkMD5 from 'spark-md5' import Api from '@/api' import './index.scss' @@ -454,10 +455,10 @@ return ( <Upload {...props}> {fileType !== 'picture-card' ? <Button> - <Icon type="upload" /> 鐐瑰嚮涓婁紶 + <UploadOutlined /> 鐐瑰嚮涓婁紶 </Button> : null} {fileType === 'picture-card' ? <span style={{whiteSpace: 'nowrap'}}> - <Icon type="upload" /> 鐐瑰嚮涓婁紶 + <UploadOutlined /> 鐐瑰嚮涓婁紶 </span> : null} {showprogress ? <Progress percent={percent} size="small" /> : null} </Upload> diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index f6d7439..cafbcdf 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -1,8 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, notification, Tooltip, Icon, Rate } from 'antd' -import { QuestionCircleOutlined } from '@ant-design/icons' +import { Form, Row, Col, notification, Tooltip, Rate } from 'antd' +import { QuestionCircleOutlined, StarFilled } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -14,6 +14,7 @@ import MKInput from './mkInput' import MKNumberInput from './mkNumberInput' import MKSelect from './mkSelect' +import MkIcon from '@/components/mk-icon' import './index.scss' const MKCheckCard = asyncComponent(() => import('./mkCheckCard')) @@ -731,7 +732,7 @@ } else if (item.type === 'textarea') { content = (<MKTextArea config={item} onChange={(val, defer) => !defer && this.recordChange({[item.field]: val})}/>) } else if (item.type === 'rate') { - content = (<Rate count={item.rateCount} disabled={item.readonly} onChange={(val) => this.recordChange({[item.field]: val})} character={item.character ? <Icon type={item.character}/> : <Icon type="star" theme="filled"/>} allowHalf={item.allowHalf}/>) + content = (<Rate count={item.rateCount} disabled={item.readonly} onChange={(val) => this.recordChange({[item.field]: val})} character={item.character ? <MkIcon type={item.character}/> : <StarFilled />} allowHalf={item.allowHalf}/>) } else if (item.type === 'brafteditor') { content = (<MKEditor config={item} onChange={(val) => this.recordChange({[item.field]: val})}/>) label = item.hidelabel !== 'true' ? label : '' diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx index af5f86d..ddbb12b 100644 --- a/src/tabviews/zshare/normalTable/index.jsx +++ b/src/tabviews/zshare/normalTable/index.jsx @@ -3,10 +3,11 @@ import md5 from 'md5' import { connect } from 'react-redux' import { is, fromJS } from 'immutable' -import { Table, Affix, Typography, Icon } from 'antd' +import { Table, Affix, Typography } from 'antd' import asyncComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' import '@/assets/css/table.scss' import './index.scss' @@ -428,7 +429,7 @@ if (mark.position === 'front') { position = 'front' } - icon = <Icon className={'font ' + className} type={mark.icon} /> + icon = <MkIcon className={'font ' + className} type={mark.icon} /> className = '' } diff --git a/src/tabviews/zshare/settingcomponent/editTable/index.jsx b/src/tabviews/zshare/settingcomponent/editTable/index.jsx index f12eace..818744c 100644 --- a/src/tabviews/zshare/settingcomponent/editTable/index.jsx +++ b/src/tabviews/zshare/settingcomponent/editTable/index.jsx @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -// import { fromJS } from 'immutable' -import { Table, Form, Icon, Select, Cascader } from 'antd' +import { Table, Form, Select, Cascader } from 'antd' +import { EditOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -111,7 +111,7 @@ </div> ) : ( <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> - <span className="primary" onClick={() => {editingKey === '' && this.edit(record.uuid)}}><Icon type="edit" /></span> + <span className="primary" onClick={() => {editingKey === '' && this.edit(record.uuid)}}><EditOutlined /></span> </div> ) } @@ -149,7 +149,7 @@ </div> ) : ( <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> - <span className="primary" onClick={() => {editingKey === '' && this.edit(record.uuid)}}><Icon type="edit" /></span> + <span className="primary" onClick={() => {editingKey === '' && this.edit(record.uuid)}}><EditOutlined /></span> </div> ) } diff --git a/src/tabviews/zshare/topSearch/dategroup/index.jsx b/src/tabviews/zshare/topSearch/dategroup/index.jsx index ab2b3a2..f37691b 100644 --- a/src/tabviews/zshare/topSearch/dategroup/index.jsx +++ b/src/tabviews/zshare/topSearch/dategroup/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { DatePicker, Tooltip, Icon } from 'antd' +import { DatePicker, Tooltip } from 'antd' +import { CloseCircleOutlined } from '@ant-design/icons' import moment from 'moment' import Utils from '@/utils/utils.js' @@ -128,7 +129,7 @@ {dateRange ? <div className="table-search-date-group-value"> {dateRange.replace(',', ' ~ ')} - <Icon type="close-circle" onClick={this.clearTime} className="ant-calendar-picker-clear" /> + <CloseCircleOutlined onClick={this.clearTime} className="ant-calendar-picker-clear" /> </div> : null} </div> ) diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index cbb6432..8cbca63 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Form, Row, Col, Button, notification, Modal, Icon } from 'antd' +import { Form, Row, Col, Button, notification, Modal } from 'antd' +import { CloseOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -708,7 +709,7 @@ <div key={index}> <span>{item.label}: </span> <span className="advance-value">{item.value}</span> - <Icon type="close" onClick={() => this.closeAdvanceForm(item)} /> + <CloseOutlined onClick={() => this.closeAdvanceForm(item)} /> </div>) })} </div> : null} diff --git a/src/templates/calendarconfig/calcomponent/index.jsx b/src/templates/calendarconfig/calcomponent/index.jsx index 92d1a73..fd2343c 100644 --- a/src/templates/calendarconfig/calcomponent/index.jsx +++ b/src/templates/calendarconfig/calcomponent/index.jsx @@ -1,7 +1,8 @@ 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 { EditOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -69,7 +70,7 @@ return ( <div className="model-calendar-setting"> - <Icon type="edit" onClick={this.handleTab} /> + <EditOutlined onClick={this.handleTab} /> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal wrapClassName="model-calendar-setting-modal" diff --git a/src/templates/calendarconfig/index.jsx b/src/templates/calendarconfig/index.jsx index 828cef0..b878362 100644 --- a/src/templates/calendarconfig/index.jsx +++ b/src/templates/calendarconfig/index.jsx @@ -4,7 +4,8 @@ import { is, fromJS } from 'immutable' import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' -import { Button, Card, Modal, Collapse, notification, Spin, Icon, Switch } from 'antd' +import { Button, Card, Modal, Collapse, notification, Spin, Switch } from 'antd' +import { RedoOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -765,7 +766,7 @@ <Card title={ <div> 鏃ュ巻椤甸潰閰嶇疆 - <Icon type="redo" style={{marginLeft: '10px'}} title="鍒锋柊鏍囩鍒楄〃" onClick={() => this.reloadTab(true)} /> + <RedoOutlined style={{marginLeft: '10px'}} title="鍒锋柊鏍囩鍒楄〃" onClick={() => this.reloadTab(true)} /> </div> } bordered={false} extra={ <div> diff --git a/src/templates/comtableconfig/index.scss b/src/templates/comtableconfig/index.scss index 70828ad..05862cb 100644 --- a/src/templates/comtableconfig/index.scss +++ b/src/templates/comtableconfig/index.scss @@ -68,7 +68,7 @@ top: 0px; padding: 0px; cursor: pointer; - i { + .anticon { font-size: 16px; color: #1890ff; } diff --git a/src/templates/formtabconfig/actionform/index.jsx b/src/templates/formtabconfig/actionform/index.jsx index a466fcd..503b392 100644 --- a/src/templates/formtabconfig/actionform/index.jsx +++ b/src/templates/formtabconfig/actionform/index.jsx @@ -1,10 +1,10 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber } from 'antd' +import { Form, Row, Col, Input, Select, Radio, notification, Tooltip, InputNumber } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' import { btnIcons, btnClasses, formRule } from '@/utils/option.js' -// import Utils from '@/utils/utils.js' +import MkIcon from '@/components/mk-icon' import './index.scss' const { TextArea } = Input @@ -331,7 +331,7 @@ > {item.options.map((option, index) => <Select.Option id={`${index}`} title={option.text} key={`${index}`} value={option.value}> - {item.key === 'icon' && option.value && <Icon type={option.value} />} {option.text} + {item.key === 'icon' && option.value && <MkIcon type={option.value} />} {option.text} </Select.Option> )} </Select> diff --git a/src/templates/formtabconfig/dragelement/card.jsx b/src/templates/formtabconfig/dragelement/card.jsx index 7648091..db147f1 100644 --- a/src/templates/formtabconfig/dragelement/card.jsx +++ b/src/templates/formtabconfig/dragelement/card.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Button, Select, DatePicker, Input, InputNumber, Popover } from 'antd' +import { Button, Select, DatePicker, Input, InputNumber, Popover } from 'antd' +import { EditOutlined, CopyOutlined, ProfileOutlined, CloseOutlined, UploadOutlined, TableOutlined } from '@ant-design/icons' import moment from 'moment' import ItemTypes from './itemtypes' import './index.scss' @@ -95,12 +96,12 @@ return ( <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="缂栬緫" type="edit" onClick={edit} /> - {type === 'search' ? <Icon className="edit copy" title="澶嶅埗" type="copy" onClick={copy} /> : null} + <EditOutlined className="edit" title="缂栬緫" onClick={edit} /> + {type === 'search' ? <CopyOutlined className="edit copy" title="澶嶅埗" onClick={copy} /> : null} {type === 'action' && card.btnType !== 'cancel' ? - <Icon className="edit profile" title="鏍¢獙瑙勫垯" type="profile" onClick={profile} /> : null + <ProfileOutlined className="edit profile" title="鏍¢獙瑙勫垯" onClick={profile} /> : null } - {type === 'search' || (type === 'action' && card.btnType !== 'confirm' && card.btnType !== 'cancel') ? <Icon className="edit close" title="鍒犻櫎" type="close" onClick={del} /> : null} + {type === 'search' || (type === 'action' && card.btnType !== 'confirm' && card.btnType !== 'cancel') ? <CloseOutlined className="edit close" title="鍒犻櫎" onClick={del} /> : null} </div> } trigger="hover"> <div className="page-card" style={{ opacity: opacity}}> @@ -137,7 +138,7 @@ } {card.type === 'fileupload' ? <Button> - <Icon type="upload" /> 鐐瑰嚮涓婁紶 + <UploadOutlined /> 鐐瑰嚮涓婁紶 </Button> : null } </div> @@ -149,7 +150,7 @@ icon={card.icon} key={card.uuid} > - {card.label}{card.position === 'grid' && <Icon type="table" />} + {card.label}{card.position === 'grid' && <TableOutlined />} </Button> : null } </div> diff --git a/src/templates/menuconfig/editfirstmenu/dragelement/card.jsx b/src/templates/menuconfig/editfirstmenu/dragelement/card.jsx index 6a51699..b278434 100644 --- a/src/templates/menuconfig/editfirstmenu/dragelement/card.jsx +++ b/src/templates/menuconfig/editfirstmenu/dragelement/card.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Popover } from 'antd' +import { Popover } from 'antd' +import { EditOutlined, CloseOutlined } from '@ant-design/icons' import ItemTypes from './itemtypes' import './index.scss' @@ -35,8 +36,8 @@ return ( <Popover overlayClassName="mk-popover-control-wrap header-menu" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" type="edit" onClick={edit} /> - <Icon className="close" type="close" onClick={del} /> + <EditOutlined className="edit" onClick={edit} /> + <CloseOutlined className="close" onClick={del} /> </div> } trigger="hover"> <div className="card" style={{ opacity }}> diff --git a/src/templates/menuconfig/editfirstmenu/dragelement/index.jsx b/src/templates/menuconfig/editfirstmenu/dragelement/index.jsx index bf3872f..44aa6ac 100644 --- a/src/templates/menuconfig/editfirstmenu/dragelement/index.jsx +++ b/src/templates/menuconfig/editfirstmenu/dragelement/index.jsx @@ -1,6 +1,7 @@ import React, { useState } from 'react' import { useDrop } from 'react-dnd' -import { Icon, Button } from 'antd' +import { Button } from 'antd' +import { PlusOutlined } from '@ant-design/icons' import { is, fromJS } from 'immutable' import update from 'immutability-helper' import Card from './card' @@ -73,7 +74,7 @@ /> ))} <div className="card-add" onClick={add}> - <Icon type="plus" /> + <PlusOutlined /> </div> <Button type="primary" onClick={thawmenu}>{dict['model.thaw'] + dict['model.menu']}</Button> <Button type="primary" onClick={confirm}>{dict['model.confirm']}</Button> diff --git a/src/templates/menuconfig/editsecmenu/index.jsx b/src/templates/menuconfig/editsecmenu/index.jsx index 10f3d70..b52cbb0 100644 --- a/src/templates/menuconfig/editsecmenu/index.jsx +++ b/src/templates/menuconfig/editsecmenu/index.jsx @@ -3,7 +3,8 @@ import { is, fromJS } from 'immutable' import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' -import { notification, Modal, Button, Spin, Icon } from 'antd' +import { notification, Modal, Button, Spin } from 'antd' +import { PlusOutlined } from '@ant-design/icons' import moment from 'moment' import TransferForm from '@/templates/zshare/basetransferform' import Utils from '@/utils/utils.js' @@ -433,7 +434,7 @@ /> : null} </DndProvider> <div className="menu-add" onClick={() => {this.handleSubBtn('add')}}> - <Icon type="plus" /> + <PlusOutlined /> </div> <div className="menu-btn"> <Button type="primary" onClick={() => {this.handleSubBtn('thaw')}}>{dict['model.thaw'] + dict['model.menu']}</Button> diff --git a/src/templates/menuconfig/editthdmenu/index.jsx b/src/templates/menuconfig/editthdmenu/index.jsx index c75528b..1c9c99f 100644 --- a/src/templates/menuconfig/editthdmenu/index.jsx +++ b/src/templates/menuconfig/editthdmenu/index.jsx @@ -5,7 +5,8 @@ import { DndProvider } from 'react-dnd' import { withRouter } from 'react-router-dom' import HTML5Backend from 'react-dnd-html5-backend' -import { notification, Modal, Button, Spin, Icon, Col, Card, Tabs, Row, Input } from 'antd' +import { notification, Modal, Button, Spin, Col, Card, Tabs, Row, Input } from 'antd' +import { PlusOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -16,7 +17,7 @@ import treepage from '@/assets/img/treepage.jpg' import calendar from '@/assets/img/calendar.jpg' import customImg from '@/assets/img/custom.jpg' - +import MkIcon from '@/components/mk-icon' import Preview from './preview' import MenuForm from './menuform' import TransferForm from '@/templates/zshare/basetransferform' @@ -800,7 +801,7 @@ </div> : null } <div className="cus-submenu-title"> - <Icon type={this.props.supMenu.PageParam.Icon} /> + <MkIcon type={this.props.supMenu.PageParam.Icon} /> <span>{this.props.supMenu.MenuName}</span> </div> <DndProvider backend={HTML5Backend}> @@ -811,7 +812,7 @@ /> </DndProvider> <div className="menu-add" onClick={() => {this.handleSubBtn('add')}}> - <Icon type="plus" /> + <PlusOutlined /> </div> <div className="menu-btn"> <Button type="primary" onClick={() => {this.handleSubBtn('thaw')}}>{dict['model.thaw'] + dict['model.menu']}</Button> diff --git a/src/templates/menuconfig/editthdmenu/index.scss b/src/templates/menuconfig/editthdmenu/index.scss index 53a842c..05931e0 100644 --- a/src/templates/menuconfig/editthdmenu/index.scss +++ b/src/templates/menuconfig/editthdmenu/index.scss @@ -89,7 +89,7 @@ font-size: 14px; white-space: nowrap; text-overflow: ellipsis; - i { + .anticon { margin-right: 10px; } } diff --git a/src/templates/menuconfig/menuelement/card.jsx b/src/templates/menuconfig/menuelement/card.jsx index 36a5981..6153de3 100644 --- a/src/templates/menuconfig/menuelement/card.jsx +++ b/src/templates/menuconfig/menuelement/card.jsx @@ -1,7 +1,8 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon } from 'antd' +import { EditOutlined, CloseOutlined } from '@ant-design/icons' import ItemTypes from './itemtypes' +import MkIcon from '@/components/mk-icon' import './index.scss' const Card = ({ id, card, moveCard, findCard, editCard, closeCard }) => { @@ -47,13 +48,13 @@ return ( <div className="side-card" style={{ opacity }}> <div ref={node => drag(drop(node))}> - {card.PageParam && card.PageParam.Icon && <Icon type={card.PageParam.Icon} />} + {card.PageParam && card.PageParam.Icon && <MkIcon type={card.PageParam.Icon} />} {card.MenuName} </div> {/* 鑷畾涔夋ā鏉匡紝鍦ㄦ柊椤甸潰缂栬緫 */} - {!card.forbidden && card.type !== 'CustomPage' ? <Icon className="edit" type="edit" onClick={edit} /> : null} - {card.type === 'CustomPage' ? <Icon className="edit" onClick={() => {window.open(`#/menudesign/${_param}`)}} type="edit" /> : null} - <Icon className="close" type="close" onClick={close} /> + {!card.forbidden && card.type !== 'CustomPage' ? <EditOutlined className="edit" onClick={edit} /> : null} + {card.type === 'CustomPage' ? <EditOutlined className="edit" onClick={() => {window.open(`#/menudesign/${_param}`)}}/> : null} + <CloseOutlined className="close" onClick={close} /> </div> ) } diff --git a/src/templates/menuconfig/menuform/index.jsx b/src/templates/menuconfig/menuform/index.jsx index c2de7f5..df1a2f6 100644 --- a/src/templates/menuconfig/menuform/index.jsx +++ b/src/templates/menuconfig/menuform/index.jsx @@ -1,6 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Select, Icon } from 'antd' +import { Form, Row, Col, Input, Select } from 'antd' + +import MkIcon from '@/components/mk-icon' import './index.scss' class MainSearch extends Component { @@ -72,7 +74,7 @@ > {item.options.map(option => <Select.Option id={option.MenuID} key={option.MenuID} value={option.MenuID}> - {item.key === 'icon' && <Icon type={option.text} />} {option.text || option.MenuName} + {item.key === 'icon' && <MkIcon type={option.text} />} {option.text || option.MenuName} </Select.Option> )} </Select> diff --git a/src/templates/modalconfig/dragelement/card.jsx b/src/templates/modalconfig/dragelement/card.jsx index a7eceb7..662a035 100644 --- a/src/templates/modalconfig/dragelement/card.jsx +++ b/src/templates/modalconfig/dragelement/card.jsx @@ -1,10 +1,11 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Select, DatePicker, Input, InputNumber, Button, Popover, Switch, Radio, Checkbox, Form, Rate, Icon } from 'antd' -import { QuestionCircleOutlined, UploadOutlined, EditOutlined, CopyOutlined, CloseOutlined } from '@ant-design/icons' +import { Select, DatePicker, Input, InputNumber, Button, Popover, Switch, Radio, Checkbox, Form, Rate } from 'antd' +import { QuestionCircleOutlined, UploadOutlined, EditOutlined, CopyOutlined, CloseOutlined, StarFilled } from '@ant-design/icons' import moment from 'moment' import asyncComponent from '@/utils/asyncComponent' +import MkIcon from '@/components/mk-icon' import './index.scss' const { MonthPicker } = DatePicker @@ -91,7 +92,7 @@ } else if (card.type === 'linkMain') { formItem = (<Input style={{marginTop: '4px'}} />) } else if (card.type === 'rate') { - formItem = (<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'} />) + formItem = (<Rate value={card.initval || 0} count={card.rateCount || 5} character={card.character ? <MkIcon type={card.character}/> : <StarFilled />} allowHalf={card.allowHalf === 'true'} />) } else if (card.type === 'switch') { formItem = (<Switch checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''} style={{marginTop: '8px'}} checked={card.initval}/>) } else if (card.type === 'radio') { diff --git a/src/templates/modalconfig/editcard/index.jsx b/src/templates/modalconfig/editcard/index.jsx index 476d7b3..393a27c 100644 --- a/src/templates/modalconfig/editcard/index.jsx +++ b/src/templates/modalconfig/editcard/index.jsx @@ -1,5 +1,6 @@ import React, {Component} from 'react' -import { Row, Col, Icon, Radio, Input } from 'antd' +import { Row, Col, Radio, Input } from 'antd' +import { CheckOutlined } from '@ant-design/icons' import './index.scss' const { Search } = Input @@ -37,7 +38,7 @@ return ( <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '')} > <div className="base" onClick={this.changeSelect}> - <Icon type="check" /> + <CheckOutlined /> <p title={card.field}>瀛楁锛� <span>{card.field}</span></p> <p title={card.label}>鍚嶇О锛� <span>{card.label}</span></p> </div> diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index 5da9692..d6da3a8 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -5,7 +5,8 @@ import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' import moment from 'moment' -import { Button, Card, Modal, Collapse, notification, Icon, Switch } from 'antd' +import { Button, Card, Modal, Collapse, notification, Switch } from 'antd' +import { SettingOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -728,7 +729,7 @@ <Button onClick={this.cancelConfig}>{dict['model.back']}</Button> </div> } style={{ width: '100%' }}> - <Icon type="setting" onClick={this.changeSetting} /> + <SettingOutlined onClick={this.changeSetting} /> <div className="ant-modal-content" style={{width: config.setting.width + '%'}}> <div className="ant-modal-header"> <div className="ant-modal-title">{config.setting.title}</div> diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index 3e31c1e..20d48f2 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -1,10 +1,11 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber, Cascader } from 'antd' +import { Form, Row, Col, Input, Select, Radio, notification, Tooltip, InputNumber, Cascader } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' import { btnIcons, btnClasses, formRule } from '@/utils/option.js' +import MkIcon from '@/components/mk-icon' import Utils from '@/utils/utils.js' import './index.scss' @@ -609,7 +610,7 @@ > {item.options.map((option, index) => <Select.Option id={`${index}`} title={option.text} key={`${index}`} value={option.value || option.field}> - {item.key === 'icon' && option.value ? <Icon type={option.value} /> : null} {option.text || option.label} + {item.key === 'icon' && option.value ? <MkIcon type={option.value} /> : null} {option.text || option.label} </Select.Option> )} </Select> diff --git a/src/templates/sharecomponent/actioncomponent/dragaction/card.jsx b/src/templates/sharecomponent/actioncomponent/dragaction/card.jsx index 6fde75c..d1d61c5 100644 --- a/src/templates/sharecomponent/actioncomponent/dragaction/card.jsx +++ b/src/templates/sharecomponent/actioncomponent/dragaction/card.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Button, Popover } from 'antd' +import { Button, Popover } from 'antd' +import { EditOutlined, CopyOutlined, ProfileOutlined, CloseOutlined, TableOutlined, DisconnectOutlined } from '@ant-design/icons' import './index.scss' const Card = ({ id, card, moveCard, findCard, editCard, delCard, copyCard, profileCard, doubleClickCard }) => { @@ -46,10 +47,10 @@ return ( <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="edit" type="edit" onClick={() => editCard(id)} /> - <Icon className="copy" title="copy" type="copy" onClick={() => copyCard(id)} /> - <Icon className="close" title="close" type="close" onClick={() => delCard(id)} /> - {hasProfile ? <Icon className="profile" title="setting" type="profile" onClick={() => profileCard(id)} /> : null} + <EditOutlined className="edit" onClick={() => editCard(id)} /> + <CopyOutlined className="copy" onClick={() => copyCard(id)} /> + <CloseOutlined className="close" onClick={() => delCard(id)} /> + {hasProfile ? <ProfileOutlined className="profile" onClick={() => profileCard(id)} /> : null} </div> } trigger="hover"> <div className="page-card" style={{ opacity: opacity}}> @@ -60,7 +61,7 @@ key={card.uuid} onDoubleClick={() => doubleClickCard(id)} > - {card.label}{card.position === 'grid' && <Icon type="table" />}{forbidSql && <Icon type="disconnect" />} + {card.label}{card.position === 'grid' && <TableOutlined />}{forbidSql && <DisconnectOutlined />} </Button> </div> </div> diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index 1328845..2681e29 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -1,8 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Tabs, Row, Col, Input, Button, Popconfirm, Icon, Tooltip, notification, Modal, message, InputNumber, Radio, Typography } from 'antd' -import { QuestionCircleOutlined, StopOutlined, CheckCircleOutlined } from '@ant-design/icons' +import { Form, Tabs, Row, Col, Input, Button, Popconfirm, Tooltip, notification, Modal, message, InputNumber, Radio, Typography } from 'antd' +import { EditOutlined, QuestionCircleOutlined, StopOutlined, CheckCircleOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -223,14 +223,14 @@ dataIndex: 'operation', render: (text, record) => (<div style={{textAlign: 'center'}}> - <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><Icon type="edit" /></span> - <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><Icon type="swap" /></span> + <span className="operation-btn" title={this.props.dict['model.edit']} onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" title={this.props.dict['header.form.status.change']} onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span> <Popconfirm overlayClassName="popover-confirm" title={this.props.dict['model.query.delete']} onConfirm={() => this.handleDelete(record, 'scripts') }> - <span className="operation-btn" style={{color: '#ff4d4f'}}><Icon type="delete" /></span> + <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> </Popconfirm> </div>) } diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/editable/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/editable/index.jsx index 4d8d4d8..bf99d3c 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyprint/editable/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyprint/editable/index.jsx @@ -1,5 +1,6 @@ import React, {Component} from 'react' -import { Table, Input, Popconfirm, Form, Icon } from 'antd' +import { Table, Input, Popconfirm, Form } from 'antd' +import { ArrowUpOutlined, ArrowDownOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import './index.scss' @@ -114,13 +115,13 @@ render: (text, record) => this.state.dataSource.length >= 1 ? ( <div> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span> <Popconfirm overlayClassName="popover-confirm" onConfirm={() => this.handleDelete(record.key) }> - <span style={{color: '#1890ff', cursor: 'pointer'}}><Icon type="delete" /></span> + <span style={{color: '#1890ff', cursor: 'pointer'}}><DeleteOutlined /></span> </Popconfirm> </div> ) : null, @@ -220,7 +221,7 @@ }) return ( <div className="print-verify-edit-table"> - <Icon className="add-row" type="plus" onClick={this.handleAdd} /> + <PlusOutlined className="add-row" onClick={this.handleAdd} /> <Table components={components} rowClassName={() => 'editable-row'} diff --git a/src/templates/sharecomponent/cardcomponent/dragdetail/card.jsx b/src/templates/sharecomponent/cardcomponent/dragdetail/card.jsx index db22571..0cd8dbc 100644 --- a/src/templates/sharecomponent/cardcomponent/dragdetail/card.jsx +++ b/src/templates/sharecomponent/cardcomponent/dragdetail/card.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Popover } from 'antd' +import { Popover } from 'antd' +import { EditOutlined, CloseOutlined } from '@ant-design/icons' import './index.scss' const Card = ({ id, card, moveCard, findCard, editCard, delCard }) => { @@ -30,8 +31,8 @@ return ( <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="缂栬緫" type="edit" onClick={() => editCard(card)} /> - <Icon className="edit close" title="鍒犻櫎" type="close" onClick={() => delCard(card)} /> + <EditOutlined className="edit" title="缂栬緫" onClick={() => editCard(card)} /> + <CloseOutlined className="edit close" title="鍒犻櫎" onClick={() => delCard(card)} /> </div> } trigger="hover"> <div ref={node => drag(drop(node))} className={'mk-card-meta-item ' + card.align} style={{opacity: opacity, width: card.width + '%'}}> diff --git a/src/templates/sharecomponent/cardcomponent/index.jsx b/src/templates/sharecomponent/cardcomponent/index.jsx index f893b7c..00e2f78 100644 --- a/src/templates/sharecomponent/cardcomponent/index.jsx +++ b/src/templates/sharecomponent/cardcomponent/index.jsx @@ -1,13 +1,14 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Modal, Popover } from 'antd' +import { Modal, Popover } from 'antd' +import { EditOutlined, CloseOutlined, PlusOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import { getCardDetailForm } from '@/templates/zshare/formconfig' - +import MkIcon from '@/components/mk-icon' import DragDetail from './dragdetail' import CardDetailForm from './carddetailform' import avatar from '@/assets/img/avatar.png' @@ -381,8 +382,8 @@ {card.subelement.includes('header') ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="Edit" type="edit" onClick={this.editHeader} /> - <Icon className="close" title="close" type="close" onClick={() => this.deleteElem('header')} /> + <EditOutlined className="edit" onClick={this.editHeader} /> + <CloseOutlined className="close" onClick={() => this.deleteElem('header')} /> </div> } trigger="hover"> <div className="ant-card-head"> @@ -391,7 +392,7 @@ {card.header.actions && card.header.actions.length > 0 ? <div className="ant-card-extra"> <span> - {['icon', 'all'].includes(card.header.show) ? <Icon type={card.header.actions[0].icon || 'dash'}/> : null} + {['icon', 'all'].includes(card.header.show) ? <MkIcon type={card.header.actions[0].icon || 'dash'}/> : null} {['text', 'all'].includes(card.header.show) ? card.header.actions[0].text : null} </span> </div> : null @@ -402,18 +403,18 @@ } <div className="ant-card-body"> <div className="ant-card-meta" style={metastyle}> - <Icon type="plus" onClick={() => this.editdetail()} /> + <PlusOutlined onClick={() => this.editdetail()} /> {card.subelement.includes('avatar') ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="Edit" type="edit" onClick={this.editAvatar} /> - <Icon className="close" title="close" type="close" onClick={() => this.deleteElem('avatar')} /> + <EditOutlined className="edit" onClick={this.editAvatar} /> + <CloseOutlined className="close" onClick={() => this.deleteElem('avatar')} /> </div> } trigger="hover"> <div className="ant-card-meta-avatar" style={card.avatar.type === 'icon' ? {width: card.avatar.width, paddingTop: card.avatar.width} : {width: card.avatar.width + '%', paddingTop: card.avatar.width + '%'}}> <span className="ant-avatar ant-avatar-circle ant-avatar-image" style={{borderRadius: card.avatar.radius === 'true' ? '50%' : 0}}> {card.avatar.type === 'picture' ? <img src={avatar} alt=""/> : null} - {card.avatar.type === 'icon' ? <Icon className={'font ' + card.avatar.color} style={{fontSize: card.avatar.size + 'px'}} type={card.avatar.icon} /> : null} + {card.avatar.type === 'icon' ? <MkIcon className={'font ' + card.avatar.color} style={{fontSize: card.avatar.size + 'px'}} type={card.avatar.icon} /> : null} </span> </div> </Popover> : null @@ -431,14 +432,14 @@ {card.subelement.includes('bottom') ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="Edit" type="edit" onClick={this.editBottom} /> - <Icon className="close" title="close" type="close" onClick={() => this.deleteElem('bottom')} /> + <EditOutlined className="edit" onClick={this.editBottom} /> + <CloseOutlined className="close" onClick={() => this.deleteElem('bottom')} /> </div> } trigger="hover"> <ul className="ant-card-actions"> {card.bottom.actions.map((item, i) => (<li key={i} style={{width: _width}}> <span> - {['icon', 'all'].includes(card.bottom.show) ? <Icon type={item.icon || 'dash'}/> : null} + {['icon', 'all'].includes(card.bottom.show) ? <MkIcon type={item.icon || 'dash'}/> : null} {['text', 'all'].includes(card.bottom.show) ? item.text : null} </span> </li>))} @@ -448,7 +449,7 @@ </div> {card.extraAction ? <div className={'ant-card chart-card chart-card-insert ' + outclass} style={{ width: cardwidth, height: cardheight }} > - <Icon type="plus" style={cardwidth > cardheight ? {fontSize: cardheight / 2 + 'px', lineHeight: cardheight + 'px'} : {fontSize: cardwidth / 2 + 'px', lineHeight: cardheight + 'px'}} /> + <PlusOutlined style={cardwidth > cardheight ? {fontSize: cardheight / 2 + 'px', lineHeight: cardheight + 'px'} : {fontSize: cardwidth / 2 + 'px', lineHeight: cardheight + 'px'}} /> </div> : null } {/* 鏄剧ず鍒楃紪杈� */} diff --git a/src/templates/sharecomponent/cardcomponent/index.scss b/src/templates/sharecomponent/cardcomponent/index.scss index e457e80..4971023 100644 --- a/src/templates/sharecomponent/cardcomponent/index.scss +++ b/src/templates/sharecomponent/cardcomponent/index.scss @@ -19,7 +19,7 @@ } .ant-card-extra { color: #1890ff; - i { + .anticon { margin-right: 5px; } } @@ -30,7 +30,7 @@ } .chart-card-insert { text-align: center; - i { + .anticon { color: #1890ff; } } diff --git a/src/templates/sharecomponent/chartgroupcomponent/dragchartview/card.jsx b/src/templates/sharecomponent/chartgroupcomponent/dragchartview/card.jsx index 814950b..533197b 100644 --- a/src/templates/sharecomponent/chartgroupcomponent/dragchartview/card.jsx +++ b/src/templates/sharecomponent/chartgroupcomponent/dragchartview/card.jsx @@ -1,6 +1,9 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Popover } from 'antd' +import { Popover } from 'antd' +import { EditOutlined, CloseOutlined } from '@ant-design/icons' + +import MkIcon from '@/components/mk-icon' import './index.scss' const Card = ({ id, card, moveCard, findCard, editCard, delCard }) => { @@ -38,13 +41,13 @@ return ( <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="缂栬緫" type="edit" onClick={edit} /> - {card.chartType !== 'table' ? <Icon className="edit close" title="鍒犻櫎" type="close" onClick={del} /> : null} + <EditOutlined className="edit" title="缂栬緫" onClick={edit} /> + {card.chartType !== 'table' ? <CloseOutlined className="edit close" title="鍒犻櫎" onClick={del} /> : null} </div> } trigger="hover"> <div className="chart-tab" style={{ opacity: opacity}}> <div ref={node => drag(drop(node))}> - <Icon type={card.icon} /> + <MkIcon type={card.icon} /> </div> </div> </Popover> diff --git a/src/templates/sharecomponent/chartgroupcomponent/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/index.jsx index 796264e..7dd78e8 100644 --- a/src/templates/sharecomponent/chartgroupcomponent/index.jsx +++ b/src/templates/sharecomponent/chartgroupcomponent/index.jsx @@ -1,7 +1,8 @@ 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 { DownOutlined, UpOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' @@ -259,8 +260,8 @@ return ( <div className="model-table-chartview-list"> - {/* <Icon type="plus" onClick={() => this.handleChart()} /> */} - {chartlist.length > 1 ? <Icon type={config.expand ? 'up' : 'down'} title="灞曞紑/鍚堝苟" onClick={this.onChartChange} /> : null} + {/* <PlusOutlined onClick={() => this.handleChart()} /> */} + {chartlist.length > 1 ? (config.expand ? <UpOutlined onClick={this.onChartChange} /> : <DownOutlined onClick={this.onChartChange} />) : null} {chartlist.length > 1 ? <DragChartView activeKey={chartview} list={chartlist} diff --git a/src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx b/src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx index 308dfd4..91ff3d3 100644 --- a/src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx +++ b/src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Popover } from 'antd' +import { Popover } from 'antd' +import { EditOutlined, CloseOutlined, AntDesignOutlined, CaretUpOutlined, CaretDownOutlined, CloseCircleOutlined } from '@ant-design/icons' import './index.scss' const Card = ({ id, card, showfield, moveCard, findCard, editCard, delCard, markCard }) => { @@ -31,9 +32,9 @@ return ( <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="edit" type="edit" onClick={() => editCard(id)} /> - <Icon className="close" title="delete" type="close" onClick={() => delCard(id)} /> - {['text', 'number'].includes(card.type) && !card.origin ? <Icon className="profile" title="mark" type="ant-design" onClick={() => markCard(id)} /> : null} + <EditOutlined className="edit" onClick={() => editCard(id)} /> + <CloseOutlined className="close" onClick={() => delCard(id)} /> + {['text', 'number'].includes(card.type) && !card.origin ? <AntDesignOutlined className="profile" title="鏍囪" onClick={() => markCard(id)} /> : null} </div> } trigger="hover"> <div className="page-card" style={{ flex: card.Width, opacity: opacity}}> @@ -43,15 +44,15 @@ <span className="ant-table-column-title">{card.label}</span> {card.IsSort === 'true' ? <span className="ant-table-column-sorter"> - <Icon type="caret-up" /> - <Icon type="caret-down" /> + <CaretUpOutlined /> + <CaretDownOutlined /> </span> : null } </div> {showfield ? <div className="ant-table-column-fields"> <span className="ant-table-column-title">{card.type === 'colspan' ? card.subfield : card.field}</span> - {card.Hide === 'true' ? <Icon style={{marginLeft: '5px', color: 'orange', fontSize: '12px'}} type="close-circle" /> : null} + {card.Hide === 'true' ? <CloseCircleOutlined style={{marginLeft: '5px', color: 'orange', fontSize: '12px'}}/> : null} </div> : null } </span> diff --git a/src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx b/src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx index 1dcabb0..c364c6d 100644 --- a/src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx +++ b/src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx @@ -2,7 +2,8 @@ import { useDrop } from 'react-dnd' import { is, fromJS } from 'immutable' import update from 'immutability-helper' -import { Icon, Popover } from 'antd' +import { Popover } from 'antd' +import { EditOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import Card from './card' import './index.scss' @@ -146,7 +147,7 @@ {i === (columns.length - 1) && gridBtn && gridBtn.display ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" type="edit" onClick={handleGridBtn}/> + <EditOutlined className="edit" onClick={handleGridBtn}/> </div> } trigger="hover"> <div className="page-card" style={{flex: gridBtn.Width}}> diff --git a/src/templates/sharecomponent/columncomponent/markcolumn/index.jsx b/src/templates/sharecomponent/columncomponent/markcolumn/index.jsx index 45662b3..a7ab159 100644 --- a/src/templates/sharecomponent/columncomponent/markcolumn/index.jsx +++ b/src/templates/sharecomponent/columncomponent/markcolumn/index.jsx @@ -1,11 +1,12 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Table, Popconfirm, Icon } from 'antd' +import { Table, Popconfirm } from 'antd' +import { EditOutlined, DeleteOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' - import MarkForm from './markform' +import MkIcon from '@/components/mk-icon' import './index.scss' import '@/assets/css/table.scss' @@ -92,9 +93,9 @@ content = '鏁堟灉鍦ㄥ崱鐗囦腑鍙' } else if (record.signType === 'icon') { if (record.position === 'front') { - content = <div><Icon className={'font ' + record.color[1]} type={record.icon} /> {content} </div> + content = <div><MkIcon className={'font ' + record.color[1]} type={record.icon} /> {content} </div> } else { - content = <div> {content} <Icon className={'font ' + record.color[1]} type={record.icon} /> </div> + content = <div> {content} <MkIcon className={'font ' + record.color[1]} type={record.icon} /> </div> } } @@ -113,14 +114,14 @@ render: (text, record) => ( <div> - <span className="operation-btn" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><Icon type="edit" /></span> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> + <span className="operation-btn" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span> <Popconfirm overlayClassName="popover-confirm" 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> ) diff --git a/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx b/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx index 212a404..e98fb1e 100644 --- a/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx +++ b/src/templates/sharecomponent/columncomponent/markcolumn/markform/index.jsx @@ -1,8 +1,9 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Select, Button, Input, Radio, Icon, Cascader } from 'antd' +import { Form, Row, Col, Select, Button, Input, Radio, Cascader } from 'antd' import { minkeColorSystem, minkeIconSystem } from '@/utils/option.js' +import MkIcon from '@/components/mk-icon' import './index.scss' class UniqueForm extends Component { @@ -53,7 +54,7 @@ selectIcon: record.icon || '', options: this.state.options.map(option => { option.children = option.children.map(cell => { - cell.label = <div className={_type + cell.value}>{record.icon ? <Icon type={record.icon} /> : cell.value}</div> + cell.label = <div className={_type + cell.value}>{record.icon ? <MkIcon type={record.icon} /> : cell.value}</div> return cell }) @@ -145,7 +146,7 @@ selectIcon: val, options: this.state.options.map(option => { option.children = option.children.map(cell => { - cell.label = <div className={'font ' + cell.value}><Icon type={val} /></div> + cell.label = <div className={'font ' + cell.value}><MkIcon type={val} /></div> return cell }) @@ -331,7 +332,7 @@ ] })( <Select onChange={this.changeIcon} getPopupContainer={() => document.getElementById('model-mark-form-box')}> - {icons.map(icon => <Select.Option key={icon} value={icon}><Icon type={icon} /></Select.Option>)} + {icons.map(icon => <Select.Option key={icon} value={icon}><MkIcon type={icon} /></Select.Option>)} </Select> )} </Form.Item> diff --git a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx index c5d19f5..c6d82e3 100644 --- a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx +++ b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import { is, fromJS } from 'immutable' -import { Row, Col, Icon, Radio, Input, Button } from 'antd' +import { Row, Col, Radio, Input, Button } from 'antd' +import { CheckOutlined } from '@ant-design/icons' import './index.scss' const { Search } = Input @@ -69,7 +70,7 @@ return ( <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '') + (card.origin ? ' fixed' : '')} > <div className="base" onClick={this.changeSelect}> - <Icon type="check" /> + <CheckOutlined /> <p title={card.field}>瀛楁锛� <span>{card.field}</span></p> <p title={card.label}>鍚嶇О锛� <span>{card.label}</span></p> </div> diff --git a/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx b/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx index b0c3855..e8f7af2 100644 --- a/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx +++ b/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Select, DatePicker, Input, Popover, Form } from 'antd' +import { Select, DatePicker, Input, Popover, Form } from 'antd' +import { EditOutlined, CopyOutlined, CloseOutlined } from '@ant-design/icons' import moment from 'moment' import DateGroup from '../dategroup' @@ -97,9 +98,9 @@ return ( <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <Icon className="edit" title="edit" type="edit" onClick={() => editCard(id)} /> - <Icon className="copy" title="copy" type="copy" onClick={() => copyCard(id)} /> - <Icon className="close" title="delete" type="close" onClick={() => delCard(id)} /> + <EditOutlined className="edit" onClick={() => editCard(id)} /> + <CopyOutlined className="copy" onClick={() => copyCard(id)} /> + <CloseOutlined className="close" onClick={() => delCard(id)} /> </div> } trigger="hover"> <div className={'page-card ' + (card.labelShow || '') + ' ' + type} style={{ opacity: opacity}}> diff --git a/src/templates/sharecomponent/searchcomponent/searcheditable/index.jsx b/src/templates/sharecomponent/searchcomponent/searcheditable/index.jsx index 4504389..4851b90 100644 --- a/src/templates/sharecomponent/searchcomponent/searcheditable/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searcheditable/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import { is, fromJS } from 'immutable' -import { Table, Input, Popconfirm, Form, Icon } from 'antd' +import { Table, Input, Popconfirm, Form } from 'antd' +import { ArrowDownOutlined, PlusOutlined, ArrowUpOutlined, DeleteOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import './index.scss' @@ -113,13 +114,13 @@ render: (text, record) => this.state.dataSource.length >= 1 ? ( <div> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span> <Popconfirm overlayClassName="popover-confirm" onConfirm={() => this.handleDelete(record.key) }> - <span style={{color: '#ff4d4f', cursor: 'pointer'}}><Icon type="delete" /></span> + <span style={{color: '#ff4d4f', cursor: 'pointer'}}><DeleteOutlined /></span> </Popconfirm> </div> ) : null, @@ -226,13 +227,13 @@ render: (text, record) => this.state.dataSource.length >= 1 ? ( <div> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span> <Popconfirm overlayClassName="popover-confirm" onConfirm={() => this.handleDelete(record.key) }> - <span style={{color: '#1890ff', cursor: 'pointer'}}><Icon type="delete" /></span> + <span style={{color: '#1890ff', cursor: 'pointer'}}><DeleteOutlined /></span> </Popconfirm> </div> ) : null, @@ -290,7 +291,7 @@ }) return ( <div className="model-search-edit-table"> - <Icon className="add-row" type="plus" onClick={this.handleAdd} /> + <PlusOutlined className="add-row" onClick={this.handleAdd} /> <Table components={components} rowClassName={() => 'editable-row'} diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index 8c0fb58..cc1c227 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber, Checkbox, Cascader } from 'antd' +import { Form, Row, Col, Input, Select, Radio, notification, Tooltip, InputNumber, Checkbox, Cascader } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' import { dateOptions, matchReg, formRule } from '@/utils/option.js' @@ -9,6 +9,7 @@ import Utils from '@/utils/utils.js' import CodeMirror from '@/templates/zshare/codemirror' import asyncComponent from '@/utils/asyncComponent' +import MkIcon from '@/components/mk-icon' import './index.scss' const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) @@ -486,7 +487,7 @@ > {item.options.map(option => <Select.Option id={option.value} title={option.text} key={option.value} value={option.value}> - {item.key === 'icon' && <Icon type={option.text} />} {option.text} + {item.key === 'icon' && <MkIcon type={option.text} />} {option.text} </Select.Option> )} </Select> diff --git a/src/templates/sharecomponent/settingcalcomponent/index.jsx b/src/templates/sharecomponent/settingcalcomponent/index.jsx index 9aa21fa..0054f25 100644 --- a/src/templates/sharecomponent/settingcalcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/index.jsx @@ -1,7 +1,8 @@ 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 { SettingOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -69,7 +70,7 @@ return ( <div className="model-datasource"> - <Icon type="setting" onClick={() => this.editDataSource()} /> + <SettingOutlined onClick={() => this.editDataSource()} /> <Modal wrapClassName="popview-modal" title={'鏁版嵁婧愰厤缃�'} diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx index 8e00256..b87cf16 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Tabs, Table, Popconfirm, Icon, notification, Modal, Spin } from 'antd' +import { Form, Tabs, Table, Popconfirm, notification, Modal, Spin } from 'antd' +import { EditOutlined, DeleteOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -55,13 +56,13 @@ dataIndex: 'operation', render: (text, record) => (<div> - <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['model.edit']} onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> <Popconfirm overlayClassName="popover-confirm" title={this.props.dict['model.query.delete']} onConfirm={() => this.deleteColumn(record) }> - <span className="operation-btn" style={{color: '#ff4d4f'}}><Icon type="delete" /></span> + <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> </Popconfirm> </div>) } diff --git a/src/templates/sharecomponent/settingcomponent/index.jsx b/src/templates/sharecomponent/settingcomponent/index.jsx index 340c36e..eaf65ba 100644 --- a/src/templates/sharecomponent/settingcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Modal, Button } from 'antd' +import { Modal, Button } from 'antd' +import { SettingOutlined } from '@ant-design/icons' import Utils, { FuncUtils } from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' @@ -172,7 +173,7 @@ return ( <div className="model-menu-setting"> - <Icon type="setting" onClick={this.changeSetting} /> + <SettingOutlined onClick={this.changeSetting} /> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal wrapClassName="model-table-setting-verify-modal" diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx index 41dce62..44a3d6f 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx @@ -1,8 +1,8 @@ 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 { StopOutlined, CheckCircleOutlined } from '@ant-design/icons' +import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio } from 'antd' +import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons' import moment from 'moment' import Utils from '@/utils/utils.js' @@ -87,14 +87,14 @@ 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>) } diff --git a/src/templates/sharecomponent/tabscomponent/tabdragelement/card.jsx b/src/templates/sharecomponent/tabscomponent/tabdragelement/card.jsx index dd3bb58..f4017f9 100644 --- a/src/templates/sharecomponent/tabscomponent/tabdragelement/card.jsx +++ b/src/templates/sharecomponent/tabscomponent/tabdragelement/card.jsx @@ -1,6 +1,9 @@ import React from 'react' import { useDrag, useDrop } from 'react-dnd' -import { Icon, Popover } from 'antd' +import { Popover } from 'antd' +import { EditOutlined, CloseOutlined } from '@ant-design/icons' + +import MkIcon from '@/components/mk-icon' import './index.scss' const Card = ({ id, card, moveCard, findCard, doubleClickCard, editCard, delCard }) => { @@ -43,13 +46,13 @@ 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="close" type="close" onClick={del} /> + <EditOutlined className="edit" onClick={edit} /> + <CloseOutlined className="close" onClick={del} /> </div> } trigger="hover"> <div className="page-card" style={{ opacity: opacity}}> <div ref={node => drag(drop(node))} onDoubleClick={doubleClick}> - {card.icon ? <Icon type={card.icon} /> : null} + {card.icon ? <MkIcon type={card.icon} /> : null} {card.label} </div> </div> diff --git a/src/templates/sharecomponent/tabscomponent/tabform/index.jsx b/src/templates/sharecomponent/tabscomponent/tabform/index.jsx index 267c67c..edfd410 100644 --- a/src/templates/sharecomponent/tabscomponent/tabform/index.jsx +++ b/src/templates/sharecomponent/tabscomponent/tabform/index.jsx @@ -1,9 +1,10 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Select, Icon, Tooltip, Radio, InputNumber, notification } from 'antd' +import { Form, Row, Col, Input, Select, Tooltip, Radio, InputNumber, notification } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' import { formRule } from '@/utils/option.js' +import MkIcon from '@/components/mk-icon' import Utils from '@/utils/utils.js' // import './index.scss' @@ -189,7 +190,7 @@ > {item.options.map((option, i) => <Select.Option id={'mk' + i} title={option.text} key={'mk' + i} value={option.value}> - {item.key === 'icon' && i !== 0 ? <Icon type={option.text} /> : option.text} + {item.key === 'icon' && i !== 0 ? <MkIcon type={option.text} /> : option.text} </Select.Option> )} </Select> diff --git a/src/templates/sharecomponent/treesettingcomponent/index.jsx b/src/templates/sharecomponent/treesettingcomponent/index.jsx index db18c0b..17a1e80 100644 --- a/src/templates/sharecomponent/treesettingcomponent/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Icon, Modal } from 'antd' +import { Modal } from 'antd' +import { SettingOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' @@ -84,7 +85,7 @@ return ( <div className="model-tree-menu-setting"> - <Icon type="setting" onClick={this.changeSetting} /> + <SettingOutlined onClick={this.changeSetting} /> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal wrapClassName="model-tree-setting-verify-modal" diff --git a/src/templates/zshare/codemirror/index.jsx b/src/templates/zshare/codemirror/index.jsx index edba82c..98b324a 100644 --- a/src/templates/zshare/codemirror/index.jsx +++ b/src/templates/zshare/codemirror/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Dropdown, Menu } from 'antd' +import { Dropdown, Menu } from 'antd' +import { FullscreenOutlined, FullscreenExitOutlined, FontSizeOutlined } from '@ant-design/icons' import {UnControlled as CodeMirror} from 'react-codemirror2' import 'codemirror/mode/javascript/javascript' @@ -148,10 +149,10 @@ return ( <div className="code-mirror-wrap" style={fullScreen ? style : null}> - {!fullScreen ? <Icon type="fullscreen" onClick={this.fullScreenChange}/> : null} - {fullScreen ? <Icon type="fullscreen-exit" onClick={this.fullScreenChange}/> : null} + {!fullScreen ? <FullscreenOutlined onClick={this.fullScreenChange}/> : null} + {fullScreen ? <FullscreenExitOutlined onClick={this.fullScreenChange}/> : null} {fullScreen ? <Dropdown overlay={menu} placement="bottomRight"> - <Icon type="font-size" /> + <FontSizeOutlined /> </Dropdown> : null} {display ? <CodeMirror className="code-mirror-area" diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx index bf6ddb4..4ddae3f 100644 --- a/src/templates/zshare/customscript/index.jsx +++ b/src/templates/zshare/customscript/index.jsx @@ -1,8 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, Icon, Button, notification, Select, Popconfirm, Typography } from 'antd' -import { StopOutlined, CheckCircleOutlined } from '@ant-design/icons' +import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography } from 'antd' +import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons' import moment from 'moment' import Utils from '@/utils/utils.js' @@ -74,14 +74,14 @@ 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>) } diff --git a/src/templates/zshare/editTable/index.jsx b/src/templates/zshare/editTable/index.jsx index 2c90377..a5af7c8 100644 --- a/src/templates/zshare/editTable/index.jsx +++ b/src/templates/zshare/editTable/index.jsx @@ -2,7 +2,8 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { DndProvider, DragSource, DropTarget } from 'react-dnd' -import { Table, Input, InputNumber, Popconfirm, Form, Icon, Select, Radio, Cascader, notification, message, Modal, Typography } from 'antd' +import { Table, Input, InputNumber, Popconfirm, Form, Select, Radio, Cascader, notification, message, Modal, Typography } from 'antd' +import { CopyOutlined, EditOutlined, DeleteOutlined, SnippetsOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import ColorSketch from '@/mob/colorsketch' @@ -191,9 +192,9 @@ title: (<div> {eTDict['model.operation']} <span className="copy-control"> - {actions.includes('copy') ? <Icon type="copy" title="澶嶅埗" onClick={() => this.copy()} /> : null} - {actions.includes('copy') ? <Icon type="snippets" title="绮樿创" onClick={this.paste} /> : null} - {actions.includes('clear') ? <Icon type="delete" title="娓呯┖" onClick={this.clear} /> : null} + {actions.includes('copy') ? <CopyOutlined title="澶嶅埗" onClick={() => this.copy()} /> : null} + {actions.includes('copy') ? <SnippetsOutlined title="绮樿创" onClick={this.paste} /> : null} + {actions.includes('clear') ? <DeleteOutlined title="娓呯┖" onClick={this.clear} /> : null} </span> </div>), dataIndex: 'operation', @@ -214,16 +215,16 @@ </div> ) : ( <div className={'edit-operation-btn' + (editingKey !== '' ? ' disabled' : '')} style={{minWidth: '110px'}}> - {actions.includes('edit') ? <span className="primary" onClick={() => {editingKey === '' && this.edit(record.uuid)}}><Icon type="edit" /></span> : null} - {actions.includes('copy') ? <span className="copy" onClick={() => {editingKey === '' && this.copy(record)}}><Icon type="copy" /></span> : null} + {actions.includes('edit') ? <span className="primary" onClick={() => {editingKey === '' && this.edit(record.uuid)}}><EditOutlined /></span> : null} + {actions.includes('copy') ? <span className="copy" onClick={() => {editingKey === '' && this.copy(record)}}><CopyOutlined /></span> : null} {actions.includes('del') && editingKey === '' ? <Popconfirm overlayClassName="popover-confirm" title={eTDict['model.query.delete']} onConfirm={() => this.handleDelete(record.uuid) }> - <span className="danger"><Icon type="delete" /></span> + <span className="danger"><DeleteOutlined /></span> </Popconfirm> : null} - {actions.includes('del') && editingKey !== '' ? <span className="danger"><Icon type="delete" /></span> : null} + {actions.includes('del') && editingKey !== '' ? <span className="danger"><DeleteOutlined /></span> : null} </div> ) } diff --git a/src/templates/zshare/editcard/index.jsx b/src/templates/zshare/editcard/index.jsx index befaacb..b18e19d 100644 --- a/src/templates/zshare/editcard/index.jsx +++ b/src/templates/zshare/editcard/index.jsx @@ -1,5 +1,6 @@ import React, {Component} from 'react' -import { Row, Col, Icon, Radio, Input, Button } from 'antd' +import { Row, Col, Radio, Input, Button } from 'antd' +import { CheckOutlined } from '@ant-design/icons' import './index.scss' const { Search } = Input @@ -52,7 +53,7 @@ return ( <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '')} > <div className="base" onClick={this.changeSelect}> - <Icon type="check" /> + <CheckOutlined /> <p title={card.field}>{this.props.dict['model.form.field']}锛� <span>{card.field}</span></p> <p title={card.label}>{this.props.dict['model.name']}锛� <span>{card.label}</span></p> </div> diff --git a/src/templates/zshare/modalform/datatable/index.jsx b/src/templates/zshare/modalform/datatable/index.jsx index 21ae904..b7c094e 100644 --- a/src/templates/zshare/modalform/datatable/index.jsx +++ b/src/templates/zshare/modalform/datatable/index.jsx @@ -2,7 +2,8 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { DndProvider, DragSource, DropTarget } from 'react-dnd' -import { Table, Input, Popconfirm, Form, Icon, notification } from 'antd' +import { Table, Input, Popconfirm, Form, notification } from 'antd' +import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import FileUpload from '@/tabviews/zshare/fileupload' @@ -224,15 +225,15 @@ </span> ) : ( <div className={'operation-btn' + (editingKey !== '' ? ' disabled' : '')}> - <span className="primary" onClick={() => {editingKey === '' && this.edit(record.key)}}><Icon type="edit" /></span> + <span className="primary" onClick={() => {editingKey === '' && this.edit(record.key)}}><EditOutlined /></span> {editingKey === '' ? <Popconfirm overlayClassName="popover-confirm" title={this.props.dict['model.query.delete']} onConfirm={() => this.handleDelete(record.key) }> - <span className="danger"><Icon type="delete" /></span> + <span className="danger"><DeleteOutlined /></span> </Popconfirm> : null} - {editingKey !== '' ? <span className="danger"><Icon type="delete" /></span> : null} + {editingKey !== '' ? <span className="danger"><DeleteOutlined /></span> : null} </div> ) } @@ -377,7 +378,7 @@ return ( <EditableContext.Provider value={this.props.form}> <div className="modal-card-data-table"> - {addable ? <Icon className="add-row" type="plus" onClick={this.handleAdd} /> : null} + {addable ? <PlusOutlined className="add-row" onClick={this.handleAdd} /> : null} <DndProvider> <Table components={components} diff --git a/src/templates/zshare/modalform/fieldtable/index.jsx b/src/templates/zshare/modalform/fieldtable/index.jsx index ca85936..6f516b4 100644 --- a/src/templates/zshare/modalform/fieldtable/index.jsx +++ b/src/templates/zshare/modalform/fieldtable/index.jsx @@ -1,6 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import { Icon, notification } from 'antd' +import { notification } from 'antd' +import { PlusOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' import Utils from '@/utils/utils.js' @@ -116,7 +117,7 @@ return ( <div className="modal-card-field-table"> - {data.length < 3 ? <Icon className="add-row" type="plus" onClick={this.handleAdd} /> : null} + {data.length < 3 ? <PlusOutlined className="add-row" onClick={this.handleAdd} /> : null} <EditTable actions={['edit', 'move', 'del']} data={data} columns={columns} onChange={this.changeData}/> </div> ) diff --git a/src/templates/zshare/modalform/modaleditable/index.jsx b/src/templates/zshare/modalform/modaleditable/index.jsx index 2af510f..2713db5 100644 --- a/src/templates/zshare/modalform/modaleditable/index.jsx +++ b/src/templates/zshare/modalform/modaleditable/index.jsx @@ -1,7 +1,9 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Table, Input, Popconfirm, Form, Icon, Radio } from 'antd' +import { Table, Input, Popconfirm, Form, Radio } from 'antd' +import { ArrowUpOutlined, ArrowDownOutlined, DeleteOutlined, PlusOutlined, SwapOutlined } from '@ant-design/icons' + import { formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' import './index.scss' @@ -166,13 +168,13 @@ render: (text, record) => this.state.dataSource.length >= 1 ? ( <div> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span> <Popconfirm overlayClassName="popover-confirm" onConfirm={() => this.handleDelete(record.key) }> - <span style={{color: '#ff4d4f', cursor: 'pointer'}}><Icon type="delete" /></span> + <span style={{color: '#ff4d4f', cursor: 'pointer'}}><DeleteOutlined /></span> </Popconfirm> </div> ) : null, @@ -216,7 +218,7 @@ </div> ), filterIcon: () => ( - <Icon type="swap" style={{ color: column.datatype === 'number' ? '#1890ff' : undefined}} /> + <SwapOutlined style={{ color: column.datatype === 'number' ? '#1890ff' : ''}} /> ) }) @@ -380,13 +382,13 @@ render: (text, record) => this.state.dataSource.length >= 1 ? ( <div> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> - <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span> + <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span> <Popconfirm overlayClassName="popover-confirm" onConfirm={() => this.handleDelete(record.key) }> - <span style={{color: '#ff4d4f', cursor: 'pointer'}}><Icon type="delete" /></span> + <span style={{color: '#ff4d4f', cursor: 'pointer'}}><DeleteOutlined /></span> </Popconfirm> </div> ) : null, @@ -448,7 +450,7 @@ }) return ( <div className="common-modal-edit-table"> - <Icon className="add-row" type="plus" onClick={this.handleAdd} /> + <PlusOutlined className="add-row" onClick={this.handleAdd} /> <Table components={components} rowClassName={() => 'editable-row'} diff --git a/src/templates/zshare/transferform/index.jsx b/src/templates/zshare/transferform/index.jsx index f788ee9..d56ec33 100644 --- a/src/templates/zshare/transferform/index.jsx +++ b/src/templates/zshare/transferform/index.jsx @@ -1,6 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Transfer, Icon } from 'antd' +import { Transfer } from 'antd' +import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons' + import './index.scss' class TransferForm extends Component { @@ -87,8 +89,8 @@ if (targetKeys.includes(item.key)) { return <span title={item.description}> {item.description} - <Icon type="arrow-up" onClick={(e) => {this.changeorder(e, item, 'up')}} /> - <Icon type="arrow-down" onClick={(e) => {this.changeorder(e, item, 'down')}} /> + <ArrowUpOutlined onClick={(e) => {this.changeorder(e, item, 'up')}} /> + <ArrowDownOutlined onClick={(e) => {this.changeorder(e, item, 'down')}} /> </span> } else { return item.description diff --git a/src/templates/zshare/transferform/index.scss b/src/templates/zshare/transferform/index.scss index 8afcf12..6a544ca 100644 --- a/src/templates/zshare/transferform/index.scss +++ b/src/templates/zshare/transferform/index.scss @@ -13,7 +13,7 @@ .ant-transfer-list { width: calc(50% - 20px); height: 250px; - i { + .anticon { display: none; } } @@ -21,14 +21,12 @@ .ant-transfer-list-content-item { padding-right: 50px; position: relative; - - i { - display: inline-block; - } + .anticon { position: absolute; right: 10px; color: #ff4d4f; + display: inline-block; } .anticon-arrow-up { position: absolute; diff --git a/src/utils/asyncIconComponent.jsx b/src/utils/asyncIconComponent.jsx index 7d89b29..5fe6c82 100644 --- a/src/utils/asyncIconComponent.jsx +++ b/src/utils/asyncIconComponent.jsx @@ -1,5 +1,5 @@ import React, {Component} from 'react' -import { Icon } from 'antd' +import { LoadingOutlined } from '@ant-design/icons' /** * @description 寮傛鍔犺浇妯″潡 @@ -24,7 +24,7 @@ render() { const C = this.state.component - return C ? <C {...this.props} /> : <Icon type="loading" /> + return C ? <C {...this.props} /> : <LoadingOutlined /> } } } \ No newline at end of file diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx index 8e60745..a876db7 100644 --- a/src/views/design/header/index.jsx +++ b/src/views/design/header/index.jsx @@ -2,7 +2,8 @@ import { withRouter } from 'react-router-dom' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { Dropdown, Menu, Icon, Modal, notification, Switch, Button } from 'antd' +import { Dropdown, Menu, Modal, notification, Switch, Button } from 'antd' +import { MenuFoldOutlined, EditOutlined, AppstoreOutlined, DownOutlined, HomeOutlined, ApiOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' import { @@ -310,7 +311,7 @@ <header className={'sys-header-container ant-menu-dark ' + (['level2', 'level3', 'HS'].includes(editLevel) ? 'mask' : '')} id="main-header-container"> <div className="header-logo"><img src={MainLogo} alt=""/></div> <div className="header-collapse"> - <Icon type="menu-fold"/> + <MenuFoldOutlined/> </div> {/* 姝e父鑿滃崟 */} {editLevel !== 'level1' && menulist ? @@ -331,10 +332,10 @@ } {editLevel === 'HS' ? <Button className="level4-close" type="primary" onClick={this.exitManage}>閫�鍑�</Button> : null} {/* 杩涘叆缂栬緫鎸夐挳 */} - {!editLevel && menulist ? <Icon onClick={this.enterEdit} className="edit-check" type="edit" /> : null} + {!editLevel && menulist ? <EditOutlined onClick={this.enterEdit} className="edit-check" /> : null} {!editLevel && options.sysType === 'local' && window.GLOB.systemType !== 'production' && this.props.memberLevel >= 20 ? <div className="app-entrance entrance"> - <div className="icon"><Icon type="appstore" /></div> + <div className="icon"><AppstoreOutlined /></div> <div className="title">搴旂敤绠$悊</div> <div className="detail">鍙垱寤哄強绠$悊PC銆乸ad鍙婄Щ鍔ㄧ绛変笉鍚岃澶囩殑搴旂敤锛屽疄鐜版槑绉戜簯APP銆佸井淇″叕浼楀彿銆佸皬绋嬪簭绛夊骞冲彴鐨勫簲鐢ㄥ叡浜��</div> <Button type="primary" onClick={() => {window.open('#/appmanage')}}> @@ -344,7 +345,7 @@ } {editLevel === 'HS' && options.sysType === 'local' && window.GLOB.systemType === 'production' && this.props.memberLevel >= 20 ? <div className="app-prod-entrance entrance"> - <div className="icon"><Icon type="appstore" /></div> + <div className="icon"><AppstoreOutlined /></div> <div className="title">搴旂敤绠$悊</div> <div className="detail">鍙垱寤哄強绠$悊PC銆乸ad鍙婄Щ鍔ㄧ绛変笉鍚岃澶囩殑搴旂敤锛屽疄鐜版槑绉戜簯APP銆佸井淇″叕浼楀彿銆佸皬绋嬪簭绛夊骞冲彴鐨勫簲鐢ㄥ叡浜��</div> <Button type="primary" onClick={() => {window.open('#/appcheck')}}> @@ -354,7 +355,7 @@ } {!editLevel && options.sysType === 'local' && this.props.memberLevel >= 20 ? <div className="api-entrance entrance"> - <div className="icon"><Icon type="api" /></div> + <div className="icon"><ApiOutlined /></div> <div className="title">鎺ュ彛璋冭瘯</div> <div className="detail">鍙嚜鍔ㄥ鐞嗙櫥褰曟帴鍙g殑鍙傛暟鍔犲瘑锛屼互鍙婁笟鍔℃帴鍙g殑绛惧悕璁$畻锛屾柟渚垮紑鍙戜汉鍛樼殑鎺ュ彛娴嬭瘯宸ヤ綔銆�</div> <Button type="primary" onClick={() => {window.open('#/interface')}}> @@ -365,7 +366,7 @@ {/* window.btoa(window.encodeURIComponent(JSON.stringify({ MenuType: 'home', MenuId: 'home_page_id', MenuName: '棣栭〉' }))) */} {!editLevel && window.GLOB.systemType !== 'production' && this.props.memberLevel >= 20 ? <div className="home-entrance entrance"> - <div className="icon"><Icon type="home" /></div> + <div className="icon"><HomeOutlined /></div> <div className="title">棣栭〉</div> <div className="detail">鍩轰簬鑷畾涔夐〉闈㈢殑棣栭〉璁捐锛屽彲瀹炵幇鐏垫椿鐨勫厓绱犻厤缃強鏍峰紡璋冩暣锛屽睍鐜板綋鍓嶇郴缁熺殑椋庢牸銆�</div> <Button type="primary" onClick={() => {window.open('#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=')}}> @@ -392,7 +393,7 @@ <div style={{zIndex: 1, position: 'relative'}}> <img src={this.state.avatar || avatar} alt=""/> <span> - <span className="username">{this.state.userName}</span> <Icon type="down" /> + <span className="username">{this.state.userName}</span> <DownOutlined /> </span> </div> </Dropdown> diff --git a/src/views/design/header/index.scss b/src/views/design/header/index.scss index 03252cd..4da19da 100644 --- a/src/views/design/header/index.scss +++ b/src/views/design/header/index.scss @@ -29,7 +29,7 @@ line-height: 48px; padding-left: 10px; margin: 0 10px; - i { + .anticon { position: relative; top: 3px; font-size: 20px; diff --git a/src/views/design/header/versions/index.jsx b/src/views/design/header/versions/index.jsx index 6013932..b2883da 100644 --- a/src/views/design/header/versions/index.jsx +++ b/src/views/design/header/versions/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import { is, fromJS } from 'immutable' -import { Modal, notification, Timeline, Icon, Button, Typography } from 'antd' +import { Modal, notification, Timeline, Button, Typography } from 'antd' +import { ClockCircleOutlined, SyncOutlined, WarningOutlined, CheckCircleOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -423,14 +424,14 @@ > <Timeline> {versions && versions.map(item => { - let icon = <Icon type="clock-circle-o" style={{ fontSize: '16px' }} /> + let icon = <ClockCircleOutlined style={{ fontSize: '16px' }} /> if (item.status === 'loading') { - icon = <Icon type="sync" spin style={{ fontSize: '16px' }} /> + icon = <SyncOutlined spin style={{ fontSize: '16px' }} /> } else if (item.status === 'done') { if (item.warning) { - icon = <Icon type="warning" style={{ fontSize: '16px', color: 'orange' }}/> + icon = <WarningOutlined style={{ fontSize: '16px', color: 'orange' }}/> } else { - icon = <Icon type="check-circle" style={{ fontSize: '16px', color: '#52c41a' }} /> + icon = <CheckCircleOutlined style={{ fontSize: '16px', color: '#52c41a' }} /> } } return ( diff --git a/src/views/design/sidemenu/index.jsx b/src/views/design/sidemenu/index.jsx index 34ecc90..06454bb 100644 --- a/src/views/design/sidemenu/index.jsx +++ b/src/views/design/sidemenu/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import { connect } from 'react-redux' import { is, fromJS } from 'immutable' -import { Menu, Icon, notification } from 'antd' +import { Menu, notification } from 'antd' +import { EditOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' import { resetEditLevel, modifyMenuTree, modifyMainMenu } from '@/store/action' @@ -9,6 +10,7 @@ import options from '@/store/options.js' import Api from '@/api' import MKEmitter from '@/utils/events.js' +import MkIcon from '@/components/mk-icon' import './index.scss' const EditSecMenu = asyncComponent(() => import('@/templates/menuconfig/editsecmenu')) @@ -238,20 +240,20 @@ <aside className="mk-sys-side-menu ant-menu-dark mk-edit"> {!(this.props.editLevel === 'level2' || this.props.editLevel === 'level3') && <Menu openKeys={this.state.openKeys} onOpenChange={this.onOpenChange} mode="inline" theme="dark"> - {!this.props.editLevel && mainMenu ? <li className="sup-menu"><Icon onClick={this.enterSubEdit} className="edit-check" type="edit" /></li> : null} + {!this.props.editLevel && mainMenu ? <li className="sup-menu"><EditOutlined onClick={this.enterSubEdit} className="edit-check"/></li> : null} {this.state.subMenulist && this.state.subMenulist.map((item, index) => { return ( <SubMenu key={item.MenuID} title={ <span className={!this.props.editLevel && index === 0 ? 'edit-control' : ''}> - <Icon type={item.PageParam.Icon} /> + <MkIcon type={item.PageParam.Icon} /> <span>{item.MenuName}</span> </span> } > {!this.props.editLevel ? <li className={'ant-menu-item ' + (item.children.length > 0 ? 'sub-menu' : '')}> - <Icon onClick={(e) => {this.enterThrEdit(e, item)}} className="edit-check" type="edit" /> + <EditOutlined onClick={(e) => {this.enterThrEdit(e, item)}} className="edit-check"/> </li> : null} {item.children.map(cell => { return ( diff --git a/src/views/interface/history/index.jsx b/src/views/interface/history/index.jsx index 96ab292..42fea84 100644 --- a/src/views/interface/history/index.jsx +++ b/src/views/interface/history/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import { fromJS } from 'immutable' -import { Input, Modal, Icon } from 'antd' +import { Input, Modal } from 'antd' +import { DeleteOutlined, RightOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/views/interface/api' @@ -257,8 +258,8 @@ <div className="method">POST</div> <div className="inter">{m.interface}</div> <div className="action"> - <Icon type="delete" onClick={() => this.delete(m)} /> - <Icon type="right" onClick={() => this.use(m)} /> + <DeleteOutlined onClick={() => this.delete(m)} /> + <RightOutlined onClick={() => this.use(m)} /> </div> </div> ))} @@ -270,14 +271,14 @@ <div className="method">POST</div> <div className="inter" style={{lineHeight: '40px'}}>dologon / logon</div> <div className="action" style={{paddingLeft: '40px'}}> - <Icon type="right" onClick={this.uselogon} /> + <RightOutlined onClick={this.uselogon} /> </div> </div> <div className="line-item" key="dostars"> <div className="method">POST</div> <div className="inter" style={{lineHeight: '40px'}}>dostars</div> <div className="action" style={{paddingLeft: '40px'}}> - <Icon type="right" onClick={this.usedostars} /> + <RightOutlined onClick={this.usedostars} /> </div> </div> </div> diff --git a/src/views/interface/history/index.scss b/src/views/interface/history/index.scss index 012eebb..b74273d 100644 --- a/src/views/interface/history/index.scss +++ b/src/views/interface/history/index.scss @@ -67,10 +67,10 @@ padding-left: 15px; opacity: 0; transition: all 0.3s; - i { + .anticon { cursor: pointer; } - i:first-child { + .anticon:first-child { margin-right: 12px; } .anticon-delete { diff --git a/src/views/interface/workspace/editTable/index.jsx b/src/views/interface/workspace/editTable/index.jsx index dc5ff0f..0ba382c 100644 --- a/src/views/interface/workspace/editTable/index.jsx +++ b/src/views/interface/workspace/editTable/index.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Table, Input, Form, Icon } from 'antd' +import { Table, Input, Form } from 'antd' +import { CloseOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import './index.scss' @@ -104,7 +105,7 @@ title: '', width: '20px', render: (text, record) => { - return (<Icon type="close" onClick={() => this.delete(record)}/>) + return (<CloseOutlined onClick={() => this.delete(record)}/>) } }] } diff --git a/src/views/interface/workspace/index.jsx b/src/views/interface/workspace/index.jsx index f02ba5d..58c0b71 100644 --- a/src/views/interface/workspace/index.jsx +++ b/src/views/interface/workspace/index.jsx @@ -1,5 +1,6 @@ import React, {Component} from 'react' -import { Icon, Tabs } from 'antd' +import { Tabs } from 'antd' +import { PlusOutlined, CloseOutlined } from '@ant-design/icons' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' @@ -92,7 +93,7 @@ return ( <div className="workspace-wrap"> - <Icon className="add-view" type="plus" onClick={this.handleAdd} /> + <PlusOutlined className="add-view" onClick={this.handleAdd} /> <Tabs type="card"> {tabviews.map(view => { return ( @@ -105,7 +106,7 @@ <span className="interface"> {view.interface || 'Untitled Request'} </span> - <Icon type="close" onClick={() => this.handleTabview(view)}/> + <CloseOutlined onClick={() => this.handleTabview(view)}/> </span> } key={view.uuid} diff --git a/src/views/login/index.scss b/src/views/login/index.scss index 68ff047..608a846 100644 --- a/src/views/login/index.scss +++ b/src/views/login/index.scss @@ -73,7 +73,7 @@ overflow: hidden; padding-bottom: 10px; cursor: pointer; - i { + .anticon { transform-origin: 0 0; transform: rotate(45deg); } diff --git a/src/views/login/logincloudform.jsx b/src/views/login/logincloudform.jsx index 0e1008c..a8c70fc 100644 --- a/src/views/login/logincloudform.jsx +++ b/src/views/login/logincloudform.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Icon, Input } from 'antd' +import { Form, Input } from 'antd' +import { UserOutlined, LockOutlined } from '@ant-design/icons' import zhCN from '@/locales/zh-CN/login.js' import enUS from '@/locales/en-US/login.js' import './index.scss' @@ -61,7 +62,7 @@ initialValue: '', })( <Input - prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} + prefix={<UserOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} placeholder={this.state.dict['login.username']} autoComplete="off" onPressEnter={(e) => {this.handleSubmit(e, 'cloudpassword')}} @@ -77,7 +78,7 @@ message: this.state.dict['login.password.empty'], } ] - })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'cloudusername')}} placeholder={this.state.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)} + })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'cloudusername')}} placeholder={this.state.dict['login.password']} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} </Form.Item> </Form> ) diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx index 8e56f32..0997d1a 100644 --- a/src/views/login/loginform.jsx +++ b/src/views/login/loginform.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Icon, Input, Button, Checkbox, Select, Modal, message } from 'antd' +import { Form, Input, Button, Checkbox, Select, Modal, message } from 'antd' +import { UserOutlined, LockOutlined, QrcodeOutlined, RedoOutlined } from '@ant-design/icons' import md5 from 'md5' import moment from 'moment' @@ -368,7 +369,7 @@ return ( <Form className="login-form" id="login-form" onSubmit={this.handleSubmit}> <div className="login-way-title">{wayLabels[activeKey]}</div> - {hasScan && activeKey !== 'app_scan' ? <div className="scan-icon" onClick={() => this.onChangeTab('app_scan')}><Icon type="qrcode" /></div> : null} + {hasScan && activeKey !== 'app_scan' ? <div className="scan-icon" onClick={() => this.onChangeTab('app_scan')}><QrcodeOutlined /></div> : null} {activeKey === 'uname_pwd' ? <div className="form-item-wrap"> <Form.Item> {getFieldDecorator('username', { @@ -376,7 +377,7 @@ initialValue: this.state.username || '', })( <Input - prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} + prefix={<UserOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} placeholder={this.props.dict['login.username']} autoComplete="off" />, @@ -391,7 +392,7 @@ message: this.props.dict['login.password.empty'], } ] - })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)} + })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} </Form.Item> <Form.Item className="minline"> {getFieldDecorator('remember', { @@ -485,7 +486,7 @@ <div className="qr-wrap"> {scanId ? <QrCode card={{qrWidth: 500, color: '#000000'}} value={`mkpcscan,${window.GLOB.appkey},${scanId}`}/> : null} {timeout ? <div className="qrcode-out"> - <Icon onClick={this.reCode} type="redo" /> + <RedoOutlined onClick={this.reCode} /> 浜岀淮鐮佸凡澶辨晥銆� </div> : null} </div> diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index e2b5ff1..e900bdd 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -5,7 +5,8 @@ import { is, fromJS } from 'immutable' import moment from 'moment' import HTML5Backend from 'react-dnd-html5-backend' -import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Icon, Typography } from 'antd' +import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' +import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' @@ -1505,8 +1506,8 @@ <DndProvider backend={HTML5Backend}> <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> <div className="draw"> - {settingshow ? <Icon onClick={() => {this.setState({settingshow: false})}} type="double-left" /> : null} - {!settingshow ? <Icon onClick={() => {this.setState({settingshow: true})}} type="double-right" /> : null} + {settingshow ? <DoubleLeftOutlined onClick={() => {this.setState({settingshow: false})}} /> : null} + {!settingshow ? <DoubleRightOutlined onClick={() => {this.setState({settingshow: true})}} /> : null} </div> <div className="pc-setting-tools"> <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> @@ -1540,8 +1541,8 @@ </div> <div className={'menu-control ' + (!controlshow ? 'hidden' : '')}> <div className="draw"> - {controlshow ? <Icon onClick={() => {this.setState({controlshow: false})}} type="double-right" /> : null} - {!controlshow ? <Icon onClick={() => {this.setState({controlshow: true})}} type="double-left" /> : null} + {controlshow ? <DoubleRightOutlined onClick={() => {this.setState({controlshow: false})}}/> : null} + {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} </div> <div className="wrap"> <Button type="primary" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button> diff --git a/src/views/mobdesign/index.scss b/src/views/mobdesign/index.scss index 62efe52..5392b98 100644 --- a/src/views/mobdesign/index.scss +++ b/src/views/mobdesign/index.scss @@ -26,7 +26,7 @@ box-shadow: 0 0 1px #959595; border-radius: 0 2px 2px 0px; - i { + .anticon { padding: 12px 3px; } } @@ -164,7 +164,7 @@ box-shadow: 0 0 1px #959595; border-radius: 0 2px 2px 0px; - i { + .anticon { padding: 12px 3px; } } diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 982c2da..6f9c9a3 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -5,7 +5,8 @@ import { is, fromJS } from 'immutable' import moment from 'moment' import HTML5Backend from 'react-dnd-html5-backend' -import { ConfigProvider, notification, Modal, Collapse, Switch, Button, Icon, message, Spin, Typography } from 'antd' +import { ConfigProvider, notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' +import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' import Api from '@/api' import Utils, { setGLOBFuncs } from '@/utils/utils.js' @@ -1626,8 +1627,8 @@ {!popBtn && !visible ? <DndProvider backend={HTML5Backend}> <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> <div className="draw"> - {settingshow ? <Icon onClick={() => {sessionStorage.setItem('settingshow', 'false'); this.setState({settingshow: false})}} type="double-left" /> : null} - {!settingshow ? <Icon onClick={() => {sessionStorage.setItem('settingshow', 'true'); this.setState({settingshow: true})}} type="double-right" /> : null} + {settingshow ? <DoubleLeftOutlined onClick={() => {sessionStorage.setItem('settingshow', 'false'); this.setState({settingshow: false})}}/> : null} + {!settingshow ? <DoubleRightOutlined onClick={() => {sessionStorage.setItem('settingshow', 'true'); this.setState({settingshow: true})}}/> : null} </div> <div className="pc-setting-tools"> <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> @@ -1660,8 +1661,8 @@ </div> <div className={'menu-control ' + (!controlshow ? 'hidden' : '')}> <div className="draw"> - {controlshow ? <Icon onClick={() => {sessionStorage.setItem('controlshow', 'false'); this.setState({controlshow: false})}} type="double-right" /> : null} - {!controlshow ? <Icon onClick={() => {sessionStorage.setItem('controlshow', 'true'); this.setState({controlshow: true})}} type="double-left" /> : null} + {controlshow ? <DoubleRightOutlined onClick={() => {sessionStorage.setItem('controlshow', 'false'); this.setState({controlshow: false})}}/> : null} + {!controlshow ? <DoubleLeftOutlined onClick={() => {sessionStorage.setItem('controlshow', 'true'); this.setState({controlshow: true})}}/> : null} </div> <div className="wrap"> <Button type="primary" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button> diff --git a/src/views/pcdesign/index.scss b/src/views/pcdesign/index.scss index 16c5edc..b1e76e6 100644 --- a/src/views/pcdesign/index.scss +++ b/src/views/pcdesign/index.scss @@ -30,7 +30,7 @@ box-shadow: 0 0 1px #959595; border-radius: 0 2px 2px 0px; - i { + .anticon { padding: 12px 3px; } } @@ -145,7 +145,7 @@ box-shadow: 0 0 1px #959595; border-radius: 0 2px 2px 0px; - i { + .anticon { padding: 12px 3px; } } diff --git a/src/views/printTemplate/dragelement/source.jsx b/src/views/printTemplate/dragelement/source.jsx index 2341f41..586c200 100644 --- a/src/views/printTemplate/dragelement/source.jsx +++ b/src/views/printTemplate/dragelement/source.jsx @@ -1,6 +1,7 @@ import React from 'react' import { useDrag } from 'react-dnd' -import { Icon } from 'antd' + +import MkIcon from '@/components/mk-icon' import './index.scss' const SourceElement = ({content}) => { @@ -8,7 +9,7 @@ return ( <div ref={drag} className="print-source-item"> {content.label} - <Icon type={content.icon} /> + <MkIcon type={content.icon} /> </div> ) } diff --git a/src/views/printTemplate/index.jsx b/src/views/printTemplate/index.jsx index bb199b4..a477433 100644 --- a/src/views/printTemplate/index.jsx +++ b/src/views/printTemplate/index.jsx @@ -2,7 +2,8 @@ import { DndProvider } from 'react-dnd' import { is, fromJS } from 'immutable' import HTML5Backend from 'react-dnd-html5-backend' -import { Card, notification, Row, Button, Modal, Input, Icon, Switch } from 'antd' +import { Card, notification, Row, Button, Modal, Input, Switch } from 'antd' +import { ArrowUpOutlined, ArrowDownOutlined, CaretRightOutlined, ArrowRightOutlined, ArrowLeftOutlined } from '@ant-design/icons' import DragElement from './dragelement' import MutilForm from './mutilform' import SourceElement from './dragelement/source' @@ -904,10 +905,10 @@ })} </Card> <Card className="move-bar" title="鏁翠綋绉诲姩"> - <Input addonBefore={<Icon title="璺濅笂" type="arrow-up" />} addonAfter={<Icon onClick={() => this.updatePosition('upPlus')} type="plus" />} onChange={(e) => this.change(e, 'upPlus')} value={this.state.upPlus} /> - <Input addonBefore={<Icon title="璺濅笂" type="arrow-up" />} addonAfter={<Icon onClick={() => this.updatePosition('upMinus')} type="minus" />} onChange={(e) => this.change(e, 'upMinus')} value={this.state.upMinus} /> - <Input addonBefore={<Icon title="璺濆乏" type="arrow-left" />} addonAfter={<Icon onClick={() => this.updatePosition('leftPlus')} type="plus" />} onChange={(e) => this.change(e, 'leftPlus')} value={this.state.leftPlus} /> - <Input addonBefore={<Icon title="璺濆乏" type="arrow-left" />} addonAfter={<Icon onClick={() => this.updatePosition('leftMinus')} type="minus" />} onChange={(e) => this.change(e, 'leftMinus')} value={this.state.leftMinus} /> + <Input addonBefore={<ArrowUpOutlined/>} addonAfter={<CaretRightOutlined onClick={() => this.updatePosition('upMinus')}/>} onChange={(e) => this.change(e, 'upMinus')} value={this.state.upMinus} /> + <Input addonBefore={<ArrowDownOutlined/>} addonAfter={<CaretRightOutlined onClick={() => this.updatePosition('upPlus')}/>} onChange={(e) => this.change(e, 'upPlus')} value={this.state.upPlus} /> + <Input addonBefore={<ArrowLeftOutlined/>} addonAfter={<CaretRightOutlined onClick={() => this.updatePosition('leftMinus')}/>} onChange={(e) => this.change(e, 'leftMinus')} value={this.state.leftMinus} /> + <Input addonBefore={<ArrowRightOutlined/>} addonAfter={<CaretRightOutlined onClick={() => this.updatePosition('leftPlus')}/>} onChange={(e) => this.change(e, 'leftPlus')} value={this.state.leftPlus} /> <div style={{marginTop: '10px'}}> <span>璋冭瘯妯″紡锛�</span><Switch checked={debug} onChange={this.changeDebug} /> </div> diff --git a/src/views/printTemplate/index.scss b/src/views/printTemplate/index.scss index efb98b6..cd65a0b 100644 --- a/src/views/printTemplate/index.scss +++ b/src/views/printTemplate/index.scss @@ -55,7 +55,7 @@ input + .ant-input-group-addon { padding: 0; } - .anticon-plus, .anticon-minus { + .anticon-caret-right { cursor: pointer; line-height: 25px; padding-left: 15px; -- Gitblit v1.8.0