Explorar el Código

chore: 修改数字类型字段默认组件

喵你个旺呀 hace 1 año
padre
commit
49a31d7b4b
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      Admin.NET/Admin.NET.Core/Utils/CodeGenUtil.cs

+ 4 - 4
Admin.NET/Admin.NET.Core/Utils/CodeGenUtil.cs

@@ -258,14 +258,14 @@ public static class CodeGenUtil
     public static string DataTypeToEff(string dataType)
     {
         if (string.IsNullOrEmpty(dataType)) return "";
-        return dataType?.TrimEnd('?') switch
+        return dataType.TrimEnd('?') switch
         {
             "string" => "Input",
             "int" => "InputNumber",
             "long" => "Input",
-            "float" => "Input",
-            "double" => "Input",
-            "decimal" => "Input",
+            "float" => "InputNumber",
+            "double" => "InputNumber",
+            "decimal" => "InputNumber",
             "bool" => "Switch",
             "Guid" => "Input",
             "DateTime" => "DatePicker",