Unverified 提交 23eba274 作者: John Niang 提交者: GitHub

fix(description): not rendering while show method return false (#253)

* fix(description): not rendering while show method return false

fix #252

* Move data desctruction outside loop
上级 c81d48e7
......@@ -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({
}}
</Descriptions.Item>
);
});
})
.filter((item) => !!item);
}
const renderDesc = () => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论