visuddhinanda 2 лет назад
Родитель
Сommit
08a4f86825
1 измененных файлов с 13 добавлено и 2 удалено
  1. 13 2
      dashboard/src/components/article/ArticleEdit.tsx

+ 13 - 2
dashboard/src/components/article/ArticleEdit.tsx

@@ -7,7 +7,7 @@ import {
   ProFormTextArea,
   ProFormTextArea,
 } from "@ant-design/pro-components";
 } from "@ant-design/pro-components";
 
 
-import { Button, Form, message, Result, Space, Tabs } from "antd";
+import { Alert, Button, Form, message, Result, Space, Tabs } from "antd";
 
 
 import { get, put } from "../../request";
 import { get, put } from "../../request";
 import {
 import {
@@ -58,7 +58,18 @@ const ArticleEditWidget = ({
     />
     />
   ) : (
   ) : (
     <>
     <>
-      {readonly ? "只读" : undefined}
+      {readonly ? (
+        <Alert
+          message="文章为只读,如果需要修改,请联络拥有者分配权限。"
+          type="warning"
+          closable
+          action={
+            <Button disabled size="small" type="text">
+              详情
+            </Button>
+          }
+        />
+      ) : undefined}
       <ProForm<IFormData>
       <ProForm<IFormData>
         onFinish={async (values: IFormData) => {
         onFinish={async (values: IFormData) => {
           // TODO
           // TODO