| @@ -1,6 +1,7 @@ | |||||
| import KFModal from '@/components/KFModal'; | |||||
| import * as AntdIcons from '@ant-design/icons'; | import * as AntdIcons from '@ant-design/icons'; | ||||
| import { useIntl } from '@umijs/max'; | import { useIntl } from '@umijs/max'; | ||||
| import { Modal, Popover, Progress, Result, Spin, Tooltip, Upload } from 'antd'; | |||||
| import { Popover, Progress, Result, Spin, Tooltip, Upload } from 'antd'; | |||||
| import React, { useCallback, useEffect, useState } from 'react'; | import React, { useCallback, useEffect, useState } from 'react'; | ||||
| import './style.less'; | import './style.less'; | ||||
| @@ -134,7 +135,7 @@ const PicSearcher: React.FC = () => { | |||||
| > | > | ||||
| <AntdIcons.CameraOutlined className="icon-pic-btn" onClick={toggleModal} /> | <AntdIcons.CameraOutlined className="icon-pic-btn" onClick={toggleModal} /> | ||||
| </Popover> | </Popover> | ||||
| <Modal | |||||
| <KFModal | |||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'app.docs.components.icon.pic-searcher.title', | id: 'app.docs.components.icon.pic-searcher.title', | ||||
| defaultMessage: '信息', | defaultMessage: '信息', | ||||
| @@ -228,7 +229,7 @@ const PicSearcher: React.FC = () => { | |||||
| )} | )} | ||||
| </div> | </div> | ||||
| </Spin> | </Spin> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| </div> | </div> | ||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,29 +1,29 @@ | |||||
| .kf-modal { | .kf-modal { | ||||
| .ant-modal-content { | .ant-modal-content { | ||||
| padding: 20px 67px; | |||||
| padding: 40px 67px; | |||||
| background-image: url(/assets/images/modal-back.png); | background-image: url(/assets/images/modal-back.png); | ||||
| background-repeat: no-repeat; | background-repeat: no-repeat; | ||||
| background-position: top center; | background-position: top center; | ||||
| background-size: 100%; | background-size: 100%; | ||||
| border-radius: 21px; | |||||
| border-radius: 20px; | |||||
| } | } | ||||
| .ant-modal-header { | .ant-modal-header { | ||||
| margin: 20px 0 30px; | |||||
| margin-bottom: 30px; | |||||
| background-color: transparent; | background-color: transparent; | ||||
| } | } | ||||
| .ant-modal-footer { | .ant-modal-footer { | ||||
| display: flex; | display: flex; | ||||
| justify-content: center; | justify-content: center; | ||||
| margin: 40px 0 20px 0; | |||||
| margin-top: 40px; | |||||
| .ant-btn { | .ant-btn { | ||||
| height: 40px; | height: 40px; | ||||
| padding: 0 30px; | padding: 0 30px; | ||||
| font-size: 16px; | |||||
| font-size: @font-size-content; | |||||
| border-radius: 10px; | border-radius: 10px; | ||||
| } | } | ||||
| .ant-btn-default { | .ant-btn-default { | ||||
| color: #1d1d20; | |||||
| color: @text-color; | |||||
| background: rgba(22, 100, 255, 0.06); | background: rgba(22, 100, 255, 0.06); | ||||
| border-color: transparent; | border-color: transparent; | ||||
| } | } | ||||
| @@ -31,10 +31,4 @@ | |||||
| margin-left: 20px; | margin-left: 20px; | ||||
| } | } | ||||
| } | } | ||||
| .ant-modal-close { | |||||
| top: 27px; | |||||
| right: 27px; | |||||
| width: 26px; | |||||
| height: 26px; | |||||
| } | |||||
| } | } | ||||
| @@ -10,7 +10,7 @@ import classNames from 'classnames'; | |||||
| import './index.less'; | import './index.less'; | ||||
| export interface KFModalProps extends ModalProps { | export interface KFModalProps extends ModalProps { | ||||
| image: string; | |||||
| image?: string; | |||||
| } | } | ||||
| function KFModal({ title, image, children, className = '', ...rest }: KFModalProps) { | function KFModal({ title, image, children, className = '', ...rest }: KFModalProps) { | ||||
| return ( | return ( | ||||
| @@ -18,7 +18,7 @@ type ModalTitleProps = { | |||||
| function ModalTitle({ title, image, style, className }: ModalTitleProps) { | function ModalTitle({ title, image, style, className }: ModalTitleProps) { | ||||
| return ( | return ( | ||||
| <div className={classNames(styles['modal-title'], className)} style={style}> | <div className={classNames(styles['modal-title'], className)} style={style}> | ||||
| <img className={styles['modal-title__image']} src={image} alt="" /> | |||||
| {image && <img className={styles['modal-title__image']} src={image} alt="" />} | |||||
| {title} | {title} | ||||
| </div> | </div> | ||||
| ); | ); | ||||
| @@ -82,90 +82,6 @@ body { | |||||
| height: 100vh; | height: 100vh; | ||||
| overflow-y: hidden; | overflow-y: hidden; | ||||
| } | } | ||||
| .ant-modal-confirm .ant-modal-confirm-paragraph { | |||||
| margin: 54px 0 auto; | |||||
| text-align: center; | |||||
| } | |||||
| .ant-modal-confirm-confirm .ant-modal-confirm-body > .anticon { | |||||
| display: none; | |||||
| } | |||||
| .ant-modal-confirm .ant-modal-confirm-btns { | |||||
| margin-top: 30px; | |||||
| text-align: center; | |||||
| } | |||||
| .ant-modal-confirm-btns .ant-btn-default { | |||||
| width: 110px; | |||||
| height: 40px; | |||||
| margin-right: 10px; | |||||
| // color: @text-color; | |||||
| font-size: 18px; | |||||
| background: rgba(22, 100, 255, 0.06); | |||||
| border-color: transparent; | |||||
| border-radius: 10px; | |||||
| } | |||||
| .ant-modal-confirm-btns .ant-btn-default:hover { | |||||
| background: rgba(22, 100, 255, 0.06); | |||||
| border-color: transparent; | |||||
| } | |||||
| .ant-modal-confirm-btns .ant-btn-primary { | |||||
| width: 110px; | |||||
| height: 40px; | |||||
| font-size: 18px; | |||||
| border-radius: 10px; | |||||
| border-radius: 10px; | |||||
| } | |||||
| .ant-modal .ant-input-affix-wrapper { | |||||
| height: 46px; | |||||
| padding: 1px 11px; | |||||
| } | |||||
| .ant-input-textarea-affix-wrapper.ant-input-affix-wrapper { | |||||
| padding: 0; | |||||
| } | |||||
| .ant-modal .ant-select-single { | |||||
| height: 46px; | |||||
| } | |||||
| .ant-modal .ant-select-single .ant-select-selector .ant-select-selection-placeholder { | |||||
| line-height: 46px; | |||||
| } | |||||
| .ant-modal .ant-modal-close-x { | |||||
| width: 26px; | |||||
| height: 26px; | |||||
| color: @text-color-secondary; | |||||
| border: 2px solid @text-color-secondary; | |||||
| border-radius: 50%; | |||||
| &:hover { | |||||
| color: #272536; | |||||
| border: 2px solid #272536; | |||||
| } | |||||
| } | |||||
| .ant-modal .ant-modal-close:hover { | |||||
| background-color: transparent; | |||||
| } | |||||
| .ant-modal .ant-modal-close:active { | |||||
| background-color: transparent; | |||||
| } | |||||
| .ant-modal-content { | |||||
| margin-top: 50px; | |||||
| margin-left: -130px; | |||||
| } | |||||
| .ant-modal .ant-modal-content { | |||||
| padding: 0; | |||||
| } | |||||
| .ant-modal-confirm-body-wrapper { | |||||
| height: 303px; | |||||
| background-image: url(/assets/images/modal-back.png); | |||||
| background-repeat: no-repeat; | |||||
| background-position: top center; | |||||
| background-size: 100%; | |||||
| border-radius: 0; | |||||
| } | |||||
| .ant-modal .ant-modal-content { | |||||
| border-radius: 20px; | |||||
| } | |||||
| .ant-modal .ant-modal-footer > .ant-btn + .ant-btn { | |||||
| margin-left: 20px; | |||||
| } | |||||
| .ant-pagination .ant-pagination-item.ant-pagination-item-active { | .ant-pagination .ant-pagination-item.ant-pagination-item-active { | ||||
| background: @primary-color; | background: @primary-color; | ||||
| border-width: 0; | border-width: 0; | ||||
| @@ -56,3 +56,84 @@ | |||||
| .ant-pro-page-container { | .ant-pro-page-container { | ||||
| overflow-y: auto; | overflow-y: auto; | ||||
| } | } | ||||
| // Input | |||||
| .ant-input-textarea-affix-wrapper.ant-input-affix-wrapper { | |||||
| padding: 0; | |||||
| } | |||||
| // Modal | |||||
| .ant-modal { | |||||
| .ant-modal-close { | |||||
| top: 27px; | |||||
| right: 27px; | |||||
| width: 26px; | |||||
| height: 26px; | |||||
| color: @text-color-secondary; | |||||
| border: 2px solid @text-color-secondary; | |||||
| border-radius: 50%; | |||||
| &:hover, | |||||
| &:active { | |||||
| color: #272536; | |||||
| background-color: transparent; | |||||
| border: 2px solid #272536; | |||||
| } | |||||
| } | |||||
| .ant-input-affix-wrapper { | |||||
| height: 46px; | |||||
| padding: 1px 11px; | |||||
| } | |||||
| .ant-select-single { | |||||
| height: 46px; | |||||
| } | |||||
| .ant-select-single .ant-select-selector .ant-select-selection-placeholder { | |||||
| line-height: 46px; | |||||
| } | |||||
| } | |||||
| // Confirm Modal | |||||
| .ant-modal-confirm { | |||||
| .ant-modal-content { | |||||
| padding: 40px 67px; | |||||
| background-image: url(/assets/images/modal-back.png); | |||||
| background-repeat: no-repeat; | |||||
| background-position: top center; | |||||
| background-size: 100%; | |||||
| border-radius: 20px; | |||||
| } | |||||
| .ant-modal-confirm-body { | |||||
| .anticon { | |||||
| display: none; | |||||
| } | |||||
| } | |||||
| .ant-modal-confirm-paragraph { | |||||
| max-width: 100%; | |||||
| margin-top: 27px; | |||||
| text-align: center; | |||||
| } | |||||
| .ant-modal-confirm-btns { | |||||
| margin-top: 40px; | |||||
| text-align: center; | |||||
| .ant-btn { | |||||
| height: 40px; | |||||
| padding: 0 30px; | |||||
| font-size: @font-size-content; | |||||
| border-radius: 10px; | |||||
| } | |||||
| .ant-btn-default { | |||||
| color: @text-color; | |||||
| background: rgba(22, 100, 255, 0.06); | |||||
| border-color: transparent; | |||||
| } | |||||
| .ant-btn + .ant-btn { | |||||
| margin-left: 20px; | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -1,9 +1,9 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { getValueEnumLabel } from '@/utils/options'; | import { getValueEnumLabel } from '@/utils/options'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Button, Descriptions, Modal } from 'antd'; | |||||
| import { Button, Descriptions } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| /* * | /* * | ||||
| * | * | ||||
| * @author whiteshader@163.com | * @author whiteshader@163.com | ||||
| @@ -39,7 +39,7 @@ const OperlogForm: React.FC<OperlogFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={800} | width={800} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'monitor.job.detail', | id: 'monitor.job.detail', | ||||
| @@ -124,7 +124,7 @@ const OperlogForm: React.FC<OperlogFormProps> = (props) => { | |||||
| {values.invokeTarget} | {values.invokeTarget} | ||||
| </Descriptions.Item> | </Descriptions.Item> | ||||
| </Descriptions> | </Descriptions> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -11,7 +11,7 @@ import { | |||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | import { Form, Modal } from 'antd'; | ||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| /** | /** | ||||
| * 定时任务调度 Edit Form | * 定时任务调度 Edit Form | ||||
| * | * | ||||
| @@ -66,7 +66,7 @@ const JobForm: React.FC<JobFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'monitor.job.title', | id: 'monitor.job.title', | ||||
| @@ -238,7 +238,7 @@ const JobForm: React.FC<JobFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,16 +1,10 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { getValueEnumLabel } from '@/utils/options'; | import { getValueEnumLabel } from '@/utils/options'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Descriptions, Modal } from 'antd'; | |||||
| import { Descriptions } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| /* * | |||||
| * | |||||
| * @author whiteshader@163.com | |||||
| * @datetime 2021/09/16 | |||||
| * | |||||
| * */ | |||||
| export type JobLogFormValueType = Record<string, unknown> & Partial<API.Monitor.JobLog>; | export type JobLogFormValueType = Record<string, unknown> & Partial<API.Monitor.JobLog>; | ||||
| export type JobLogFormProps = { | export type JobLogFormProps = { | ||||
| @@ -33,7 +27,7 @@ const JobLogDetailForm: React.FC<JobLogFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'monitor.job.log.title', | id: 'monitor.job.log.title', | ||||
| @@ -95,7 +89,7 @@ const JobLogDetailForm: React.FC<JobLogFormProps> = (props) => { | |||||
| {getValueEnumLabel(statusOptions, values.status, '未知')} | {getValueEnumLabel(statusOptions, values.status, '未知')} | ||||
| </Descriptions.Item> | </Descriptions.Item> | ||||
| </Descriptions> | </Descriptions> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormDigit, | ProFormDigit, | ||||
| @@ -7,9 +8,8 @@ import { | |||||
| ProFormTextArea, | ProFormTextArea, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| export type ConfigFormData = Record<string, unknown> & Partial<API.System.Config>; | export type ConfigFormData = Record<string, unknown> & Partial<API.System.Config>; | ||||
| export type ConfigFormProps = { | export type ConfigFormProps = { | ||||
| @@ -53,7 +53,7 @@ const ConfigForm: React.FC<ConfigFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.config.title', | id: 'system.config.title', | ||||
| @@ -166,7 +166,7 @@ const ConfigForm: React.FC<ConfigFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormDigit, | ProFormDigit, | ||||
| @@ -7,10 +8,9 @@ import { | |||||
| ProFormTreeSelect, | ProFormTreeSelect, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import { DataNode } from 'antd/es/tree'; | import { DataNode } from 'antd/es/tree'; | ||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| export type DeptFormData = Record<string, unknown> & Partial<API.System.Dept>; | export type DeptFormData = Record<string, unknown> & Partial<API.System.Dept>; | ||||
| export type DeptFormProps = { | export type DeptFormProps = { | ||||
| @@ -59,7 +59,7 @@ const DeptForm: React.FC<DeptFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.dept.title', | id: 'system.dept.title', | ||||
| @@ -204,7 +204,7 @@ const DeptForm: React.FC<DeptFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormDigit, | ProFormDigit, | ||||
| @@ -7,9 +8,8 @@ import { | |||||
| ProFormTextArea, | ProFormTextArea, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| export type DictTypeFormData = Record<string, unknown> & Partial<API.System.DictType>; | export type DictTypeFormData = Record<string, unknown> & Partial<API.System.DictType>; | ||||
| export type DictTypeFormProps = { | export type DictTypeFormProps = { | ||||
| @@ -52,7 +52,7 @@ const DictTypeForm: React.FC<DictTypeFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.dict.title', | id: 'system.dict.title', | ||||
| @@ -146,7 +146,7 @@ const DictTypeForm: React.FC<DictTypeFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormDigit, | ProFormDigit, | ||||
| @@ -8,9 +9,8 @@ import { | |||||
| ProFormTextArea, | ProFormTextArea, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| export type DataFormData = Record<string, unknown> & Partial<API.System.DictData>; | export type DataFormData = Record<string, unknown> & Partial<API.System.DictData>; | ||||
| export type DataFormProps = { | export type DataFormProps = { | ||||
| @@ -58,7 +58,7 @@ const DictDataForm: React.FC<DataFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.dict.data.title', | id: 'system.dict.data.title', | ||||
| @@ -246,7 +246,7 @@ const DictDataForm: React.FC<DataFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormDigit, | ProFormDigit, | ||||
| @@ -7,9 +8,8 @@ import { | |||||
| ProFormTimePicker, | ProFormTimePicker, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| export type LogininforFormData = Record<string, unknown> & Partial<API.Monitor.Logininfor>; | export type LogininforFormData = Record<string, unknown> & Partial<API.Monitor.Logininfor>; | ||||
| export type LogininforFormProps = { | export type LogininforFormProps = { | ||||
| @@ -53,7 +53,7 @@ const LogininforForm: React.FC<LogininforFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.logininfor.title', | id: 'system.logininfor.title', | ||||
| @@ -209,7 +209,7 @@ const LogininforForm: React.FC<LogininforFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,5 +1,6 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import IconSelector from '@/components/IconSelector'; | import IconSelector from '@/components/IconSelector'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { createIcon } from '@/utils/IconUtil'; | import { createIcon } from '@/utils/IconUtil'; | ||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| @@ -10,7 +11,7 @@ import { | |||||
| ProFormTreeSelect, | ProFormTreeSelect, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import { DataNode } from 'antd/es/tree'; | import { DataNode } from 'antd/es/tree'; | ||||
| import React, { useEffect, useState } from 'react'; | import React, { useEffect, useState } from 'react'; | ||||
| @@ -73,7 +74,7 @@ const MenuForm: React.FC<MenuFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.menu.title', | id: 'system.menu.title', | ||||
| @@ -367,7 +368,7 @@ const MenuForm: React.FC<MenuFormProps> = (props) => { | |||||
| }} | }} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| <Modal | |||||
| <KFModal | |||||
| width={800} | width={800} | ||||
| open={iconSelectorOpen} | open={iconSelectorOpen} | ||||
| onCancel={() => { | onCancel={() => { | ||||
| @@ -382,8 +383,8 @@ const MenuForm: React.FC<MenuFormProps> = (props) => { | |||||
| setIconSelectorOpen(false); | setIconSelectorOpen(false); | ||||
| }} | }} | ||||
| /> | /> | ||||
| </Modal> | |||||
| </Modal> | |||||
| </KFModal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormDigit, | ProFormDigit, | ||||
| @@ -8,9 +9,8 @@ import { | |||||
| ProFormTextArea, | ProFormTextArea, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| export type NoticeFormData = Record<string, unknown> & Partial<API.System.Notice>; | export type NoticeFormData = Record<string, unknown> & Partial<API.System.Notice>; | ||||
| export type NoticeFormProps = { | export type NoticeFormProps = { | ||||
| @@ -55,7 +55,7 @@ const NoticeForm: React.FC<NoticeFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.notice.title', | id: 'system.notice.title', | ||||
| @@ -168,7 +168,7 @@ const NoticeForm: React.FC<NoticeFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,9 +1,9 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { getValueEnumLabel } from '@/utils/options'; | import { getValueEnumLabel } from '@/utils/options'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Descriptions, Modal } from 'antd'; | |||||
| import { Descriptions } from 'antd'; | |||||
| import React from 'react'; | import React from 'react'; | ||||
| export type OperlogFormData = Record<string, unknown> & Partial<API.Monitor.Operlog>; | export type OperlogFormData = Record<string, unknown> & Partial<API.Monitor.Operlog>; | ||||
| export type OperlogFormProps = { | export type OperlogFormProps = { | ||||
| @@ -28,7 +28,7 @@ const OperlogDetailForm: React.FC<OperlogFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'monitor.operlog.title', | id: 'monitor.operlog.title', | ||||
| @@ -107,7 +107,7 @@ const OperlogDetailForm: React.FC<OperlogFormProps> = (props) => { | |||||
| {values.operTime?.toString()} | {values.operTime?.toString()} | ||||
| </Descriptions.Item> | </Descriptions.Item> | ||||
| </Descriptions> | </Descriptions> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormDigit, | ProFormDigit, | ||||
| @@ -7,9 +8,8 @@ import { | |||||
| ProFormTextArea, | ProFormTextArea, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| export type PostFormData = Record<string, unknown> & Partial<API.System.Post>; | export type PostFormData = Record<string, unknown> & Partial<API.System.Post>; | ||||
| export type PostFormProps = { | export type PostFormProps = { | ||||
| @@ -53,7 +53,7 @@ const PostForm: React.FC<PostFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.post.title', | id: 'system.post.title', | ||||
| @@ -160,7 +160,7 @@ const PostForm: React.FC<PostFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,10 +1,10 @@ | |||||
| import KFModal from '@/components/KFModal'; | |||||
| import { Key, ProForm, ProFormDigit, ProFormSelect, ProFormText } from '@ant-design/pro-components'; | import { Key, ProForm, ProFormDigit, ProFormSelect, ProFormText } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Checkbox, Col, Form, Modal, Row, Tree } from 'antd'; | |||||
| import { Checkbox, Col, Form, Row, Tree } from 'antd'; | |||||
| import { CheckboxValueType } from 'antd/es/checkbox/Group'; | import { CheckboxValueType } from 'antd/es/checkbox/Group'; | ||||
| import { DataNode } from 'antd/es/tree'; | import { DataNode } from 'antd/es/tree'; | ||||
| import React, { useEffect, useState } from 'react'; | import React, { useEffect, useState } from 'react'; | ||||
| /* * | /* * | ||||
| * | * | ||||
| * @author whiteshader@163.com | * @author whiteshader@163.com | ||||
| @@ -90,7 +90,7 @@ const DataScopeForm: React.FC<DataScopeFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.user.auth.role', | id: 'system.user.auth.role', | ||||
| @@ -234,7 +234,7 @@ const DataScopeForm: React.FC<DataScopeFormProps> = (props) => { | |||||
| </Row> | </Row> | ||||
| </ProForm.Item> | </ProForm.Item> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import DictTag from '@/components/DictTag'; | import DictTag from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { getDictValueEnum } from '@/services/system/dict'; | import { getDictValueEnum } from '@/services/system/dict'; | ||||
| import { | import { | ||||
| ActionType, | ActionType, | ||||
| @@ -8,9 +9,7 @@ import { | |||||
| RequestData, | RequestData, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Modal } from 'antd'; | |||||
| import React, { useEffect, useRef, useState } from 'react'; | import React, { useEffect, useRef, useState } from 'react'; | ||||
| /* * | /* * | ||||
| * | * | ||||
| * @author whiteshader@163.com | * @author whiteshader@163.com | ||||
| @@ -90,7 +89,7 @@ const UserSelectorModal: React.FC<DataScopeFormProps> = (props) => { | |||||
| ]; | ]; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={800} | width={800} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.role.auth.user', | id: 'system.role.auth.user', | ||||
| @@ -122,7 +121,7 @@ const UserSelectorModal: React.FC<DataScopeFormProps> = (props) => { | |||||
| }, | }, | ||||
| }} | }} | ||||
| /> | /> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormDigit, | ProFormDigit, | ||||
| @@ -7,10 +8,9 @@ import { | |||||
| ProFormTextArea, | ProFormTextArea, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import Tree, { DataNode } from 'antd/es/tree'; | import Tree, { DataNode } from 'antd/es/tree'; | ||||
| import React, { useEffect, useState } from 'react'; | import React, { useEffect, useState } from 'react'; | ||||
| export type RoleFormData = Record<string, unknown> & Partial<API.System.Role>; | export type RoleFormData = Record<string, unknown> & Partial<API.System.Role>; | ||||
| export type RoleFormProps = { | export type RoleFormProps = { | ||||
| @@ -61,7 +61,7 @@ const RoleForm: React.FC<RoleFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.role.title', | id: 'system.role.title', | ||||
| @@ -198,7 +198,7 @@ const RoleForm: React.FC<RoleFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,15 +1,8 @@ | |||||
| import KFModal from '@/components/KFModal'; | |||||
| import { ProForm, ProFormSelect } from '@ant-design/pro-components'; | import { ProForm, ProFormSelect } from '@ant-design/pro-components'; | ||||
| import { useIntl } from '@umijs/max'; | import { useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| /* * | |||||
| * | |||||
| * @author whiteshader@163.com | |||||
| * @datetime 2023/02/06 | |||||
| * | |||||
| * */ | |||||
| export type FormValueType = any & Partial<API.System.Dept>; | export type FormValueType = any & Partial<API.System.Dept>; | ||||
| export type AuthRoleFormProps = { | export type AuthRoleFormProps = { | ||||
| @@ -40,7 +33,7 @@ const AuthRoleForm: React.FC<AuthRoleFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.user.auth.role', | id: 'system.user.auth.role', | ||||
| @@ -74,7 +67,7 @@ const AuthRoleForm: React.FC<AuthRoleFormProps> = (props) => { | |||||
| rules={[{ required: true, message: '请选择角色!' }]} | rules={[{ required: true, message: '请选择角色!' }]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,15 +1,9 @@ | |||||
| import KFModal from '@/components/KFModal'; | |||||
| import { ProForm, ProFormText } from '@ant-design/pro-components'; | import { ProForm, ProFormText } from '@ant-design/pro-components'; | ||||
| import { useIntl } from '@umijs/max'; | import { useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import React from 'react'; | import React from 'react'; | ||||
| /* * | |||||
| * | |||||
| * @author whiteshader@163.com | |||||
| * @datetime 2023/02/06 | |||||
| * | |||||
| * */ | |||||
| export type FormValueType = any & Partial<API.System.User>; | export type FormValueType = any & Partial<API.System.User>; | ||||
| export type UpdateFormProps = { | export type UpdateFormProps = { | ||||
| @@ -44,7 +38,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.user.reset.password', | id: 'system.user.reset.password', | ||||
| @@ -88,7 +82,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { DictValueEnumObj } from '@/components/DictTag'; | import { DictValueEnumObj } from '@/components/DictTag'; | ||||
| import KFModal from '@/components/KFModal'; | |||||
| import { | import { | ||||
| ProForm, | ProForm, | ||||
| ProFormRadio, | ProFormRadio, | ||||
| @@ -8,17 +9,10 @@ import { | |||||
| ProFormTreeSelect, | ProFormTreeSelect, | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { FormattedMessage, useIntl } from '@umijs/max'; | import { FormattedMessage, useIntl } from '@umijs/max'; | ||||
| import { Form, Modal } from 'antd'; | |||||
| import { Form } from 'antd'; | |||||
| import { DataNode } from 'antd/es/tree'; | import { DataNode } from 'antd/es/tree'; | ||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| /* * | |||||
| * | |||||
| * @author whiteshader@163.com | |||||
| * @datetime 2023/02/06 | |||||
| * | |||||
| * */ | |||||
| export type UserFormData = Record<string, unknown> & Partial<API.System.User>; | export type UserFormData = Record<string, unknown> & Partial<API.System.User>; | ||||
| export type UserFormProps = { | export type UserFormProps = { | ||||
| @@ -74,7 +68,7 @@ const UserForm: React.FC<UserFormProps> = (props) => { | |||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={640} | width={640} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.user.title', | id: 'system.user.title', | ||||
| @@ -260,7 +254,7 @@ const UserForm: React.FC<UserFormProps> = (props) => { | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| </ProForm> | </ProForm> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,10 +1,10 @@ | |||||
| import KFModal from '@/components/KFModal'; | |||||
| import { useIntl } from '@umijs/max'; | import { useIntl } from '@umijs/max'; | ||||
| import type { TabsProps } from 'antd'; | import type { TabsProps } from 'antd'; | ||||
| import { Modal, Tabs } from 'antd'; | |||||
| import { Tabs } from 'antd'; | |||||
| import 'highlight.js/styles/base16/material.css'; | import 'highlight.js/styles/base16/material.css'; | ||||
| import React, { useEffect } from 'react'; | import React, { useEffect } from 'react'; | ||||
| import Highlight from 'react-highlight'; | import Highlight from 'react-highlight'; | ||||
| interface PreviewTableProps { | interface PreviewTableProps { | ||||
| open: boolean; | open: boolean; | ||||
| data?: any; | data?: any; | ||||
| @@ -26,7 +26,7 @@ const PreviewTableCode: React.FC<PreviewTableProps> = (props) => { | |||||
| useEffect(() => {}, []); | useEffect(() => {}, []); | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={900} | width={900} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'gen.preview', | id: 'gen.preview', | ||||
| @@ -43,7 +43,7 @@ const PreviewTableCode: React.FC<PreviewTableProps> = (props) => { | |||||
| }} | }} | ||||
| > | > | ||||
| <Tabs defaultActiveKey="1" items={panes}></Tabs> | <Tabs defaultActiveKey="1" items={panes}></Tabs> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -1,3 +1,4 @@ | |||||
| import KFModal from '@/components/KFModal'; | |||||
| import { uploadAvatar } from '@/services/system/user'; | import { uploadAvatar } from '@/services/system/user'; | ||||
| import { | import { | ||||
| MinusOutlined, | MinusOutlined, | ||||
| @@ -7,7 +8,7 @@ import { | |||||
| UploadOutlined, | UploadOutlined, | ||||
| } from '@ant-design/icons'; | } from '@ant-design/icons'; | ||||
| import { useIntl } from '@umijs/max'; | import { useIntl } from '@umijs/max'; | ||||
| import { Button, Col, Modal, Row, Space, Upload, message } from 'antd'; | |||||
| import { Button, Col, Row, Space, Upload, message } from 'antd'; | |||||
| import React, { useEffect, useRef, useState } from 'react'; | import React, { useEffect, useRef, useState } from 'react'; | ||||
| import { Cropper } from 'react-cropper'; | import { Cropper } from 'react-cropper'; | ||||
| import './cropper.css'; | import './cropper.css'; | ||||
| @@ -88,7 +89,7 @@ const AvatarCropperForm: React.FC<AvatarCropperProps> = (props) => { | |||||
| }; | }; | ||||
| }; | }; | ||||
| return ( | return ( | ||||
| <Modal | |||||
| <KFModal | |||||
| width={800} | width={800} | ||||
| title={intl.formatMessage({ | title={intl.formatMessage({ | ||||
| id: 'system.user.modify_avatar', | id: 'system.user.modify_avatar', | ||||
| @@ -137,7 +138,7 @@ const AvatarCropperForm: React.FC<AvatarCropperProps> = (props) => { | |||||
| </Space> | </Space> | ||||
| </Col> | </Col> | ||||
| </Row> | </Row> | ||||
| </Modal> | |||||
| </KFModal> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -12,6 +12,8 @@ import { Modal, type ModalFuncProps, type UploadFile } from 'antd'; | |||||
| export function modalConfirm({ title, content, onOk, ...rest }: ModalFuncProps) { | export function modalConfirm({ title, content, onOk, ...rest }: ModalFuncProps) { | ||||
| Modal.confirm({ | Modal.confirm({ | ||||
| ...rest, | ...rest, | ||||
| width: 600, | |||||
| centered: true, | |||||
| title: ( | title: ( | ||||
| <div> | <div> | ||||
| <img | <img | ||||