Pārlūkot izejas kodu

添加登录名

宝臣 王 3 mēneši atpakaļ
vecāks
revīzija
98c51e4375

+ 0 - 1
UniformMaterialManagementSystem/ViewModels/RegisterPageViewModel.cs

@@ -43,7 +43,6 @@ namespace UniformMaterialManagementSystem.ViewModels
 
         [ObservableProperty]
         [Required(ErrorMessage = "用户名不能为空")]
-        [CustomValidation(typeof(RegisterPageViewModel), nameof(ValidateUserName))]
         private string _userName = string.Empty;
 
         [ObservableProperty]

+ 8 - 6
UniformMaterialManagementSystem/Views/LoginAndRegister/RegisterPage.xaml

@@ -94,6 +94,8 @@
                         <RowDefinition />
                         <RowDefinition Height="Auto" />
                         <RowDefinition />
+                        <RowDefinition Height="Auto" />
+                        <RowDefinition />
                     </Grid.RowDefinitions>
 
                     <Label
@@ -188,7 +190,7 @@
                     </TextBox>
 
                     <Label
-                        Grid.Row="6"
+                        Grid.Row="8"
                         Grid.Column="0"
                         HorizontalContentAlignment="Left"
                         VerticalContentAlignment="Center"
@@ -198,7 +200,7 @@
                         Foreground="#0c9ea1" />
 
                     <TextBox
-                        Grid.Row="7"
+                        Grid.Row="9"
                         HorizontalContentAlignment="Center"
                         VerticalContentAlignment="Center"
                         BorderBrush="#019b9b"
@@ -212,7 +214,7 @@
                     </TextBox>
 
                     <Label
-                        Grid.Row="8"
+                        Grid.Row="10"
                         Grid.Column="0"
                         HorizontalContentAlignment="Left"
                         VerticalContentAlignment="Center"
@@ -222,7 +224,7 @@
                         Foreground="#0c9ea1" />
 
                     <PasswordBox
-                        Grid.Row="9"
+                        Grid.Row="11"
                         HorizontalContentAlignment="Center"
                         VerticalContentAlignment="Center"
                         utils:PasswordHelper.Attach="True"
@@ -237,7 +239,7 @@
                     </PasswordBox>
 
                     <Label
-                        Grid.Row="10"
+                        Grid.Row="12"
                         Grid.Column="0"
                         HorizontalContentAlignment="Left"
                         VerticalContentAlignment="Center"
@@ -247,7 +249,7 @@
                         Foreground="#0c9ea1" />
 
                     <PasswordBox
-                        Grid.Row="11"
+                        Grid.Row="13"
                         HorizontalContentAlignment="Center"
                         VerticalContentAlignment="Center"
                         utils:PasswordHelper.Attach="True"