fix(types): 修复 ECharts 类型导出和组件类型冲突
- echarts.ts: 将 EChartsOption 改为 EChartsCoreOption 的类型别名 - FuiCorners: 移除 extends BoxProps,position 重命名为 corner - KLineChartModal/TimelineChartModal/ConcentrationCard: 使用导入的 EChartsOption - LoadingState: 新增骨架屏 variant 支持 - FinancialPanorama: 使用骨架屏加载状态 - useFinancialData/financialService: 优化数据获取逻辑 - Company/index: 简化组件结构 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -19,8 +19,8 @@ export interface FuiCornersProps {
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
interface CornerBoxProps extends BoxProps {
|
||||
position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
||||
interface CornerBoxProps {
|
||||
corner: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
||||
size: number;
|
||||
borderWidth: number;
|
||||
borderColor: string;
|
||||
@@ -29,14 +29,14 @@ interface CornerBoxProps extends BoxProps {
|
||||
}
|
||||
|
||||
const CornerBox = memo<CornerBoxProps>(({
|
||||
position,
|
||||
corner,
|
||||
size,
|
||||
borderWidth,
|
||||
borderColor,
|
||||
opacity,
|
||||
offset,
|
||||
}) => {
|
||||
const positionStyles: Record<string, BoxProps> = {
|
||||
const cornerStyles: Record<string, BoxProps> = {
|
||||
'top-left': {
|
||||
top: `${offset}px`,
|
||||
left: `${offset}px`,
|
||||
@@ -71,7 +71,7 @@ const CornerBox = memo<CornerBoxProps>(({
|
||||
borderColor={borderColor}
|
||||
opacity={opacity}
|
||||
pointerEvents="none"
|
||||
{...positionStyles[position]}
|
||||
{...cornerStyles[corner]}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@@ -97,7 +97,7 @@ const FuiCorners = memo<FuiCornersProps>(({
|
||||
opacity = 0.6,
|
||||
offset = 12,
|
||||
}) => {
|
||||
const positions: CornerBoxProps['position'][] = [
|
||||
const corners: CornerBoxProps['corner'][] = [
|
||||
'top-left',
|
||||
'top-right',
|
||||
'bottom-left',
|
||||
@@ -106,10 +106,10 @@ const FuiCorners = memo<FuiCornersProps>(({
|
||||
|
||||
return (
|
||||
<>
|
||||
{positions.map((position) => (
|
||||
{corners.map((corner) => (
|
||||
<CornerBox
|
||||
key={position}
|
||||
position={position}
|
||||
key={corner}
|
||||
corner={corner}
|
||||
size={size}
|
||||
borderWidth={borderWidth}
|
||||
borderColor={borderColor}
|
||||
|
||||
Reference in New Issue
Block a user