diff --git a/components/layout/__tests__/__snapshots__/demo.test.js.snap b/components/layout/__tests__/__snapshots__/demo.test.js.snap index bfc92d4f1..48c7c19f8 100644 --- a/components/layout/__tests__/__snapshots__/demo.test.js.snap +++ b/components/layout/__tests__/__snapshots__/demo.test.js.snap @@ -1,44 +1,58 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders ./components/layout/demo/basic.vue correctly 1`] = ` -
-
Header
-
Content
- -
-
-
Header
-
- -
Content
-
- -
-
-
Header
-
-
Content
- -
- -
-
- -
-
Header
-
Content
- -
-
+
+
+
+
Header
+
Content
+
Footer
+
+
+ +
+
+
Header
+
+ +
Content
+
+
Footer
+
+
+ +
+
+
Header
+
+
Content
+ +
+
Footer
+
+
+ +
+
+ +
+
Header
+
Content
+
Footer
+
+
+
+ +
`; exports[`renders ./components/layout/demo/custom-trigger.vue correctly 1`] = ` diff --git a/components/layout/demo/basic.vue b/components/layout/demo/basic.vue index ea97c6153..a03beb9e2 100644 --- a/components/layout/demo/basic.vue +++ b/components/layout/demo/basic.vue @@ -16,76 +16,70 @@ Classic page layouts. + diff --git a/components/space/index.tsx b/components/space/index.tsx index bd5ddd249..3d5b88ffc 100644 --- a/components/space/index.tsx +++ b/components/space/index.tsx @@ -97,7 +97,11 @@ const Space = defineComponent({ const horizontalSizeVal = horizontalSize.value; const latestIndex = len - 1; return ( -
+
{items.map((child, index) => { const originIndex = children.indexOf(child); let itemStyle: CSSProperties = {}; diff --git a/components/steps/index.tsx b/components/steps/index.tsx index 650d31d86..cc3a53347 100644 --- a/components/steps/index.tsx +++ b/components/steps/index.tsx @@ -15,6 +15,7 @@ import Tooltip from '../tooltip'; import { VcStepProps } from '../vc-steps/Step'; import type { Status, ProgressDotRender } from '../vc-steps/interface'; import type { MouseEventHandler } from '../_util/EventInterface'; +import { useToken } from '../theme/internal'; // CSSINJS import useStyle from './style'; @@ -66,6 +67,7 @@ const Steps = defineComponent({ const { prefixCls, direction: rtlDirection, configProvider } = useConfigInject('steps', props); // style const [wrapSSR, hashId] = useStyle(prefixCls); + const [, token] = useToken(); const screens = useBreakpoint(); const direction = computed(() => @@ -90,7 +92,10 @@ const Steps = defineComponent({ }) => { if (status === 'process' && props.percent !== undefined) { // currently it's hard-coded, since we can't easily read the actually width of icon - const progressWidth = props.size === 'small' ? 32 : 40; + + const progressWidth = + props.size === 'small' ? token.value.controlHeight : token.value.controlHeightLG; + const iconWithProgress = (

+
+
+ +
+ +
`; exports[`renders ./components/switch/demo/loading.vue correctly 1`] = ` -

+
+
+ +
+ +
`; exports[`renders ./components/switch/demo/size.vue correctly 1`] = ` -

+
+
+ +
+ +
`; exports[`renders ./components/switch/demo/text.vue correctly 1`] = ` -


+
+
+ +
+ +
+ +
`; diff --git a/components/switch/__tests__/index.test.js b/components/switch/__tests__/index.test.js index 542f6ffd7..42941630f 100644 --- a/components/switch/__tests__/index.test.js +++ b/components/switch/__tests__/index.test.js @@ -93,12 +93,12 @@ describe('Switch', () => { wrapper.find('button').trigger('click'); }); expect(checked.value).toBe(2); - expect(wrapper.find('.ant-switch-inner').text()).toBe('on'); + expect(wrapper.find('.ant-switch-inner').text()).toBe('onoff'); await asyncExpect(() => { wrapper.find('button').trigger('click'); }); expect(checked.value).toBe(1); - expect(wrapper.find('.ant-switch-inner').text()).toBe('off'); + expect(wrapper.find('.ant-switch-inner').text()).toBe('onoff'); }); }); diff --git a/components/switch/demo/disabled.vue b/components/switch/demo/disabled.vue index 3fb8c4d5f..65f33dea5 100644 --- a/components/switch/demo/disabled.vue +++ b/components/switch/demo/disabled.vue @@ -17,11 +17,10 @@ Disabled state of `Switch`.