Skip to content

Commit

Permalink
fix: 🐛text slots can not display
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjone committed May 25, 2023
1 parent 4255611 commit 05a8e74
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/composables/useSlotsBox.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type RowItem from '@/models/data/row';
import { useStore } from '@/store';
import { isSymbol } from 'lodash';
import { type Slots, type Slot } from 'vue';
import { type Slots, type Slot, isVNode, Comment } from 'vue';
import useData from './useData';

export default () => {
Expand All @@ -24,7 +23,9 @@ export default () => {
if (!slots) return false;

return (
slots?.(toRowData(data))?.filter(item => !isSymbol(item.type)).length > 0
slots?.(toRowData(data))?.filter(
item => !(isVNode(item) && item.type === Comment)
).length > 0
);
}

Expand Down

0 comments on commit 05a8e74

Please sign in to comment.