feat:【框架】description 增加对 xx.yyy 属性的读取支持
This commit is contained in:
@@ -7,6 +7,8 @@ import type { DescriptionItemSchema, DescriptionsOptions } from './typing';
|
||||
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import { get } from '@vben/utils';
|
||||
|
||||
import { ElDescriptions, ElDescriptionsItem } from 'element-plus';
|
||||
|
||||
/** 对 Descriptions 进行二次封装 */
|
||||
@@ -45,7 +47,7 @@ const Description = defineComponent({
|
||||
? item.content(props.data)
|
||||
: item.content;
|
||||
}
|
||||
return item.field ? props.data?.[item.field] : null;
|
||||
return item.field ? get(props.data, item.field) : null;
|
||||
};
|
||||
|
||||
return () => (
|
||||
|
||||
Reference in New Issue
Block a user