Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
Project
Project
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
lihuizhen
ec-report-refactor
Commits
60654108
Commit
60654108
authored
Nov 11, 2024
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: login input componment
parent
cbe5f611
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
login.vue
pages/login/login.vue
+20
-4
No files found.
pages/login/login.vue
View file @
60654108
...
...
@@ -3,10 +3,12 @@
<view
class=
"content"
>
<u-form
ref=
"uForm"
:model=
"params"
:error-type=
"['toast']"
:label-width=
"200"
>
<u-form-item
label=
"用户名"
prop=
"userName"
>
<u-input
v-model=
"params.userName"
placeholder=
"请输入用户名"
type=
"text"
/>
<!--
<u-input
v-model=
"params.userName"
placeholder=
"请输入用户名"
type=
"text"
@
blur=
"blurUsername()"
/>
-->
<input
placeholder=
"请输入用户名"
type=
"text"
@
input=
"changeUsername"
/>
</u-form-item>
<u-form-item
label=
"密码"
prop=
"password"
>
<u-input
v-model=
"params.password"
placeholder=
"请输入密码"
type=
"password"
:password-icon=
"true"
/>
<!--
<u-input
v-model=
"params.password"
placeholder=
"请输入密码"
type=
"password"
:password-icon=
"true"
@
blur=
"blurPassword()"
/>
-->
<input
placeholder=
"请输入密码"
type=
"text"
:password=
"true"
@
input=
"changePassword"
/>
</u-form-item>
<u-form-item
label=
"员工号(选填)"
prop=
"staffNo"
>
<u-input
v-model=
"params.staffNo"
placeholder=
"填写员工号可以更精确的获取权限"
type=
"number"
/>
...
...
@@ -52,11 +54,25 @@
}
},
computed
:
{
submitDisabled
()
{
submitDisabled
()
{
return
this
.
params
.
userName
&&
this
.
params
.
password
}
},
methods
:
{
methods
:
{
// submitDisabled() {
// console.log(this.params)
// return this.params.userName && this.params.password
// },
changeUsername
(
event
)
{
console
.
log
(
event
)
this
.
params
.
userName
=
event
.
detail
.
value
},
changePassword
(
event
)
{
this
.
params
.
password
=
event
.
detail
.
value
console
.
log
(
event
)
},
// 登录
submit
(
type
)
{
this
.
$refs
.
uForm
.
validate
(
async
valid
=>
{
...
...
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