From ba902145736eda1f3c51bde0a051a5f57631f217 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sun, 25 Oct 2020 20:44:26 +0800 Subject: [PATCH] test: update list & locale-provider snap --- components/layout/layout.tsx | 7 +- .../__tests__/__snapshots__/demo.test.js.snap | 14 +- .../__tests__/__snapshots__/demo.test.js.snap | 113 ++--- .../__snapshots__/index.test.js.snap | 414 +++++++++--------- components/vc-align/Align.jsx | 4 +- components/vc-select/SelectTrigger.tsx | 2 +- components/vc-util/Dom/isVisible.ts | 25 ++ 7 files changed, 296 insertions(+), 283 deletions(-) create mode 100644 components/vc-util/Dom/isVisible.ts diff --git a/components/layout/layout.tsx b/components/layout/layout.tsx index 2e56c75ca..c8dd7ca0a 100644 --- a/components/layout/layout.tsx +++ b/components/layout/layout.tsx @@ -2,6 +2,7 @@ import { createVNode, defineComponent, inject, provide, toRefs, ref } from 'vue' import PropTypes from '../_util/vue-types'; import classNames from '../_util/classNames'; import { defaultConfigProvider } from '../config-provider'; +import { flattenChildren } from '../_util/props-util'; export const BasicProps = { prefixCls: PropTypes.string, @@ -35,7 +36,11 @@ function generator({ suffixCls, tagName, name }: GeneratorArgument) { ...props, tagName, }; - return {slots.default?.()}; + return ( + + {flattenChildren(slots.default?.())} + + ); }; }, }); diff --git a/components/list/__tests__/__snapshots__/demo.test.js.snap b/components/list/__tests__/__snapshots__/demo.test.js.snap index 8c18e8bcd..572d71d37 100644 --- a/components/list/__tests__/__snapshots__/demo.test.js.snap +++ b/components/list/__tests__/__snapshots__/demo.test.js.snap @@ -10,7 +10,7 @@ exports[`renders ./antdv-demo/docs/list/demo/basic.md correctly 1`] = `
- -
- +
- ~ + ~