diff --git a/packages/client/src/components/emoji-picker/index.module.scss b/packages/client/src/components/emoji-picker/index.module.scss index 3c2158f..94a6dac 100644 --- a/packages/client/src/components/emoji-picker/index.module.scss +++ b/packages/client/src/components/emoji-picker/index.module.scss @@ -5,7 +5,6 @@ .listWrap { display: flex; - width: 320px; padding: 0; margin: 0; list-style: none; diff --git a/packages/client/src/components/emoji-picker/index.tsx b/packages/client/src/components/emoji-picker/index.tsx index 2886f37..78ed70b 100644 --- a/packages/client/src/components/emoji-picker/index.tsx +++ b/packages/client/src/components/emoji-picker/index.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { Popover, Typography, Modal } from '@douyinfe/semi-ui'; +import { Popover, Typography, SideSheet } from '@douyinfe/semi-ui'; import { EXPRESSIONES, GESTURES, SYMBOLS, OBJECTS, ACTIVITIES, SKY_WEATHER } from './constants'; import { createKeysLocalStorageLRUCache } from 'helpers/lru-cache'; import { useToggle } from 'hooks/use-toggle'; @@ -61,10 +61,10 @@ export const EmojiPicker: React.FC = ({ onSelectEmoji, children }) => { const content = useMemo( () => ( -
+
{renderedList.map((item, index) => { return ( -
+
{item.title} @@ -93,16 +93,17 @@ export const EmojiPicker: React.FC = ({ onSelectEmoji, children }) => { {isMobile ? ( <> - toggleVisible(false)} - style={{ maxWidth: '96vw' }} + onCancel={toggleVisible} + height={370} + mask={false} > {content} - + toggleVisible(true)}>{children} ) : ( @@ -113,7 +114,7 @@ export const EmojiPicker: React.FC = ({ onSelectEmoji, children }) => { position="bottomLeft" visible={visible} onVisibleChange={toggleVisible} - content={content} + content={
{content}
} > {children} diff --git a/packages/client/src/tiptap/components/color-picker/index.tsx b/packages/client/src/tiptap/components/color-picker/index.tsx index 6a04ce7..5067080 100644 --- a/packages/client/src/tiptap/components/color-picker/index.tsx +++ b/packages/client/src/tiptap/components/color-picker/index.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react'; -import { Dropdown, Typography, Modal } from '@douyinfe/semi-ui'; +import { Dropdown, Typography, Modal, SideSheet, Row, Col } from '@douyinfe/semi-ui'; import styles from './style.module.scss'; import { useWindowSize } from 'hooks/use-window-size'; import { useToggle } from 'hooks/use-toggle'; @@ -89,7 +89,7 @@ export const ColorPicker: React.FC<{ const content = useMemo( () => ( -
+
onSetColor(null)}> 无颜色 @@ -115,16 +115,17 @@ export const ColorPicker: React.FC<{ {isMobile ? ( <> - toggleVisible(false)} - style={{ maxWidth: '96vw', width: 288 }} + onCancel={toggleVisible} + height={284} + mask={false} > {content} - + toggleVisible(true)}> {children} diff --git a/packages/client/src/tiptap/components/color-picker/style.module.scss b/packages/client/src/tiptap/components/color-picker/style.module.scss index f9f54a7..adce77c 100644 --- a/packages/client/src/tiptap/components/color-picker/style.module.scss +++ b/packages/client/src/tiptap/components/color-picker/style.module.scss @@ -1,6 +1,5 @@ .emptyWrap { display: flex; - width: 240px; cursor: pointer; border: 1px solid transparent; flex-wrap: nowrap; @@ -35,7 +34,6 @@ .colorWrap { display: flex; flex-wrap: wrap; - width: 240px; margin-top: 8px; .colorItem { diff --git a/packages/client/src/tiptap/editor/menus/search/index.tsx b/packages/client/src/tiptap/editor/menus/search/index.tsx index 1b06e27..d178889 100644 --- a/packages/client/src/tiptap/editor/menus/search/index.tsx +++ b/packages/client/src/tiptap/editor/menus/search/index.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState } from 'react'; -import { Popover, Button, Typography, Input, Space, Modal } from '@douyinfe/semi-ui'; +import { Popover, Button, Typography, Input, Space, SideSheet } from '@douyinfe/semi-ui'; import { Editor } from 'tiptap/editor'; import { useWindowSize } from 'hooks/use-window-size'; import { useToggle } from 'hooks/use-toggle'; @@ -64,7 +64,7 @@ export const Search: React.FC<{ editor: Editor }> = ({ editor }) => { }, [editor]); const content = ( -
+
查找 = ({ editor }) => { {isMobile ? ( <> - toggleVisible(false)} - style={{ maxWidth: '96vw' }} + onCancel={toggleVisible} + height={280} + mask={false} > {content} - + {btn} ) : (