Explorar el Código

只有自己建立的才显示新建按钮

visuddhinanda hace 2 años
padre
commit
5375819b30
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      dashboard/src/pages/studio/course/list.tsx

+ 6 - 1
dashboard/src/pages/studio/course/list.tsx

@@ -451,7 +451,12 @@ const Widget = () => {
               setOpenCreate(newOpen);
             }}
           >
-            <Button key="button" icon={<PlusOutlined />} type="primary">
+            <Button
+              disabled={activeKey !== "create"}
+              key="button"
+              icon={<PlusOutlined />}
+              type="primary"
+            >
               {intl.formatMessage({ id: "buttons.create" })}
             </Button>
           </Popover>,