Explorar el Código

密码验证器修改条件

cc12458 hace 10 meses
padre
commit
be12e62dae
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      src/components/UserEdit.vue
  2. 1 1
      src/libs/vxe/validator.ts

+ 1 - 1
src/components/UserEdit.vue

@@ -26,7 +26,7 @@ const { loading: submitting, send: submit } = useRequest(editUserMethod, { immed
   });
 
 const formProps = reactive<VxeFormProps<FormModel>>({
-  titleWidth: 100,
+  titleWidth: 120,
   titleAlign: 'right',
   titleColon: true,
   titleAsterisk: true,

+ 1 - 1
src/libs/vxe/validator.ts

@@ -13,7 +13,7 @@ VxeUI.validators.add('ValidPassword', {
     if ( !rule.required ) return;
     if ( !itemValue ) return new Error(`请输入密码`);
     if ( !(
-      itemValue.length > 8 &&
+      itemValue.length >= 8 &&
       /\d/.test(itemValue) &&
       /[a-zA-Z]/.test(itemValue)
     ) ) {