Skip to content

Commit

Permalink
fix(Ballcat): 修复用户菜单页国际化文本编辑按钮展示异常
Browse files Browse the repository at this point in the history
  • Loading branch information
lingting committed Oct 24, 2021
1 parent 5339e9d commit 852ef44
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/pages/system/menu/SysMenuPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Icon, { IconSelect } from '@/components/Icon';
import I18n from '@/utils/I18nUtils';
import Auth from '@/components/Auth';
import SysI18nCreate from '@/pages/i18n/SysI18nCreate';
import { DownOutlined, EditOutlined, UpOutlined } from '@ant-design/icons';
import { DownOutlined, EditTwoTone, UpOutlined } from '@ant-design/icons';

const isBtn = (data: SysMenuVo | any) => {
return data.type === 2 || data === 2;
Expand Down Expand Up @@ -80,11 +80,9 @@ export default () => {
<>
{record.icon && <Icon type={record.icon} style={{ marginRight: '5px' }} />}
{record.i18nTitle}
{isBtn(record) && (
<EditOutlined
style={{ marginLeft: '5px', color: '#1890ff' }}
onClick={() => editI18n(record.title)}
/>
{/* 菜单和目录都有对应的文本要展示 */}
{!isBtn(record) && (
<EditTwoTone style={{ marginLeft: '5px' }} onClick={() => editI18n(record.title)} />
)}
</>
);
Expand Down

0 comments on commit 852ef44

Please sign in to comment.