Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
HireTest
VueElementTemplate
Commits
89863a41
Commit
89863a41
authored
Mar 08, 2018
by
=
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断空
parent
f639af49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
19 deletions
+65
-19
HmLogin.vue
src/views/haomo/pages/login/HmLogin.vue
+53
-17
index.vue
src/views/haomo/pages/login/index.vue
+12
-2
No files found.
src/views/haomo/pages/login/HmLogin.vue
View file @
89863a41
<
template
>
<el-row
type=
"flex"
>
<el-col
:span=
"10"
class=
"detail-content"
style=
"margin:0 auto"
>
<el-form
style=
"border: 0.5px solid #e6ebf5"
>
<el-col
:span=
"options.span"
class=
"detail-content"
style=
"margin:0 auto;border: 0.5px solid #e6ebf5"
>
<el-row
type=
"flex"
>
<el-col
style=
"height: 45px;background-color: #00BF8B"
></el-col>
</el-row>
<el-row
type=
"flex"
style=
"margin-top:35
px"
>
<el-row
type=
"flex"
style=
"margin-top:30
px"
>
<el-col
style=
"margin: 0 auto;height: 70px;width:433px;text-align: center;line-height: 70px;font-size: 35px;color:#586C8C;font-weight: bold"
>
<img
/>
张家口人民检察院
</el-col>
</el-row>
<el-form-item
prop=
"pass"
>
<el-input
class=
"style"
style=
"width:433px;margin: 0 auto;margin-top:25px;display: block;"
prefix-icon=
"el-icon-search"
auto-complete=
"off"
></el-input>
<el-form
:model=
"hm_form"
status-icon
:rules=
"rules2"
ref=
"hm_form"
style=
"width: 433px;margin: 0 auto;"
>
<el-form-item
prop=
"account"
>
<el-input
class=
"style"
placeholder=
"请输入账号"
v-model=
"hm_form.account"
style=
"margin-top:25px;display: block;"
prefix-icon=
"el-icon-search"
auto-complete=
"off"
></el-input>
</el-form-item>
<el-form-item
prop=
"
checkP
ass"
>
<el-input
type=
"password"
style=
"width:433px;margin: 0 auto;
display: block;border-width: 0px;border-bottom-width: 1px;border-radius: 0px;"
prefix-icon=
"el-icon-search"
suffix-icon=
"el-icon-view"
auto-complete=
"off"
></el-input>
<el-form-item
prop=
"
p
ass"
>
<el-input
type=
"password"
placeholder=
"请输入密码"
v-model=
"hm_form.pass"
style=
"
display: block;border-width: 0px;border-bottom-width: 1px;border-radius: 0px;"
prefix-icon=
"el-icon-search"
suffix-icon=
"el-icon-view"
auto-complete=
"off"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"success"
style=
"width: 178px;height: 44px ;font-size:16px;background-color: #00BF8B;margin: 0 auto;display: block"
>
提交
</el-button>
<el-button
type=
"success"
@
click=
"submitForm('hm_form',options)"
style=
"width: 178px;height: 44px ;font-size:16px;background-color: #00BF8B;margin: 0 auto;display: block"
>
提交
</el-button>
</el-form-item>
</el-form>
</el-col>
...
...
@@ -38,7 +38,34 @@
}
},
data
()
{
var
account
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'请输入账号'
))
}
else
{
callback
()
}
}
var
pass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'请输入密码'
))
}
else
{
callback
()
}
}
return
{
hm_form
:
{
account
:
''
,
pass
:
''
},
rules2
:
{
account
:
[
{
validator
:
account
,
trigger
:
'blur'
}
],
pass
:
[
{
validator
:
pass
,
trigger
:
'blur'
}
]
}
}
},
computed
:
{
},
...
...
@@ -47,7 +74,16 @@
created
()
{
},
methods
:
{
submitForm
(
formName
,
callback
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
alert
(
'submit!'
+
JSON
.
stringify
(
callback
))
}
else
{
console
.
log
(
'error submit!!'
)
return
false
}
})
}
}
}
</
script
>
...
...
src/views/haomo/pages/login/index.vue
View file @
89863a41
<
template
>
<div>
<hm-login></hm-login>
<hm-login
:options=
"options"
></hm-login>
</div>
</
template
>
...
...
@@ -21,8 +21,18 @@
filters
:
{
},
created
()
{
this
.
options
=
{
spx
:
function
(
account
,
pass
)
{
alert
(
account
+
pass
)
},
methods
:
{}
span
:
10
}
},
methods
:
{
test
:
function
()
{
alert
(
4
)
}
}
}
</
script
>
<
style
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