Abp.DataDictionary icon indicating copy to clipboard operation
Abp.DataDictionary copied to clipboard

Abp data dictionary module.

Results 3 Abp.DataDictionary issues
Sort by recently updated
recently updated
newest added

Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.50 to 0.10.63. Release notes Sourced from es5-ext's releases. 0.10.63 (2024-02-23) Bug Fixes Do not rely on problematic regex (3551cdd), addresses #201 Support ES2015+ function definitions in...

dependencies

很常见地,数据对象会有一些非简单类型的成员、列表等也可能含有需要渲染的字典字段。 以目前的方式,只能逐个去手动处理,在试着手动渲染了几处之后,发现非常的麻烦且冗余。 希望能加上自动渲染复杂对象的功能。 我尝试自己扩展,临时实现了一下,方式可能不是太好,供参考。 加了一个特性:`DictionaryChildFieldAttribute`,用来标记需要进一步渲染的字段。 扩展了`DataDictionaryLoader`的`ScanRules`方法: 把标记了`DictionaryChildField`的字段记录下来,并且判断一下是否是`IEnumerable`,也记录下来 这里借用了 `DataDictionaryRule` ,临时用自己的方式保存了规则信息 ``` var properties = type .GetProperties() .Where(p => p.IsDefined(typeof(DictionaryChildFieldAttribute))) .ToList(); rules.AddRange(properties.Select(property => new DataDictionaryRule { DictionaryCode = property.PropertyType.IsAssignableTo(typeof(IEnumerable)) ? "IEnumerable"...

enhancement

有时候一个 code ,可能会用来渲染多个不同的字段: 比如: ``` [ {code:1,name:'一级',color:'红色'}, {code:2,name:'二级',color:'蓝色'} ] ``` 根据以上数据分别定义了字典`LevelName` 和 `LevelColor` ,略... ``` [DictionaryCodeField("LevelName")] //

enhancement