From 9bda18a4e593481f17ddc84692fbc8c9435c6503 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Tue, 22 Mar 2022 13:37:53 +0800 Subject: [PATCH] refactor: format code --- .../src/components/document/actions/index.tsx | 8 +-- .../src/components/document/card/index.tsx | 12 +---- .../document/collaboration/index.tsx | 30 ++--------- .../document/comments/comments/Item/index.tsx | 7 +-- .../document/comments/comments/index.tsx | 7 +-- .../src/components/document/create/index.tsx | 13 +---- .../src/components/document/editor/index.tsx | 30 ++--------- .../src/components/document/reader/editor.tsx | 4 +- .../src/components/document/reader/index.tsx | 37 ++----------- .../src/components/document/star/index.tsx | 6 +-- .../src/components/document/style/index.tsx | 9 +--- .../src/components/grid-select/grid-cell.tsx | 11 +--- .../components/grid-select/grid-select.tsx | 13 +---- .../components/icons/IconAddColumnAfter.tsx | 8 +-- .../components/icons/IconAddColumnBefore.tsx | 8 +-- .../src/components/icons/IconAddRowAfter.tsx | 8 +-- .../src/components/icons/IconAddRowBefore.tsx | 8 +-- .../client/src/components/icons/IconClear.tsx | 8 +-- .../src/components/icons/IconDeleteColumn.tsx | 8 +-- .../src/components/icons/IconDeleteRow.tsx | 8 +-- .../src/components/icons/IconDeleteTable.tsx | 8 +-- .../src/components/icons/IconMergeCell.tsx | 8 +-- .../src/components/icons/IconSplitCell.tsx | 8 +-- .../src/components/icons/IconZoomIn.tsx | 8 +-- .../src/components/icons/IconZoomOut.tsx | 8 +-- .../src/components/locale-time/index.tsx | 5 +- packages/client/src/components/logo/index.tsx | 8 +-- .../client/src/components/message/index.tsx | 28 ++-------- .../src/components/resizeable/resizeable.tsx | 31 ++--------- .../client/src/components/search/index.tsx | 3 +- packages/client/src/components/seo.tsx | 5 +- .../src/components/template/card/index.tsx | 12 +---- .../src/components/template/editor/editor.tsx | 32 ++---------- .../src/components/template/list/index.tsx | 6 +-- .../tiptap/components/banner/index.tsx | 7 +-- .../components/documentChildren/index.tsx | 4 +- .../tiptap/components/iframe/index.tsx | 6 +-- .../tiptap/components/mind/index.tsx | 7 +-- .../tiptap/extensions/backgroundColor.ts | 5 +- .../tiptap/extensions/blockquote.ts | 4 +- .../components/tiptap/extensions/indent.ts | 3 +- .../components/tiptap/extensions/search.ts | 14 ++--- .../src/components/tiptap/menus/align.tsx | 42 +++------------ .../src/components/tiptap/menus/banner.tsx | 8 +-- .../tiptap/menus/baseBubbleMenu.tsx | 3 +- .../src/components/tiptap/menus/baseMenu.tsx | 8 +-- .../bubbleMenu/bubbleMenuPlugin.tsx | 10 +--- .../components/tiptap/menus/search/index.tsx | 14 ++--- .../src/components/tiptap/services/image.ts | 4 +- .../components/tiptap/services/markUtils.ts | 3 +- .../services/markdown/serializerHelpers.ts | 19 ++----- .../src/components/tiptap/services/table.ts | 12 ++--- .../src/components/tiptap/services/type.ts | 4 +- .../client/src/components/tooltip/index.tsx | 15 +----- .../src/components/user/setting/index.tsx | 7 +-- .../wiki-or-document-creator/index.tsx | 4 +- .../client/src/components/wiki/card/index.tsx | 5 +- .../src/components/wiki/create/index.tsx | 13 +---- .../components/wiki/setting/base/index.tsx | 6 +-- .../wiki/setting/documents/index.tsx | 29 ++--------- .../src/components/wiki/setting/users/add.tsx | 14 +---- .../components/wiki/setting/users/edit.tsx | 6 +-- .../components/wiki/setting/users/index.tsx | 13 +---- .../client/src/components/wiki/star/index.tsx | 6 +-- .../src/components/wiki/tocs/NavItem.tsx | 15 +----- .../components/wiki/tocs/manager/index.tsx | 7 +-- .../client/src/components/wiki/tocs/tree.tsx | 7 +-- packages/client/src/data/document.ts | 8 +-- packages/client/src/data/template.ts | 8 ++- packages/client/src/data/wiki.tsx | 52 ++++++------------- .../client/src/hooks/use-click-outside.tsx | 5 +- packages/client/src/hooks/useAsyncLoading.tsx | 6 +-- .../src/illustrations/create-document.tsx | 5 +- .../client/src/illustrations/create-wiki.tsx | 13 +---- .../client/src/illustrations/empty-box.tsx | 17 ++---- packages/client/src/illustrations/share.tsx | 14 +---- packages/client/src/pages/index.tsx | 8 +-- packages/client/src/pages/template/index.tsx | 7 +-- .../pages/wiki/[wikiId]/documents/index.tsx | 4 +- packages/client/src/pages/wiki/index.tsx | 4 +- packages/client/src/services/HttpClient.tsx | 10 +--- packages/constants/src/index.ts | 3 +- packages/domains/src/util.ts | 3 +- .../src/controllers/document.controller.ts | 18 ++----- .../server/src/entities/collector.entity.ts | 8 +-- .../server/src/entities/comment.entity.ts | 8 +-- .../src/entities/document-authority.entity.ts | 8 +-- .../server/src/entities/document.entity.ts | 8 +-- .../server/src/entities/message.entity.ts | 8 +-- .../server/src/entities/template.entity.ts | 8 +-- packages/server/src/entities/user.entity.ts | 9 +--- packages/server/src/entities/view.entity.ts | 8 +-- .../server/src/entities/wiki-user.entity.ts | 8 +-- packages/server/src/entities/wiki.entity.ts | 8 +-- .../src/exceptions/http-response.exception.ts | 3 +- .../src/services/collaboration.service.ts | 7 +-- .../server/src/services/document.service.ts | 44 +++++----------- packages/server/src/services/user.service.ts | 5 +- packages/server/src/services/wiki.service.ts | 8 +-- 99 files changed, 187 insertions(+), 883 deletions(-) diff --git a/packages/client/src/components/document/actions/index.tsx b/packages/client/src/components/document/actions/index.tsx index 944f889f..c7ee1a8a 100644 --- a/packages/client/src/components/document/actions/index.tsx +++ b/packages/client/src/components/document/actions/index.tsx @@ -64,9 +64,7 @@ export const DocumentActions: React.FC = ({ {text} @@ -85,9 +83,7 @@ export const DocumentActions: React.FC = ({ } > - {children || ( - + = ({ wikiId, documentId })
- + 邀请成功后,请将该链接发送给对方。 -
@@ -195,11 +179,7 @@ export const DocumentCollaboration: React.FC = ({ wikiId, documentId }) dataIndex="operate" key="operate" render={(_, document) => ( - handleDelete(document)} - > + handleDelete(document)}> @@ -166,10 +147,7 @@ export const Editor: React.FC = ({
-
+
document.querySelector('#js-template-editor-container')} /> diff --git a/packages/client/src/components/template/list/index.tsx b/packages/client/src/components/template/list/index.tsx index 3d5d9539..6882fcff 100644 --- a/packages/client/src/components/template/list/index.tsx +++ b/packages/client/src/components/template/list/index.tsx @@ -1,11 +1,7 @@ import React, { useState, useMemo } from 'react'; import { List, Pagination } from '@douyinfe/semi-ui'; import { DataRender } from 'components/data-render'; -import { - IProps as ITemplateCardProps, - TemplateCardPlaceholder, - TemplateCard, -} from 'components/template/card'; +import { IProps as ITemplateCardProps, TemplateCardPlaceholder, TemplateCard } from 'components/template/card'; import { Empty } from 'components/empty'; const grid = { diff --git a/packages/client/src/components/tiptap/components/banner/index.tsx b/packages/client/src/components/tiptap/components/banner/index.tsx index df58bbf3..ec3b5022 100644 --- a/packages/client/src/components/tiptap/components/banner/index.tsx +++ b/packages/client/src/components/tiptap/components/banner/index.tsx @@ -5,12 +5,7 @@ import styles from './index.module.scss'; export const BannerWrapper = ({ node }) => { return ( - } - closeIcon={null} - fullMode={false} - /> + } closeIcon={null} fullMode={false} /> ); }; diff --git a/packages/client/src/components/tiptap/components/documentChildren/index.tsx b/packages/client/src/components/tiptap/components/documentChildren/index.tsx index 31d7d6b5..e5258656 100644 --- a/packages/client/src/components/tiptap/components/documentChildren/index.tsx +++ b/packages/client/src/components/tiptap/components/documentChildren/index.tsx @@ -40,9 +40,7 @@ export const DocumentChildrenWrapper = ({ editor }) => { diff --git a/packages/client/src/components/tiptap/components/iframe/index.tsx b/packages/client/src/components/tiptap/components/iframe/index.tsx index 90cf2ff2..061377f1 100644 --- a/packages/client/src/components/tiptap/components/iframe/index.tsx +++ b/packages/client/src/components/tiptap/components/iframe/index.tsx @@ -14,11 +14,7 @@ export const IframeWrapper = ({ editor, node, updateAttributes }) => { {isEditable && (
- updateAttributes({ url })} - > + updateAttributes({ url })}>
)} {url && ( diff --git a/packages/client/src/components/tiptap/components/mind/index.tsx b/packages/client/src/components/tiptap/components/mind/index.tsx index 01599e27..f92769ad 100644 --- a/packages/client/src/components/tiptap/components/mind/index.tsx +++ b/packages/client/src/components/tiptap/components/mind/index.tsx @@ -97,12 +97,7 @@ export const MindWrapper = ({ editor, node, updateAttributes }) => { }, [isEditable]); const content = ( -
+
{!isEditable && (
+ diff --git a/packages/client/src/components/tiptap/menus/banner.tsx b/packages/client/src/components/tiptap/menus/banner.tsx index 2af78f6a..0a1e2acb 100644 --- a/packages/client/src/components/tiptap/menus/banner.tsx +++ b/packages/client/src/components/tiptap/menus/banner.tsx @@ -1,11 +1,5 @@ import { Space, Button } from '@douyinfe/semi-ui'; -import { - IconDelete, - IconTickCircle, - IconAlertTriangle, - IconClear, - IconInfoCircle, -} from '@douyinfe/semi-icons'; +import { IconDelete, IconTickCircle, IconAlertTriangle, IconClear, IconInfoCircle } from '@douyinfe/semi-icons'; import { Tooltip } from 'components/tooltip'; import { BubbleMenu } from './components/bubbleMenu'; import { Divider } from '../components/divider'; diff --git a/packages/client/src/components/tiptap/menus/baseBubbleMenu.tsx b/packages/client/src/components/tiptap/menus/baseBubbleMenu.tsx index c35b2af3..45a35fb8 100644 --- a/packages/client/src/components/tiptap/menus/baseBubbleMenu.tsx +++ b/packages/client/src/components/tiptap/menus/baseBubbleMenu.tsx @@ -41,8 +41,7 @@ export const BaseBubbleMenu: React.FC<{ editor: Editor }> = ({ editor }) => { className={'bubble-menu'} pluginKey="base-bubble-menu" shouldShow={() => - !editor.state.selection.empty && - OTHER_BUBBLE_MENU_TYPES.every((type) => !editor.isActive(type)) + !editor.state.selection.empty && OTHER_BUBBLE_MENU_TYPES.every((type) => !editor.isActive(type)) } > diff --git a/packages/client/src/components/tiptap/menus/baseMenu.tsx b/packages/client/src/components/tiptap/menus/baseMenu.tsx index 6351893a..082b5122 100644 --- a/packages/client/src/components/tiptap/menus/baseMenu.tsx +++ b/packages/client/src/components/tiptap/menus/baseMenu.tsx @@ -1,12 +1,6 @@ import React from 'react'; import { Button } from '@douyinfe/semi-ui'; -import { - IconBold, - IconItalic, - IconStrikeThrough, - IconUnderline, - IconCode, -} from '@douyinfe/semi-icons'; +import { IconBold, IconItalic, IconStrikeThrough, IconUnderline, IconCode } from '@douyinfe/semi-icons'; import { Tooltip } from 'components/tooltip'; import { isTitleActive } from '../services/isActive'; import { ColorMenu } from './color'; diff --git a/packages/client/src/components/tiptap/menus/components/bubbleMenu/bubbleMenuPlugin.tsx b/packages/client/src/components/tiptap/menus/components/bubbleMenu/bubbleMenuPlugin.tsx index e36ead4a..914483dd 100644 --- a/packages/client/src/components/tiptap/menus/components/bubbleMenu/bubbleMenuPlugin.tsx +++ b/packages/client/src/components/tiptap/menus/components/bubbleMenu/bubbleMenuPlugin.tsx @@ -43,12 +43,7 @@ export class BubbleMenuView { public matchRenderContainer?: BubbleMenuPluginProps['matchRenderContainer']; - public shouldShow: Exclude = ({ - view, - state, - from, - to, - }) => { + public shouldShow: Exclude = ({ view, state, from, to }) => { const { doc, selection } = state; const { empty } = selection; @@ -240,8 +235,7 @@ export class BubbleMenuView { export const BubbleMenuPlugin = (options: BubbleMenuPluginProps) => { return new Plugin({ - key: - typeof options.pluginKey === 'string' ? new PluginKey(options.pluginKey) : options.pluginKey, + key: typeof options.pluginKey === 'string' ? new PluginKey(options.pluginKey) : options.pluginKey, view: (view) => new BubbleMenuView({ view, ...options }), }); }; diff --git a/packages/client/src/components/tiptap/menus/search/index.tsx b/packages/client/src/components/tiptap/menus/search/index.tsx index 9048008b..3047053c 100644 --- a/packages/client/src/components/tiptap/menus/search/index.tsx +++ b/packages/client/src/components/tiptap/menus/search/index.tsx @@ -7,9 +7,7 @@ import { SearchNReplace } from '../../extensions/search'; const { Text } = Typography; export const Search = ({ editor }) => { - const searchExtension = editor.extensionManager.extensions.find( - (ext) => ext.name === SearchNReplace.name - ); + const searchExtension = editor.extensionManager.extensions.find((ext) => ext.name === SearchNReplace.name); const currentIndex = searchExtension ? searchExtension.options.currentIndex : -1; const results = searchExtension ? searchExtension.options.results : []; const [searchValue, setSearchValue] = useState(''); @@ -58,16 +56,10 @@ export const Search = ({ editor }) => { - - diff --git a/packages/client/src/components/tiptap/services/image.ts b/packages/client/src/components/tiptap/services/image.ts index 3f4cf74e..2ab06cfa 100644 --- a/packages/client/src/components/tiptap/services/image.ts +++ b/packages/client/src/components/tiptap/services/image.ts @@ -1,6 +1,4 @@ -export function getImageOriginSize( - src: string -): Promise<{ width: number | string; height: number | string }> { +export function getImageOriginSize(src: string): Promise<{ width: number | string; height: number | string }> { return new Promise((resolve) => { const image = document.createElement('img'); image.onload = function () { diff --git a/packages/client/src/components/tiptap/services/markUtils.ts b/packages/client/src/components/tiptap/services/markUtils.ts index 6ccfed78..27c78ec7 100644 --- a/packages/client/src/components/tiptap/services/markUtils.ts +++ b/packages/client/src/components/tiptap/services/markUtils.ts @@ -1,5 +1,4 @@ -export const markInputRegex = (tag) => - new RegExp(`(<(${tag})((?: \\w+=".+?")+)?>([^<]+))$`, 'gm'); +export const markInputRegex = (tag) => new RegExp(`(<(${tag})((?: \\w+=".+?")+)?>([^<]+))$`, 'gm'); export const extractMarkAttributesFromMatch = ([, , , attrsString]) => { const attrRegex = /(\w+)="(.+?)"/g; diff --git a/packages/client/src/components/tiptap/services/markdown/serializerHelpers.ts b/packages/client/src/components/tiptap/services/markdown/serializerHelpers.ts index 6353233d..cf847563 100644 --- a/packages/client/src/components/tiptap/services/markdown/serializerHelpers.ts +++ b/packages/client/src/components/tiptap/services/markdown/serializerHelpers.ts @@ -28,11 +28,7 @@ const tableMap = new WeakMap(); export function isPlainURL(link, parent, index, side) { if (link.attrs.title || !/^\w+:/.test(link.attrs.href)) return false; const content = parent.child(index + (side < 0 ? -1 : 0)); - if ( - !content.isText || - content.text !== link.attrs.href || - content.marks[content.marks.length - 1] !== link - ) + if (!content.isText || content.text !== link.attrs.href || content.marks[content.marks.length - 1] !== link) return false; if (index === (side < 0 ? 1 : parent.childCount - 1)) return true; const next = parent.child(index + (side < 0 ? -2 : 1)); @@ -133,8 +129,7 @@ export function openTag(tagName, attrs) { str += Object.entries(attrs || {}) .map(([key, value]) => { - if ((ignoreAttrs[tagName] || []).includes(key) || defaultAttrs[tagName]?.[key] === value) - return ''; + if ((ignoreAttrs[tagName] || []).includes(key) || defaultAttrs[tagName]?.[key] === value) return ''; return ` ${key}="${htmlEncode(value?.toString())}"`; }) @@ -162,8 +157,7 @@ function setIsInBlockTable(table, value) { rows.forEach((row) => tableMap.set(row, value)); cells.forEach((cell) => { tableMap.set(cell, value); - if (cell.childCount && cell.child(0).type.name === 'paragraph') - tableMap.set(cell.child(0), value); + if (cell.childCount && cell.child(0).type.name === 'paragraph') tableMap.set(cell.child(0), value); }); } @@ -270,12 +264,7 @@ export function renderContent(state, node, forceRenderInline) { } } -export function renderHTMLNode( - tagName, - forceRenderInline = false, - needNewLine = false, - attrs = {} -) { +export function renderHTMLNode(tagName, forceRenderInline = false, needNewLine = false, attrs = {}) { return (state, node) => { renderTagOpen(state, tagName, Object.assign({}, node.attrs || {}, attrs)); renderContent(state, node, forceRenderInline); diff --git a/packages/client/src/components/tiptap/services/table.ts b/packages/client/src/components/tiptap/services/table.ts index bb4d7508..eecbbd72 100644 --- a/packages/client/src/components/tiptap/services/table.ts +++ b/packages/client/src/components/tiptap/services/table.ts @@ -21,9 +21,7 @@ export const isRectSelected = (rect: any) => (selection: CellSelection) => { }; export const findTable = (selection: Selection) => - findParentNode((node) => node.type.spec.tableRole && node.type.spec.tableRole === 'table')( - selection - ); + findParentNode((node) => node.type.spec.tableRole && node.type.spec.tableRole === 'table')(selection); export const isCellSelection = (selection: any) => { return selection instanceof CellSelection; @@ -141,10 +139,7 @@ export const getCellsInTable = (selection: Selection) => { } }; -export const findParentNodeClosestToPos = ( - $pos: ResolvedPos, - predicate: (node: Node) => boolean -) => { +export const findParentNodeClosestToPos = ($pos: ResolvedPos, predicate: (node: Node) => boolean) => { for (let i = $pos.depth; i > 0; i--) { const node = $pos.node(i); if (predicate(node)) { @@ -159,8 +154,7 @@ export const findParentNodeClosestToPos = ( }; export const findCellClosestToPos = ($pos: ResolvedPos) => { - const predicate = (node: Node) => - node.type.spec.tableRole && /cell/i.test(node.type.spec.tableRole); + const predicate = (node: Node) => node.type.spec.tableRole && /cell/i.test(node.type.spec.tableRole); return findParentNodeClosestToPos($pos, predicate); }; diff --git a/packages/client/src/components/tiptap/services/type.ts b/packages/client/src/components/tiptap/services/type.ts index a1a6be94..896bceea 100644 --- a/packages/client/src/components/tiptap/services/type.ts +++ b/packages/client/src/components/tiptap/services/type.ts @@ -3,9 +3,7 @@ import { NodeType, Schema } from 'prosemirror-model'; export function getNodeType(nameOrType: string | NodeType, schema: Schema): NodeType { if (typeof nameOrType === 'string') { if (!schema.nodes[nameOrType]) { - throw Error( - `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?` - ); + throw Error(`There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`); } return schema.nodes[nameOrType]; diff --git a/packages/client/src/components/tooltip/index.tsx b/packages/client/src/components/tooltip/index.tsx index 877dc079..2187df35 100644 --- a/packages/client/src/components/tooltip/index.tsx +++ b/packages/client/src/components/tooltip/index.tsx @@ -11,22 +11,11 @@ interface IProps { position?: Position; } -export const Tooltip: React.FC = ({ - content, - hideOnClick = false, - position = 'top', - children, -}) => { +export const Tooltip: React.FC = ({ content, hideOnClick = false, position = 'top', children }) => { const [visible, toggleVisible] = useToggle(false); return ( - + { toggleVisible(true); diff --git a/packages/client/src/components/user/setting/index.tsx b/packages/client/src/components/user/setting/index.tsx index f5e344f0..257f7da1 100644 --- a/packages/client/src/components/user/setting/index.tsx +++ b/packages/client/src/components/user/setting/index.tsx @@ -65,12 +65,7 @@ export const UserSetting: React.FC = ({ visible, toggleVisible }) => { disabled placeholder="请输入账户名称" > - + ); diff --git a/packages/client/src/components/wiki-or-document-creator/index.tsx b/packages/client/src/components/wiki-or-document-creator/index.tsx index 208ee400..76d29a22 100644 --- a/packages/client/src/components/wiki-or-document-creator/index.tsx +++ b/packages/client/src/components/wiki-or-document-creator/index.tsx @@ -21,9 +21,7 @@ export const WikiOrDocumentCreator: React.FC = ({ onCreateDocument, chil render={ 知识库 - {wikiId && ( - 文档 - )} + {wikiId && 文档} } > diff --git a/packages/client/src/components/wiki/card/index.tsx b/packages/client/src/components/wiki/card/index.tsx index e37a611b..12a4c8fb 100644 --- a/packages/client/src/components/wiki/card/index.tsx +++ b/packages/client/src/components/wiki/card/index.tsx @@ -9,10 +9,7 @@ import styles from './index.module.scss'; const { Text, Paragraph } = Typography; -export const WikiCard: React.FC<{ wiki: IWiki; shareMode?: boolean }> = ({ - wiki, - shareMode = false, -}) => { +export const WikiCard: React.FC<{ wiki: IWiki; shareMode?: boolean }> = ({ wiki, shareMode = false }) => { return (
= ({ visible, toggleVisible }) => { }; return ( - -
($form.current = formApi)} - > + + ($form.current = formApi)}> = ({ wiki, update }) => {
{WIKI_AVATARS.map((cover) => { return ( -
setCover(cover)} - > +
setCover(cover)}> 系统默认图片
); diff --git a/packages/client/src/components/wiki/setting/documents/index.tsx b/packages/client/src/components/wiki/setting/documents/index.tsx index 85b889dd..6b9c6c4d 100644 --- a/packages/client/src/components/wiki/setting/documents/index.tsx +++ b/packages/client/src/components/wiki/setting/documents/index.tsx @@ -1,14 +1,5 @@ import React, { useState, useMemo, useEffect, useCallback } from 'react'; -import { - Transfer, - Button, - Banner, - Typography, - RadioGroup, - Radio, - Toast, - Checkbox, -} from '@douyinfe/semi-ui'; +import { Transfer, Button, Banner, Typography, RadioGroup, Radio, Toast, Checkbox } from '@douyinfe/semi-ui'; import { IconClose } from '@douyinfe/semi-icons'; import { WIKI_STATUS_LIST, isPublicDocument, isPublicWiki } from '@think/domains'; import { useWikiDetail, useWikiTocs } from 'data/wiki'; @@ -23,11 +14,7 @@ interface IProps { } export const WorkspaceDocs: React.FC = ({ wikiId }) => { - const { - data: workspace, - loading: workspaceLoading, - toggleStatus: toggleWorkspaceStatus, - } = useWikiDetail(wikiId); + const { data: workspace, loading: workspaceLoading, toggleStatus: toggleWorkspaceStatus } = useWikiDetail(wikiId); const { data: tocs, loading } = useWikiTocs(wikiId); const documents = flattenTree2Array(tocs).map((d) => { d.label = d.title; @@ -101,11 +88,7 @@ export const WorkspaceDocs: React.FC = ({ wikiId }) => { bordered icon={null} style={{ marginTop: 16 }} - title={ -
- 当前知识库已经公开 -
- } + title={
当前知识库已经公开
} description={ isPublic && (
@@ -130,11 +113,7 @@ export const WorkspaceDocs: React.FC = ({ wikiId }) => { 是否公开知识库? - setNextStatus(e.target.value)} - > + setNextStatus(e.target.value)}> {WIKI_STATUS_LIST.map((status) => { return {status.label}; })} diff --git a/packages/client/src/components/wiki/setting/users/add.tsx b/packages/client/src/components/wiki/setting/users/add.tsx index 28062f39..b504bf77 100644 --- a/packages/client/src/components/wiki/setting/users/add.tsx +++ b/packages/client/src/components/wiki/setting/users/add.tsx @@ -35,11 +35,7 @@ export const AddUser: React.FC = ({ visible, toggleVisible, onOk }) => { >
{userRole === WikiUserRole.admin ? ( - + ) : null} {WIKI_USER_ROLES.map((wikiStatus) => { diff --git a/packages/client/src/components/wiki/setting/users/index.tsx b/packages/client/src/components/wiki/setting/users/index.tsx index 25084b09..64f94d42 100644 --- a/packages/client/src/components/wiki/setting/users/index.tsx +++ b/packages/client/src/components/wiki/setting/users/index.tsx @@ -67,17 +67,8 @@ export const Users: React.FC = ({ wikiId }) => { align="center" render={(_, data) => ( <> -