diff --git a/.changeset/rare-news-prove.md b/.changeset/rare-news-prove.md new file mode 100644 index 0000000000..fc7c3d8342 --- /dev/null +++ b/.changeset/rare-news-prove.md @@ -0,0 +1,5 @@ +--- +'@td-design/lego': patch +--- + +perf: lego组件库更新写法,去掉warning diff --git a/packages/lego/src/horizontal-bar/index.tsx b/packages/lego/src/horizontal-bar/index.tsx index 7c94f7d008..90afb7f40b 100644 --- a/packages/lego/src/horizontal-bar/index.tsx +++ b/packages/lego/src/horizontal-bar/index.tsx @@ -126,11 +126,9 @@ export default forwardRef( show: true, }, axisLabel: { + ...theme.typography[inModal ? 'p0' : 'p2'], show: true, - textStyle: { - ...theme.typography[inModal ? 'p0' : 'p2'], - color: theme.colors.gray100, - }, + color: theme.colors.gray100, }, axisTick: { show: true, @@ -164,11 +162,9 @@ export default forwardRef( ]), }, label: { + ...theme.typography[inModal ? 'p0' : 'p2'], + color: theme.colors.gray100, formatter: '{b}', - textStyle: { - ...theme.typography[inModal ? 'p0' : 'p2'], - color: theme.colors.gray100, - }, position: 'left', distance: 10, // 向右偏移位置 show: true, diff --git a/packages/lego/src/img-line/index.tsx b/packages/lego/src/img-line/index.tsx index 410447213d..5ff4a71ab4 100644 --- a/packages/lego/src/img-line/index.tsx +++ b/packages/lego/src/img-line/index.tsx @@ -154,10 +154,8 @@ export default forwardRef( }, }, areaStyle: { - normal: { - color: getAreaColorsByIndex(index), - shadowColor: getColorsByIndex(index), - }, + color: getAreaColorsByIndex(index), + shadowColor: getColorsByIndex(index), }, })), }, diff --git a/packages/lego/src/progress/index.tsx b/packages/lego/src/progress/index.tsx index 104344b652..4869e9e913 100644 --- a/packages/lego/src/progress/index.tsx +++ b/packages/lego/src/progress/index.tsx @@ -99,7 +99,7 @@ export default forwardRef( }, itemStyle: { color: createLinearGradient(theme.colors.primary50, false), - barBorderRadius: 11, + borderRadius: 11, }, }, { @@ -121,7 +121,7 @@ export default forwardRef( }, itemStyle: { color: createLinearGradient(theme.colors.primary100, false), - barBorderRadius: 11, + borderRadius: 11, }, }, { diff --git a/packages/lego/src/radar/index.tsx b/packages/lego/src/radar/index.tsx index b30de7cbbb..f334a6c4f0 100644 --- a/packages/lego/src/radar/index.tsx +++ b/packages/lego/src/radar/index.tsx @@ -108,8 +108,8 @@ export default forwardRef( radar: { center: ['50%', '50%'], radius: '70%', - nameGap: 5, - name: { + axisNameGap: 5, + axisName: { formatter: (_: string, indicator: IndicatorItem) => { return `{a|${indicator.name ?? ''}}\n{a|${indicator.max}${indicator.unit ?? ''}}`; }, diff --git a/packages/lego/src/utils/createStackSeries.ts b/packages/lego/src/utils/createStackSeries.ts index 91f94256d8..f044a5f95e 100644 --- a/packages/lego/src/utils/createStackSeries.ts +++ b/packages/lego/src/utils/createStackSeries.ts @@ -19,10 +19,8 @@ export default function createStackSeries( symbolSize: ['100%', 10], symbolRotate: 0, itemStyle: { - normal: { - borderWidth: 0, - color: chartColor[0][0], - }, + borderWidth: 0, + color: chartColor[0][0], }, animation: false, barMaxWidth: 20,