diff --git a/src/components/Description/src/index.tsx b/src/components/Description/src/index.tsx index fb8ca0d02c04709717d5c887be84e5f79fbaee7f..ab03437fe26fef87606656e1ff0cee4812e0afa3 100644 --- a/src/components/Description/src/index.tsx +++ b/src/components/Description/src/index.tsx @@ -83,10 +83,9 @@ export default defineComponent({ } function renderItem() { - const { schema } = unref(getProps); + const { schema, data } = unref(getProps); return unref(schema).map((item) => { const { render, field, span, show, contentMinWidth } = item; - const { data } = unref(getProps) as DescOptions; if (show && isFunction(show) && !show(data)) { return null; @@ -112,7 +111,8 @@ export default defineComponent({ }} ); - }); + }) + .filter((item) => !!item); } const renderDesc = () => {