From bd5d3bf37f3bb89ea62b021a818690ca04994a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=9F=E8=B4=A4?= Date: Tue, 6 Sep 2022 16:05:15 +0800 Subject: [PATCH] fix(components): fix css var error --- packages/form/src/layouts/LoginForm/style.ts | 2 +- .../form/src/layouts/LoginFormPage/style.ts | 2 +- .../form/src/layouts/QueryFilter/index.tsx | 2 +- .../layout/src/demos/error-boundaries.tsx | 2 +- packages/provider/src/index.tsx | 4 +- packages/table/src/demos/error-boundaries.tsx | 2 +- tests/__snapshots__/doc.test.ts.snap | 2 +- tests/form/__snapshots__/demo.test.ts.snap | 20 +++---- tests/list/__snapshots__/demo.test.ts.snap | 2 +- .../table/__snapshots__/column.test.tsx.snap | 6 +- tests/table/__snapshots__/demo.test.ts.snap | 56 +++++++++---------- tests/table/__snapshots__/index.test.tsx.snap | 8 +-- .../__snapshots__/valueEnum.test.tsx.snap | 2 +- .../__snapshots__/valueType.test.tsx.snap | 2 +- 14 files changed, 56 insertions(+), 56 deletions(-) diff --git a/packages/form/src/layouts/LoginForm/style.ts b/packages/form/src/layouts/LoginForm/style.ts index 776a79407bba..65e44aed6620 100644 --- a/packages/form/src/layouts/LoginForm/style.ts +++ b/packages/form/src/layouts/LoginForm/style.ts @@ -57,7 +57,7 @@ const genLoginFormStyle: GenerateStyle = (token) => { minWidth: '328px', maxWidth: '500px', margin: '0 auto', - '&-other': { marginBlockStart: '24px', lineHeight: '22px', textAlign: 'left' }, + '&-other': { marginBlockStart: '24px', lineHeight: '22px', textAlign: 'start' }, }, }, '@media (min-width: @screen-md-min)': { diff --git a/packages/form/src/layouts/LoginFormPage/style.ts b/packages/form/src/layouts/LoginFormPage/style.ts index e85e1e1cd681..8b4c5d5a5d0b 100644 --- a/packages/form/src/layouts/LoginFormPage/style.ts +++ b/packages/form/src/layouts/LoginFormPage/style.ts @@ -75,7 +75,7 @@ const genLoginFormStyle: GenerateStyle = (token) => { '&-main': { width: '328px', margin: '0 auto', - '&-other': { marginBlockStart: '24px', lineHeight: '22px', textAlign: 'left' }, + '&-other': { marginBlockStart: '24px', lineHeight: '22px', textAlign: 'start' }, }, }, [`@media (max-width: ${token.screenMDMin}`]: { diff --git a/packages/form/src/layouts/QueryFilter/index.tsx b/packages/form/src/layouts/QueryFilter/index.tsx index f5f4941fae55..a290a59cb984 100644 --- a/packages/form/src/layouts/QueryFilter/index.tsx +++ b/packages/form/src/layouts/QueryFilter/index.tsx @@ -410,7 +410,7 @@ const QueryFilterContent: React.FC<{ span={spanSize.span} offset={offset} style={{ - textAlign: 'right', + textAlign: 'end', }} > diff --git a/packages/layout/src/demos/error-boundaries.tsx b/packages/layout/src/demos/error-boundaries.tsx index 96457a02843d..fee19a2af5bc 100644 --- a/packages/layout/src/demos/error-boundaries.tsx +++ b/packages/layout/src/demos/error-boundaries.tsx @@ -40,7 +40,7 @@ class CustomBoundary extends React.Component<
> = ({ autoClearCache = false, }) => { const { locale } = useContext(AntdConfigProvider.ConfigContext); - const { hashId } = useToken?.(); + const token = useToken?.(); // 如果 locale 不存在自动注入的 AntdConfigProvider const Provider = locale === undefined ? AntdConfigProvider : React.Fragment; const proProvide = useContext(ConfigContext); @@ -324,7 +324,7 @@ export const ConfigProviderWrap: React.FC> = ({ ); if (proProvide.isDeps) return provide; - return
{provide}
; + return
{provide}
; }} ); diff --git a/packages/table/src/demos/error-boundaries.tsx b/packages/table/src/demos/error-boundaries.tsx index bdba9f6312ae..0334f8810b03 100644 --- a/packages/table/src/demos/error-boundaries.tsx +++ b/packages/table/src/demos/error-boundaries.tsx @@ -42,7 +42,7 @@ class CustomBoundary extends React.Component<

注意 @@ -34439,7 +34439,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/form.tsx correctly