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
36161d6d
Commit
36161d6d
authored
Nov 23, 2018
by
sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: register phone
parent
180439c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
Register.vue
src/views/user/Register.vue
+19
-4
No files found.
src/views/user/Register.vue
View file @
36161d6d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<a-input
size=
"large"
type=
"text"
placeholder=
"邮箱"
></a-input>
<a-input
size=
"large"
type=
"text"
placeholder=
"邮箱"
></a-input>
</a-form-item>
</a-form-item>
<a-popover
placement=
"right"
trigger=
"click"
:visible=
"state.passwordLevelChecked"
>
<a-popover
placement=
"right
Top
"
trigger=
"click"
:visible=
"state.passwordLevelChecked"
>
<template
slot=
"content"
>
<template
slot=
"content"
>
<div
:style=
"
{ width: '240px' }" >
<div
:style=
"
{ width: '240px' }" >
<div
:class=
"['user-register', passwordLevelClass]"
>
强度:
<span>
{{
passwordLevelName
}}
</span></div>
<div
:class=
"['user-register', passwordLevelClass]"
>
强度:
<span>
{{
passwordLevelName
}}
</span></div>
...
@@ -36,15 +36,22 @@
...
@@ -36,15 +36,22 @@
<a-form-item
<a-form-item
fieldDecoratorId=
"mobile"
fieldDecoratorId=
"mobile"
:fieldDecoratorOptions=
"{rules: [{ required: true, message: '
手机号' }], validateTrigger: 'blur'
}"
>
:fieldDecoratorOptions=
"{rules: [{ required: true, message: '
请输入正确的手机号', pattern: /^1[3456789]\d{9}$/ }, { validator: this.handlePhoneCheck } ], validateTrigger: ['change', 'blur']
}"
>
<!--
<a-input-group size="large" compact>
<a-input-group size="large" compact>
<a-select style="width: 20%" size="large" defaultValue="+86">
<a-select style="width: 20%" size="large" defaultValue="+86">
<a-select-option value="+86">+86</a-select-option>
<a-select-option value="+86">+86</a-select-option>
<a-select-option value="+87">+87</a-select-option>
<a-select-option value="+87">+87</a-select-option>
</a-select>
</a-select>
<a-input
style=
"width: 80%"
placeholder=
"11 位手机号"
></a-input>
<a-input style="width: 80%"
size="large"
placeholder="11 位手机号"></a-input>
</a-input-group>
</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>
<a-select-option
value=
"+87"
>
+87
</a-select-option>
</a-select>
</a-input>
</a-form-item>
</a-form-item>
<a-row
:gutter=
"16"
>
<a-row
:gutter=
"16"
>
...
@@ -180,6 +187,14 @@
...
@@ -180,6 +187,14 @@
callback
()
callback
()
},
},
handlePhoneCheck
(
rule
,
value
,
callback
)
{
console
.
log
(
'rule:'
,
rule
)
console
.
log
(
'value'
,
value
)
console
.
log
(
'callback'
,
callback
)
callback
()
},
handlePasswordInputClick
()
{
handlePasswordInputClick
()
{
if
(
!
this
.
isMobile
)
{
if
(
!
this
.
isMobile
)
{
this
.
state
.
passwordLevelChecked
=
true
this
.
state
.
passwordLevelChecked
=
true
...
...
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