diff --git a/src/common/components/MyTag.tsx b/src/common/components/MyTag.tsx index 70427c3..deb2a79 100644 --- a/src/common/components/MyTag.tsx +++ b/src/common/components/MyTag.tsx @@ -12,4 +12,5 @@ export default function MyTag({ if (!item) return <>-; console.log('item', value, item); return {item.text}; + // return {item.text}; } diff --git a/src/common/components/layout/TabsExample.tsx b/src/common/components/layout/TabsExample.tsx index ac4508b..a48a00f 100644 --- a/src/common/components/layout/TabsExample.tsx +++ b/src/common/components/layout/TabsExample.tsx @@ -1,9 +1,8 @@ -import React from 'react'; -import { Button, Card, Space, Divider } from 'antd'; -import { PlusOutlined, UserOutlined, SettingOutlined } from '@ant-design/icons'; +import { PlusOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons'; +import { history } from '@umijs/max'; +import { Button, Card, Divider, Space } from 'antd'; import { MyPageContainer } from './MyPageContainer'; import { usePageTabs } from './usePageTabs'; -import { history } from '@umijs/max'; /** * 标签页使用示例组件 @@ -12,7 +11,7 @@ import { history } from '@umijs/max'; export function TabsExample() { const tabsApi = usePageTabs({ tabKey: 'tabs-example', - tabLabel: '标签页示例' + tabLabel: '标签页示例', }); const handleAddTab = (key: string, label: string, path: string) => { @@ -20,7 +19,7 @@ export function TabsExample() { key, label, path, - closable: true + closable: true, }); history.push(path); }; @@ -41,14 +40,16 @@ export function TabsExample() { > 打开用户列表 - + - + - + - + - - - - - - - + + + + + + + - +

🎯 核心功能

    -
  • 多标签页支持:支持同时打开多个页面标签
  • -
  • 右键菜单:右键点击标签页显示操作菜单
  • -
  • 智能导航:关闭标签时自动切换到相邻标签
  • -
  • 状态持久化:标签页状态在组件间共享
  • +
  • + 多标签页支持:支持同时打开多个页面标签 +
  • +
  • + 右键菜单:右键点击标签页显示操作菜单 +
  • +
  • + 智能导航:关闭标签时自动切换到相邻标签 +
  • +
  • + 状态持久化:标签页状态在组件间共享 +
- +

🖱️ 右键菜单操作

    -
  • 刷新:重新加载当前标签页
  • -
  • 关闭:关闭当前标签页
  • -
  • 关闭其他:关闭除当前标签外的所有标签
  • -
  • 关闭左侧:关闭当前标签左侧的所有标签
  • -
  • 关闭右侧:关闭当前标签右侧的所有标签
  • +
  • + 刷新:重新加载当前标签页 +
  • +
  • + 关闭:关闭当前标签页 +
  • +
  • + 关闭其他:关闭除当前标签外的所有标签 +
  • +
  • + 关闭左侧:关闭当前标签左侧的所有标签 +
  • +
  • + 关闭右侧:关闭当前标签右侧的所有标签 +
- +

💻 使用方法

-
-{`// 1. 在页面组件中使用
+          
+            {`// 1. 在页面组件中使用
 import { MyPageContainer, usePageTabs } from '@/common';
 
 function YourPage() {
@@ -123,4 +140,4 @@ function YourPage() {
       
     
   );
-}
\ No newline at end of file
+}
diff --git a/src/common/components/schema/MyColumns.tsx b/src/common/components/schema/MyColumns.tsx
index 940cfc6..f7bdbb7 100644
--- a/src/common/components/schema/MyColumns.tsx
+++ b/src/common/components/schema/MyColumns.tsx
@@ -154,12 +154,13 @@ export const MyColumns = {
   EnumTag({ ...rest }: ReturnType): ReturnType {
     return {
       align: 'left',
-      renderText(text: string | number) {
-        const _enum = rest.valueEnum ?? {};
+      renderText(text: any) {
+        const _enum: any = rest?.valueEnum ?? {};
         if (!_enum) return <>-;
         const item = _enum[text] ?? undefined;
         if (!item) return <>-;
-        return {item.text};
+        return {item.text};
+        // return {item.text};
         //修改列表的标签样式
       },
       ...rest,
diff --git a/src/common/utils/renderTextHelper.tsx b/src/common/utils/renderTextHelper.tsx
index 0eb5d07..ff572b4 100644
--- a/src/common/utils/renderTextHelper.tsx
+++ b/src/common/utils/renderTextHelper.tsx
@@ -27,11 +27,7 @@ export const renderTextHelper = {
     let item: any = Object.values(Enums).find((data: any) => {
       return data.value === '' + value;
     });
-    return isColor ? (
-      {item?.text}
-    ) : (
-      <>{item?.text}
-    );
+    return isColor ? {item?.text} : <>{item?.text};
     //  return {item.text};
   },
   Images(images: string[]) {
diff --git a/src/pages/company/companies/components/ReceiptAccounts.tsx b/src/pages/company/companies/components/ReceiptAccounts.tsx
index 79d2e38..2b34ccf 100644
--- a/src/pages/company/companies/components/ReceiptAccounts.tsx
+++ b/src/pages/company/companies/components/ReceiptAccounts.tsx
@@ -60,7 +60,7 @@ export default function ReceiptAccounts(props: MyBetaModalFormProps) {
               return `${record?.is_default ? '是' : '否'} `;
             },
           },
-          // MyColumns.UpdatedAt(),
+          MyColumns.UpdatedAt(),
           // MyColumns.CreatedAt(),
           MyColumns.Option({
             render: (_, item: any, index, action) => (