|
|
@@ -3,8 +3,8 @@
|
|
|
<el-card class="login-card">
|
|
|
<h2 class="login-card__title login-card__item">注 册</h2>
|
|
|
<el-input ref="name" v-model="name" placeholder="请输入昵称, 长度为1-20个字符" maxlength="20" class="login-card__item" autofocus></el-input>
|
|
|
- <el-input ref="username" v-model="username" placeholder="请输入用户名,这是你个唯一标识,只允许英文数字字符,长度为1-20" maxlength="20" class="login-card__item"></el-input>
|
|
|
- <el-input ref="password" v-model="password" type="password" placeholder="请输入密码, 长度为8-30个字符,只能包括数字与字母" minlength="8" maxlength="30" class="login-card__item"></el-input>
|
|
|
+ <el-input ref="username" v-model="username" placeholder="请输入用户名, 只允许英文数字字符, 长度为1-20个字符" maxlength="20" class="login-card__item"></el-input>
|
|
|
+ <el-input ref="password" v-model="password" type="password" placeholder="请输入密码, 只允许英文和数字, 长度为8-30个字符" minlength="8" maxlength="30" class="login-card__item"></el-input>
|
|
|
<el-input ref="passwordConfirm" v-model="passwordConfirm" type="password" placeholder="请再次输入密码" minlength="8" maxlength="30" class="login-card__item"></el-input>
|
|
|
<el-input ref="email" v-model="email" placeholder="请输入邮箱" maxlength="320" class="login-card__item" autofocus></el-input>
|
|
|
<el-input ref="phone" v-model="phone" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入手机号" minlength='11' maxlength='11' class="login-card__item"></el-input>
|
|
|
@@ -38,6 +38,11 @@ export default {
|
|
|
email: ''
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ username: function () {
|
|
|
+ this.username = this.username.replace(/[\u4E00-\u9FA5]/ig, '')
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
sendMessage () {
|
|
|
if (this.phone.length < 11) {
|