样式修改

main
lvchenpeng 3 months ago
parent 123c9b791f
commit c6b516d6b5

@ -20,7 +20,7 @@ const Layout = ({ children }: PropsWithChildren) => {
>
<Flexbox
gap={16}
style={{ maxWidth: MAX_WIDTH, position: 'relative' }}
style={{ position: 'relative' }}
width={'100%'}
>
{children}

@ -12,14 +12,16 @@ const Layout = async ({ children }: PropsWithChildren) => {
const categoryList = await discoverService.getProviderList(DEFAULT_LANG);
return (
<Flexbox gap={24} horizontal style={{ position: 'relative' }} width={'100%'}>
<CategoryContainer>
<Category data={categoryList} />
</CategoryContainer>
<Flexbox flex={1} gap={16}>
{children}
<div>
<Flexbox gap={24} horizontal style={{ position: 'relative' }} width={'100%'}>
<CategoryContainer>
<Category data={categoryList} />
</CategoryContainer>
<Flexbox flex={1} gap={16}>
{children}
</Flexbox>
</Flexbox>
</Flexbox>
</div>
);
};

@ -74,7 +74,7 @@ const List = memo<ListProps>(async ({ category, searchKeywords, items = [] }) =>
};
fetchData();
}, []); // 空数组[]意味着仅在组件挂载时调用一次
const handleClickCard = (item) => {
console.log(item)
router.push(urlJoin('/discover/model/', item.identifier))
@ -108,7 +108,7 @@ const List = memo<ListProps>(async ({ category, searchKeywords, items = [] }) =>
<Grid maxItemWidth={280} rows={4}>
{stData.map((item) => (
// <Link href={urlJoin('/discover/assistant/', item.identifier)} key={item.identifier}>
<Card key={item.identifier} onClick={() => handleClickCard(item)} showCategory={!category} {...item} />
<Card style={{boxShadow: "1px 0px 12px 0px rgba(42, 77, 255, 0.19)"}} key={item.identifier} onClick={() => handleClickCard(item)} showCategory={!category} {...item} />
// </Link>
))}
</Grid>
@ -121,7 +121,7 @@ const List = memo<ListProps>(async ({ category, searchKeywords, items = [] }) =>
initialItemCount={24}
itemContent={(_, item) => (
// <Link href={urlJoin('/discover/model/', item.identifier)} key={item.identifier}>
<Card key={item.identifier} onClick={() => handleClickCard(item)} showCategory={!category} {...item} />
<Card style={{boxShadow: "1px 0px 12px 0px rgba(42, 77, 255, 0.19)"}} key={item.identifier} onClick={() => handleClickCard(item)} showCategory={!category} {...item} />
// </Link>
)}
style={{

Loading…
Cancel
Save