/// <summary> /// 获取枚举字典数据 /// </summary> /// <typeparam name="TEnum"></typeparam> /// <returns></returns> public static IList <CmbItem> GetEnumCmbSource <TEnum>() { var type = typeof(TEnum); if (EnumDictSource.ContainsKey(type)) { return(EnumDictSource[type]); } var dicts = EnumExtension.ConvertEnumToDict <TEnum>() .Select(kvp => new CmbItem { Id = kvp.Key, Text = kvp.Value }) .ToList(); EnumDictSource.Add(type, dicts); return(dicts); }