From 3bb729214e08381cace9ce188af4e17424e2b28a Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 13 Mar 2022 15:51:10 +0800 Subject: [PATCH] fix(Skeleton): fix non-props attributes warning (#10384) --- packages/vant/src/skeleton/Skeleton.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/vant/src/skeleton/Skeleton.tsx b/packages/vant/src/skeleton/Skeleton.tsx index 7ac2f1b0d..3a75cea39 100644 --- a/packages/vant/src/skeleton/Skeleton.tsx +++ b/packages/vant/src/skeleton/Skeleton.tsx @@ -38,9 +38,11 @@ export type SkeletonProps = ExtractPropTypes; export default defineComponent({ name, + inheritAttrs: false, + props: skeletonProps, - setup(props, { slots }) { + setup(props, { slots, attrs }) { const renderAvatar = () => { if (props.avatar) { return ( @@ -90,7 +92,10 @@ export default defineComponent({ } return ( -
+
{renderAvatar()}
{renderTitle()}