diff --git a/packages/vant/src/list/List.tsx b/packages/vant/src/list/List.tsx index 3b1a3fcee..470a9a3e0 100644 --- a/packages/vant/src/list/List.tsx +++ b/packages/vant/src/list/List.tsx @@ -115,7 +115,12 @@ export default defineComponent({ const text = slots.error ? slots.error() : props.errorText; if (text) { return ( -
+
{text}
); diff --git a/packages/vant/src/list/test/__snapshots__/index.spec.js.snap b/packages/vant/src/list/test/__snapshots__/index.spec.js.snap index 77f465e68..009cb95db 100644 --- a/packages/vant/src/list/test/__snapshots__/index.spec.js.snap +++ b/packages/vant/src/list/test/__snapshots__/index.spec.js.snap @@ -5,7 +5,10 @@ exports[`should render error slot correctly 1`] = ` class="van-list" aria-busy="false" > -
+
Custom Error