Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
ec5e04d3
Commit
ec5e04d3
authored
Nov 29, 2018
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: mobile prefix style replace
parent
7651ec99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
15 deletions
+25
-15
Register.vue
src/views/user/Register.vue
+25
-15
No files found.
src/views/user/Register.vue
View file @
ec5e04d3
...
...
@@ -4,7 +4,7 @@
<a-form
ref=
"formRegister"
:autoFormCreate=
"(form)=>
{this.form = form}" id="formRegister">
<a-form-item
fieldDecoratorId=
"email"
:fieldDecoratorOptions=
"
{rules: [{ required: true, type: 'email', message: '请输入邮箱地址' }]}">
:fieldDecoratorOptions=
"
{rules: [{ required: true, type: 'email', message: '请输入邮箱地址' }]
, validateTrigger: ['change', 'blur']
}">
<a-input
size=
"large"
type=
"text"
placeholder=
"邮箱"
></a-input>
</a-form-item>
...
...
@@ -22,14 +22,14 @@
<a-form-item
fieldDecoratorId=
"password"
:fieldDecoratorOptions=
"{rules: [{ required: true, message: '至少6位密码,区分大小写'}, { validator: this.handlePasswordLevel }
]}"
>
]
, validateTrigger: ['change', 'blur']
}"
>
<a-input
size=
"large"
type=
"password"
@
click=
"handlePasswordInputClick"
autocomplete=
"false"
placeholder=
"至少6位密码,区分大小写"
></a-input>
</a-form-item>
</a-popover>
<a-form-item
fieldDecoratorId=
"password2"
:fieldDecoratorOptions=
"{rules: [{ required: true, message: '至少6位密码,区分大小写' }, { validator: this.handlePasswordCheck }]}"
>
:fieldDecoratorOptions=
"{rules: [{ required: true, message: '至少6位密码,区分大小写' }, { validator: this.handlePasswordCheck }]
, validateTrigger: ['change', 'blur']
}"
>
<a-input
size=
"large"
type=
"password"
autocomplete=
"false"
placeholder=
"确认密码"
></a-input>
</a-form-item>
...
...
@@ -37,15 +37,6 @@
<a-form-item
fieldDecoratorId=
"mobile"
:fieldDecoratorOptions=
"{rules: [{ required: true, message: '请输入正确的手机号', pattern: /^1[3456789]\d{9}$/ }, { validator: this.handlePhoneCheck } ], validateTrigger: ['change', 'blur'] }"
>
<!--
<a-input-group size="large" compact>
<a-select style="width: 20%" size="large" defaultValue="+86">
<a-select-option value="+86">+86</a-select-option>
<a-select-option value="+87">+87</a-select-option>
</a-select>
<a-input style="width: 80%" size="large" placeholder="11 位手机号"></a-input>
</a-input-group>
-->
<a-input
size=
"large"
placeholder=
"11 位手机号"
>
<a-select
slot=
"addonBefore"
size=
"large"
defaultValue=
"+86"
>
<a-select-option
value=
"+86"
>
+86
</a-select-option>
...
...
@@ -53,6 +44,13 @@
</a-select>
</a-input>
</a-form-item>
<!--<a-input-group size="large" compact>
<a-select style="width: 20%" size="large" defaultValue="+86">
<a-select-option value="+86">+86</a-select-option>
<a-select-option value="+87">+87</a-select-option>
</a-select>
<a-input style="width: 80%" size="large" placeholder="11 位手机号"></a-input>
</a-input-group>-->
<a-row
:gutter=
"16"
>
<a-col
class=
"gutter-row"
:span=
"16"
>
...
...
@@ -181,6 +179,10 @@
handlePasswordCheck
(
rule
,
value
,
callback
)
{
let
password
=
this
.
form
.
getFieldValue
(
'password'
)
console
.
log
(
'value'
,
value
)
if
(
value
===
undefined
)
{
callback
(
new
Error
(
'请输入密码'
))
}
if
(
value
&&
password
&&
value
.
trim
()
!==
password
.
trim
())
{
callback
(
new
Error
(
'两次密码不一致'
))
}
...
...
@@ -188,9 +190,9 @@
},
handlePhoneCheck
(
rule
,
value
,
callback
)
{
console
.
log
(
'rule:'
,
rule
)
console
.
log
(
'value'
,
value
)
console
.
log
(
'callback'
,
callback
)
console
.
log
(
'
handlePhoneCheck,
rule:'
,
rule
)
console
.
log
(
'
handlePhoneCheck,
value'
,
value
)
console
.
log
(
'
handlePhoneCheck,
callback'
,
callback
)
callback
()
},
...
...
@@ -279,6 +281,14 @@
&
.success
{
color
:
#52c41a
;
}
}
.user-layout-register
{
.
ant-input-group-addon
:
first-child
{
background-color
:
#fff
;
}
}
</
style
>
<
style
lang=
"scss"
scoped
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment