feat: 优化了一些代码
This commit is contained in:
parent
d75223f6cd
commit
85652b1c89
|
|
@ -304,7 +304,7 @@ function VirtualGrid<T extends any = any>(
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{/* 加载更多 */}
|
{/* 加载更多 */}
|
||||||
{!!renderList.current.length && !noMoreData && (
|
{!!renderList.current.length && !noMoreData && !isFirstLoading && (
|
||||||
<div
|
<div
|
||||||
className="absolute flex w-full items-center justify-center"
|
className="absolute flex w-full items-center justify-center"
|
||||||
style={{ top: listHeight.current, height: loadingHeight }}
|
style={{ top: listHeight.current, height: loadingHeight }}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
'use client';
|
||||||
|
|
||||||
|
import { Drawer } from '@/components';
|
||||||
|
import IconFont from '@/components/ui/iconFont';
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
export default function Avatar() {
|
||||||
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
return (
|
||||||
|
<div className="h-9 w-9 cursor-pointer overflow-hidden rounded-full">
|
||||||
|
<img
|
||||||
|
onClick={() => setIsOpen(true)}
|
||||||
|
src="/avator.png"
|
||||||
|
width={36}
|
||||||
|
height={36}
|
||||||
|
alt="avatar"
|
||||||
|
/>
|
||||||
|
<Drawer width={450} inBody open={isOpen}>
|
||||||
|
<div className="h-full w-full bg-[rgba(26,23,34,1)] px-10 pt-7">
|
||||||
|
<div className="flex justify-between">
|
||||||
|
<span onClick={() => setIsOpen(false)}>
|
||||||
|
<IconFont
|
||||||
|
className="cursor-pointer"
|
||||||
|
type="icon-fanhui"
|
||||||
|
size={18}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Drawer>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import NavRoutes from './components/NavRoutes';
|
import NavRoutes from './components/NavRoutes';
|
||||||
import LocaleSelect from './components/LocaleSelect';
|
import LocaleSelect from './components/LocaleSelect';
|
||||||
|
import Avatar from './components/Avatar';
|
||||||
|
|
||||||
const RightActions = () => {
|
const RightActions = () => {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<LocaleSelect />
|
<LocaleSelect />
|
||||||
|
<Avatar />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue