From 67fac9673ff5c34c5ad4e1a0bdd3ea00627a2264 Mon Sep 17 00:00:00 2001 From: zhoux Date: Tue, 28 Nov 2023 14:25:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E9=80=89=E6=8B=A9=E4=BA=A4=E4=BA=92=E6=95=B4?= =?UTF-8?q?=E4=BD=93=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/defaultIcon.ts | 32 ++ src/components/IconSelector/Category.tsx | 2 +- src/components/IconSelector/CopyableIcon.tsx | 5 + src/components/IconSelector/index.tsx | 31 +- src/components/RightContent/index.tsx | 12 +- src/global.css | 45 ++ src/global.less | 50 ++ .../System/MenuList/component/CreateForm.tsx | 60 +-- .../System/MenuList/component/UpdateForm.tsx | 489 +++++++++++------- src/utils/IconUtil.ts | 6 +- 10 files changed, 488 insertions(+), 244 deletions(-) create mode 100644 config/defaultIcon.ts diff --git a/config/defaultIcon.ts b/config/defaultIcon.ts new file mode 100644 index 0000000..42ee906 --- /dev/null +++ b/config/defaultIcon.ts @@ -0,0 +1,32 @@ +/* + * @Author: zhoux zhouxia@supervision.ltd + * @Date: 2023-11-28 14:13:05 + * @LastEditors: zhoux zhouxia@supervision.ltd + * @LastEditTime: 2023-11-28 14:16:48 + * @FilePath: \general-ai-platform-web\config\defaultIcon.ts + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A + */ + +import { proFormItemStyleProps } from './defaultForm'; + +// 分步表单统一配置 +export const proIconSelectWrapStyle: React.CSSProperties = { + position: 'relative', + width: proFormItemStyleProps.width + 48, + background: 'red', + left: 0, +}; + +export const proIconSelectStyle: React.CSSProperties = { + position: 'absolute', + left: '0', + padding: 16, + top: '5%', + width: '94%', + height: 500, + zIndex: 9, + boxShadow: '0px 4px 12px 0px rgba(0, 0, 0, 0.30)', + background: '#fff', + borderRadius: 4, + overflowY: 'scroll', +}; diff --git a/src/components/IconSelector/Category.tsx b/src/components/IconSelector/Category.tsx index dd0e93f..1a862c3 100644 --- a/src/components/IconSelector/Category.tsx +++ b/src/components/IconSelector/Category.tsx @@ -40,7 +40,7 @@ const Category: React.FC = props => { return (
-

{intl.formatMessage({ +

{intl.formatMessage({ id: `app.docs.components.icon.category.${title}`, defaultMessage: '信息', })}

diff --git a/src/components/IconSelector/CopyableIcon.tsx b/src/components/IconSelector/CopyableIcon.tsx index 371cba0..214b5c7 100644 --- a/src/components/IconSelector/CopyableIcon.tsx +++ b/src/components/IconSelector/CopyableIcon.tsx @@ -24,11 +24,16 @@ const CopyableIcon: React.FC = ({ theme, }) => { const className = classNames({ + gn: true, + themeBgHover: true, copied: justCopied === name, [theme]: !!theme, }); return (
  • { if (onSelect) { onSelect(theme, name); diff --git a/src/components/IconSelector/index.tsx b/src/components/IconSelector/index.tsx index 16d3f59..01f9a5d 100644 --- a/src/components/IconSelector/index.tsx +++ b/src/components/IconSelector/index.tsx @@ -92,7 +92,20 @@ const IconSelector: React.FC = (props) => { }, [displayState.searchKey, displayState.theme]); return ( <> -
    +
    + {/* + * //TODO 二级:输入框上方提示文案悬浮会覆盖清空菜单图标项按钮 + */} + handleSearchIcon(e.currentTarget.value)} + size="large" + autoFocus + suffix={} + /> + {/* */} = (props) => { buttonStyle="solid" options={[ { - label: , + label: <>线性 , value: ThemeType.Outlined }, { - label: , + label: <>填充 , value: ThemeType.Filled }, { - label: , + label: <>彩色, value: ThemeType.TwoTone }, ]} @@ -124,15 +137,7 @@ const IconSelector: React.FC = (props) => { {messages['app.docs.components.icon.two-tone']} */} - handleSearchIcon(e.currentTarget.value)} - size="large" - autoFocus - suffix={} - /> +
    {renderCategories} diff --git a/src/components/RightContent/index.tsx b/src/components/RightContent/index.tsx index 1dbdf7e..4418bb9 100644 --- a/src/components/RightContent/index.tsx +++ b/src/components/RightContent/index.tsx @@ -1,3 +1,11 @@ +/* + * @Author: zhoux zhouxia@supervision.ltd + * @Date: 2023-11-01 13:56:33 + * @LastEditors: zhoux zhouxia@supervision.ltd + * @LastEditTime: 2023-11-28 11:34:00 + * @FilePath: \general-ai-platform-web\src\components\RightContent\index.tsx + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ import { QuestionCircleOutlined } from '@ant-design/icons'; import { SelectLang as UmiSelectLang } from '@umijs/max'; import React from 'react'; @@ -38,7 +46,7 @@ export const SelectRole = () => { const { currentUser } = initialState || {}; return ( - <> + { currentUser && (