client: fix overflow style

pull/64/head
fantasticit 2022-06-03 16:44:25 +08:00
parent 10aca8ff2b
commit fd2d5e7052
3 changed files with 6 additions and 11 deletions

View File

@ -1,8 +1,3 @@
.wrap {
height: 300px;
overflow: auto;
}
.listWrap { .listWrap {
display: flex; display: flex;
padding: 0; padding: 0;

View File

@ -65,7 +65,7 @@ export const EmojiPicker: React.FC<IProps> = ({ showClear = false, onSelectEmoji
const content = useMemo( const content = useMemo(
() => ( () => (
<div className={styles.wrap} style={{ padding: isMobile ? '24px 0' : 0 }}> <div className={styles.wrap}>
<Tabs <Tabs
size="small" size="small"
lazyRender lazyRender
@ -95,7 +95,7 @@ export const EmojiPicker: React.FC<IProps> = ({ showClear = false, onSelectEmoji
</Tabs> </Tabs>
</div> </div>
), ),
[isMobile, showClear, renderedList, selectEmoji, clear] [showClear, renderedList, selectEmoji, clear]
); );
useEffect(() => { useEffect(() => {

View File

@ -71,7 +71,7 @@ export const ImageUploader: React.FC<IProps> = ({ images, selectImage, children
() => () =>
images.map((image) => { images.map((image) => {
return ( return (
<TabPane key={image.key} tab={image.title} itemKey={image.key}> <TabPane key={image.key} tab={image.title} itemKey={image.key} style={{ height: 250, overflow: 'auto' }}>
{chunk(image.images, 4).map((chunk, index) => { {chunk(image.images, 4).map((chunk, index) => {
return ( return (
<Row gutter={6} key={index} style={{ marginTop: index === 0 ? 0 : 6 }}> <Row gutter={6} key={index} style={{ marginTop: index === 0 ? 0 : 6 }}>
@ -100,7 +100,7 @@ export const ImageUploader: React.FC<IProps> = ({ images, selectImage, children
const content = useMemo( const content = useMemo(
() => ( () => (
<div className={styles.wrap} style={{ padding: isMobile ? '24px 0' : 0 }}> <div className={styles.wrap}>
<Tabs <Tabs
size="small" size="small"
lazyRender lazyRender
@ -112,13 +112,13 @@ export const ImageUploader: React.FC<IProps> = ({ images, selectImage, children
} }
> >
{imageTabs} {imageTabs}
<TabPane tab="上传" itemKey="upload" style={{ textAlign: 'center' }}> <TabPane tab="上传" itemKey="upload" style={{ textAlign: 'center', height: 250, overflow: 'auto' }}>
<UploadTab selectImage={(url) => selectImage(url)} /> <UploadTab selectImage={(url) => selectImage(url)} />
</TabPane> </TabPane>
</Tabs> </Tabs>
</div> </div>
), ),
[isMobile, imageTabs, selectImage, clear] [imageTabs, selectImage, clear]
); );
return ( return (