diff --git a/src/select/hooks/useSelectOptions.ts b/src/select/hooks/useSelectOptions.ts
index 4a65db414..1f1a103b3 100644
--- a/src/select/hooks/useSelectOptions.ts
+++ b/src/select/hooks/useSelectOptions.ts
@@ -65,6 +65,10 @@ export default function useSelectOptions(
// 处理 slots 中 t-option 与 t-option-group
const currentSlots = instance.proxy.$slots.default || [];
currentSlots.forEach((child) => {
+ if (!child.componentOptions) {
+ return;
+ }
+
const componentName = getVNodeComponentName(child);
if (componentName && componentName === getVueComponentName(Option)) {
// 独立选项
diff --git a/src/space/space.tsx b/src/space/space.tsx
index 959588a09..375c9ac36 100644
--- a/src/space/space.tsx
+++ b/src/space/space.tsx
@@ -67,9 +67,13 @@ export default defineComponent({
render() {
const { COMPONENT_NAME, spaceClassNames, renderStyle } = this;
- const children = this.$slots.default?.filter((child) => child.tag !== undefined || child.text) || [];
+ const children = this.$slots.default || [];
const childCount = children?.length;
const renderChildren = () => children.map((child, index) => {
+ if (!child.tag && !child.text) {
+ return child;
+ }
+
const separatorNode = renderTNodeJSX(this, 'separator');
const showSeparator = index + 1 !== childCount && separatorNode;
return [
diff --git a/test/snap/__snapshots__/csr.test.js.snap b/test/snap/__snapshots__/csr.test.js.snap
index 478af759b..1d8d9d2fc 100644
--- a/test/snap/__snapshots__/csr.test.js.snap
+++ b/test/snap/__snapshots__/csr.test.js.snap
@@ -70964,6 +70964,7 @@ exports[`csr snapshot test > csr test ./src/loading/_example/delay.vue 1`] = `
+
@@ -123910,6 +123914,7 @@ exports[`csr snapshot test > csr test ./src/tree/_example/disabled.vue 1`] = `
+
@@ -123969,6 +123974,7 @@ exports[`csr snapshot test > csr test ./src/tree/_example/disabled.vue 1`] = `
+
@@ -124028,6 +124034,7 @@ exports[`csr snapshot test > csr test ./src/tree/_example/disabled.vue 1`] = `
+
@@ -124085,6 +124092,7 @@ exports[`csr snapshot test > csr test ./src/tree/_example/disabled.vue 1`] = `
class="t-space t-space-horizontal"
style="gap: 10px;"
>
+
renders ./src/loading/_example/attach.vue correctly
exports[`ssr snapshot test > renders ./src/loading/_example/base.vue correctly 1`] = `"
"`;
-exports[`ssr snapshot test > renders ./src/loading/_example/delay.vue correctly 1`] = `"
"`;
+exports[`ssr snapshot test > renders ./src/loading/_example/delay.vue correctly 1`] = `"
"`;
exports[`ssr snapshot test > renders ./src/loading/_example/directive.vue correctly 1`] = `"
"`;
@@ -708,7 +708,7 @@ exports[`ssr snapshot test > renders ./src/message/_example/toggle.vue correctly
exports[`ssr snapshot test > renders ./src/message/_example/type.vue correctly 1`] = `"
"`;
-exports[`ssr snapshot test > renders ./src/notification/_example/base.vue correctly 1`] = `"
"`;
+exports[`ssr snapshot test > renders ./src/notification/_example/base.vue correctly 1`] = `"
"`;
exports[`ssr snapshot test > renders ./src/notification/_example/close.vue correctly 1`] = `"
"`;
@@ -1209,7 +1209,7 @@ exports[`ssr snapshot test > renders ./src/tooltip/_example/arrow.vue correctly
exports[`ssr snapshot test > renders ./src/tooltip/_example/base.vue correctly 1`] = `"
"`;
-exports[`ssr snapshot test > renders ./src/tooltip/_example/duration.vue correctly 1`] = `"
"`;
+exports[`ssr snapshot test > renders ./src/tooltip/_example/duration.vue correctly 1`] = `"
"`;
exports[`ssr snapshot test > renders ./src/tooltip/_example/mouse.vue correctly 1`] = `"
文案比较长..."`;
@@ -1255,7 +1255,7 @@ exports[`ssr snapshot test > renders ./src/tree/_example/debug-performance.vue c
exports[`ssr snapshot test > renders ./src/tree/_example/debug-vscroll.vue correctly 1`] = `"
"`;
-exports[`ssr snapshot test > renders ./src/tree/_example/disabled.vue correctly 1`] = `"
"`;
+exports[`ssr snapshot test > renders ./src/tree/_example/disabled.vue correctly 1`] = `"
"`;
exports[`ssr snapshot test > renders ./src/tree/_example/draggable.vue correctly 1`] = `"
1.1.1.1
1.1.1.2
1.1.2.1
1.1.2.2
2.1
2.2 不允许拖放为 2.2 的子节点
"`;
@@ -1311,7 +1311,7 @@ exports[`ssr snapshot test > renders ./src/tree-select/_example/valuedisplay.vue
exports[`ssr snapshot test > renders ./src/tree-select/_example/valuetype.vue correctly 1`] = `"
"`;
-exports[`ssr snapshot test > renders ./src/upload/_example/base.vue correctly 1`] = `"
"`;
+exports[`ssr snapshot test > renders ./src/upload/_example/base.vue correctly 1`] = `"
"`;
exports[`ssr snapshot test > renders ./src/upload/_example/custom-drag.vue correctly 1`] = `"
"`;
@@ -1319,7 +1319,7 @@ exports[`ssr snapshot test > renders ./src/upload/_example/draggable.vue correct
exports[`ssr snapshot test > renders ./src/upload/_example/file-flow-list.vue correctly 1`] = `"
"`;
-exports[`ssr snapshot test > renders ./src/upload/_example/image.vue correctly 1`] = `"
"`;
+exports[`ssr snapshot test > renders ./src/upload/_example/image.vue correctly 1`] = `"
"`;
exports[`ssr snapshot test > renders ./src/upload/_example/img-flow-list.vue correctly 1`] = `"
loading.svg
loading.svg
loading.svg
loading.svg
"`;