update ui

This commit is contained in:
2025-11-13 17:58:37 +08:00
parent dfa2635b2e
commit 716b4ba3bd
2 changed files with 62 additions and 57 deletions

View File

@@ -421,9 +421,16 @@ const CompactSearchBox = ({
}; };
return ( return (
<div style={{ padding: '12px 16px', background: '#fafafa', borderRadius: '8px' }}> <div style={{
padding: '16px 20px',
background: 'linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 250, 250, 0.95) 100%)',
borderRadius: '12px',
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5)',
border: '1px solid rgba(200, 200, 200, 0.3)',
backdropFilter: 'blur(10px)'
}}>
{/* 单行紧凑布局 */} {/* 单行紧凑布局 */}
<Space wrap style={{ width: '100%' }} size="small"> <Space wrap style={{ width: '100%' }} size="medium">
{/* 搜索框 */} {/* 搜索框 */}
<AutoComplete <AutoComplete
value={inputValue} value={inputValue}
@@ -438,12 +445,15 @@ const CompactSearchBox = ({
handleMainSearch(); handleMainSearch();
} }
}} }}
style={{ width: 220 }} style={{ width: 240 }}
size="small"
> >
<Input <Input
prefix={<SearchOutlined style={{ color: '#bfbfbf' }} />} prefix={<SearchOutlined style={{ color: '#1890ff' }} />}
size="small" style={{
borderRadius: '8px',
border: '2px solid #e6f7ff',
boxShadow: '0 2px 8px rgba(24, 144, 255, 0.1)'
}}
/> />
</AutoComplete> </AutoComplete>
@@ -478,9 +488,11 @@ const CompactSearchBox = ({
expandTrigger="hover" expandTrigger="hover"
displayRender={(labels) => labels[labels.length - 1] || '行业'} displayRender={(labels) => labels[labels.length - 1] || '行业'}
disabled={industryLoading} disabled={industryLoading}
style={{ width: 100 }} style={{
size="small" width: 120,
suffixIcon={<FilterOutlined style={{ fontSize: 12 }} />} borderRadius: '8px'
}}
suffixIcon={<FilterOutlined style={{ fontSize: 14, color: '#52c41a' }} />}
/> />
</Tooltip> </Tooltip>
@@ -490,8 +502,10 @@ const CompactSearchBox = ({
mode="multiple" mode="multiple"
value={importance} value={importance}
onChange={handleImportanceChange} onChange={handleImportanceChange}
style={{ width: 100 }} style={{
size="small" width: 120,
borderRadius: '8px'
}}
placeholder="重要性" placeholder="重要性"
maxTagCount={0} maxTagCount={0}
maxTagPlaceholder={(omittedValues) => `已选 ${omittedValues.length}`} maxTagPlaceholder={(omittedValues) => `已选 ${omittedValues.length}`}
@@ -508,15 +522,17 @@ const CompactSearchBox = ({
<AntSelect <AntSelect
value={sort} value={sort}
onChange={handleSortChange} onChange={handleSortChange}
style={{ width: 110 }} style={{
size="small" width: 130,
suffixIcon={<SortAscendingOutlined style={{ fontSize: 12 }} />} borderRadius: '8px'
}}
suffixIcon={<SortAscendingOutlined style={{ fontSize: 14, color: '#faad14' }} />}
> >
<Option value="new">最新</Option> <Option value="new"> 最新</Option>
<Option value="hot">最热</Option> <Option value="hot">🔥 最热</Option>
<Option value="importance">重要性</Option> <Option value="importance"> 重要性</Option>
<Option value="returns_avg">平均收益</Option> <Option value="returns_avg">📊 平均收益</Option>
<Option value="returns_week">周收益</Option> <Option value="returns_week">📈 周收益</Option>
</AntSelect> </AntSelect>
</Tooltip> </Tooltip>
@@ -525,9 +541,12 @@ const CompactSearchBox = ({
<Button <Button
icon={<CloseCircleOutlined />} icon={<CloseCircleOutlined />}
onClick={handleReset} onClick={handleReset}
size="small"
danger danger
type="text" type="primary"
style={{
borderRadius: '8px',
boxShadow: '0 2px 8px rgba(255, 77, 79, 0.2)'
}}
> >
重置 重置
</Button> </Button>

View File

@@ -469,18 +469,18 @@ const ConceptFlowAnimation = () => {
// 根据涨跌幅计算字体大小(涨跌幅越大,字体越大) // 根据涨跌幅计算字体大小(涨跌幅越大,字体越大)
const getFontSize = (changePct) => { const getFontSize = (changePct) => {
const absChange = Math.abs(changePct); const absChange = Math.abs(changePct);
if (absChange >= 10) return 'md'; // 超大涨跌 if (absChange >= 10) return 'xl'; // 超大涨跌 - 20px
if (absChange >= 7) return 'sm'; // 大涨跌 if (absChange >= 7) return 'lg'; // 大涨跌 - 18px
if (absChange >= 5) return 'sm'; // 中涨跌 if (absChange >= 5) return 'md'; // 中涨跌 - 16px
if (absChange >= 3) return 'xs'; // 小涨跌 if (absChange >= 3) return 'md'; // 小涨跌 - 16px
return 'xs'; // 微涨跌 return 'sm'; // 微涨跌 - 14px
}; };
return ( return (
<VStack spacing={3} h="200px" justify="center" overflow="hidden" position="relative" w="100%"> <VStack spacing={3} h="200px" justify="center" overflow="hidden" position="relative" w="100%">
{rows.map((row, rowIndex) => { {rows.map((row, rowIndex) => {
// 每行不同的速度:第一行25秒第二行30秒第三行35秒 // 每行不同的速度第一行50秒,第二行60秒第三行70秒更慢
const duration = 25 + rowIndex * 5; const duration = 50 + rowIndex * 10;
return ( return (
<Box <Box
@@ -514,25 +514,15 @@ const ConceptFlowAnimation = () => {
const isHovered = hoveredConcept === `${rowIndex}-${idx}`; const isHovered = hoveredConcept === `${rowIndex}-${idx}`;
const fontSize = getFontSize(changePct); const fontSize = getFontSize(changePct);
const borderWidth = fontSize === 'md' ? '3px' : '2px'; const isLargeFontSize = fontSize === 'xl' || fontSize === 'lg';
return ( return (
<Box <Box
key={`${rowIndex}-${idx}`} key={`${rowIndex}-${idx}`}
px={4} px={2}
py={2}
borderRadius="full"
bg="whiteAlpha.200"
borderWidth={borderWidth}
borderColor={color}
color="white"
fontWeight={fontSize === 'md' ? 'extrabold' : 'bold'}
fontSize={fontSize}
whiteSpace="nowrap"
cursor="pointer" cursor="pointer"
position="relative" position="relative"
transition="all 0.3s ease" transition="all 0.3s ease"
boxShadow={`0 0 ${fontSize === 'md' ? '15px' : '10px'} ${color}${fontSize === 'md' ? '60' : '40'}`}
onMouseEnter={() => { onMouseEnter={() => {
setIsPaused(true); setIsPaused(true);
setHoveredConcept(`${rowIndex}-${idx}`); setHoveredConcept(`${rowIndex}-${idx}`);
@@ -543,14 +533,23 @@ const ConceptFlowAnimation = () => {
}} }}
onClick={() => handleConceptClick(concept.name)} onClick={() => handleConceptClick(concept.name)}
_hover={{ _hover={{
transform: 'scale(1.15)', transform: 'scale(1.2)',
bg: 'whiteAlpha.300',
boxShadow: `0 0 25px ${color}80`,
zIndex: 100 zIndex: 100
}} }}
> >
{/* 概念名称 */} {/* 概念名称 */}
<Text as="span" color={color}> <Text
as="span"
color={color}
fontSize={fontSize}
fontWeight={isLargeFontSize ? 'extrabold' : 'bold'}
textShadow={`0 0 ${isLargeFontSize ? '12px' : '8px'} ${color}80, 0 2px 4px rgba(0,0,0,0.5)`}
whiteSpace="nowrap"
transition="all 0.3s ease"
_hover={{
textShadow: `0 0 20px ${color}, 0 0 30px ${color}60, 0 2px 6px rgba(0,0,0,0.7)`
}}
>
{concept.name} {concept.name}
</Text> </Text>
@@ -814,21 +813,8 @@ const HeroPanel = () => {
<Box <Box
w="100%" w="100%"
flex="1" flex="1"
bg="whiteAlpha.100"
borderRadius="xl"
borderWidth="1px"
borderColor="whiteAlpha.200"
backdropFilter="blur(10px)"
boxShadow="0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05)"
p={3}
position="relative" position="relative"
overflow="hidden" overflow="hidden"
transition="all 0.3s ease"
_hover={{
bg: "whiteAlpha.150",
borderColor: "whiteAlpha.300",
boxShadow: "0 6px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1)"
}}
> >
<ConceptFlowAnimation /> <ConceptFlowAnimation />
</Box> </Box>