소스 검색

姓名可输入数字

zhouna 5 년 전
부모
커밋
49f01a13cb
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/components/Login.vue

+ 2 - 2
src/components/Login.vue

@@ -102,7 +102,7 @@ export default {
     },
     blur() {
       if(MobileDevice.getModels().join(' or ').indexOf('6') == -1){
-        document.activeElement.scrollIntoViewIfNeeded(true);      
+        document.activeElement.scrollIntoViewIfNeeded(true);
         setTimeout(() => {
           document.activeElement.scrollIntoViewIfNeeded(true);
         }, 300);
@@ -111,7 +111,7 @@ export default {
     changeName() {
       document.activeElement.scrollIntoViewIfNeeded(true);
       const { patName } = this;
-      this.patName = patName.replace(/[0-9]*$/,'').replace(/[`~!@#$%^&)(*_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im,'')
+      this.patName = patName.replace(/[`~!@#$%^&)(*_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im,'')
     },
     changeVal() {
       document.activeElement.scrollIntoViewIfNeeded(true);