Jelajahi Sumber

Merge pull request #1327 from visuddhinanda/agile

#1318 去掉粗体关键字的删除线
visuddhinanda 2 tahun lalu
induk
melakukan
c9ac0acafc

+ 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

+ 1 - 1
dashboard/src/components/article/ArticleEditDrawer.tsx

@@ -54,7 +54,7 @@ const ArticleEditDrawerWidget = ({
     <>
     <>
       <span onClick={() => showDrawer()}>{trigger}</span>
       <span onClick={() => showDrawer()}>{trigger}</span>
       <Drawer
       <Drawer
-        title={title + readonly ? "(只读)" : ""}
+        title={title + (readonly ? "(只读)" : "")}
         width={1000}
         width={1000}
         placement="right"
         placement="right"
         onClose={onDrawerClose}
         onClose={onDrawerClose}

+ 6 - 0
dashboard/src/components/fts/search.css

@@ -3,6 +3,12 @@
   color: black;
   color: black;
   text-decoration: none;
   text-decoration: none;
 }
 }
+.search_content > p > strong > del {
+  background-color: yellow;
+  color: black;
+  font-weight: 700;
+  text-decoration: none;
+}
 .search_content em {
 .search_content em {
   color: #177ddc;
   color: #177ddc;
   font-style: unset;
   font-style: unset;