😎修复字典验证特性错误
This commit is contained in:
parent
c9144b6784
commit
8ff1ed357f
@ -62,7 +62,7 @@ public class DictAttribute : ValidationAttribute
|
||||
type = type != null ? Nullable.GetUnderlyingType(type) ?? type : null;
|
||||
|
||||
// 使用HashSet来提高查找效率
|
||||
var valueList = (type?.IsEnum ?? DictTypeCode.EndsWith("Enum")) ? dictDataList.Select(u => u.Code) : dictDataList.Select(u => u.Value);
|
||||
var valueList = (type?.IsEnum ?? DictTypeCode.EndsWith("Enum")) ? dictDataList.Select(u => u.Value) : dictDataList.Select(u => u.Code);
|
||||
var dictHash = new HashSet<string>(valueList);
|
||||
|
||||
if (!dictHash.Contains(valueAsString))
|
||||
|
||||
@ -131,6 +131,7 @@ public class ExcelHelper
|
||||
|
||||
if (dataList != null)
|
||||
{
|
||||
// 添加下拉列表
|
||||
AddListValidation(columnIndex, dataList);
|
||||
dropdownSheet.Cells[1, columnIndex, dataList.Count, columnIndex].LoadFromCollection(dataList);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2025.01.03",
|
||||
"lastBuildTime": "2025.01.04",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -36,7 +36,7 @@
|
||||
"echarts": "^5.6.0",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.9.1",
|
||||
"element-plus": "^2.9.2",
|
||||
"exceljs": "^4.4.0",
|
||||
"ezuikit-js": "^8.1.3",
|
||||
"gcoord": "^1.0.6",
|
||||
@ -74,7 +74,7 @@
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.3.58",
|
||||
"vxe-pc-ui": "^4.3.61",
|
||||
"vxe-table": "^4.10.0",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
@ -93,7 +93,7 @@
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||
"@vue/compiler-sfc": "^3.5.13",
|
||||
"code-inspector-plugin": "^0.19.0",
|
||||
"code-inspector-plugin": "^0.19.1",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"globals": "^15.14.0",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user