Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
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
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
杨硕
template_vue
Commits
0933851c
Commit
0933851c
authored
Aug 05, 2023
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回车监听
parent
d9a999ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
basicInfo.vue
src/views/equipment/basicInfo.vue
+20
-6
No files found.
src/views/equipment/basicInfo.vue
View file @
0933851c
...
...
@@ -158,15 +158,17 @@
</el-form-item>
<el-form-item
label=
"ptype"
prop=
"ptype"
>
<el-input
ref=
"input2"
v-model=
"form.ptype"
placeholder=
"请输入ptype"
clearable
:maxlength=
"100"
size=
"small"
@
keyup
.
enter
.
native=
"handelTab(2,$event)"
/>
</el-form-item>
<el-form-item
label=
"prank"
prop=
"prank"
>
<el-input
v-model
.
trim=
"form.prank"
:maxlength=
"9"
placeholder=
"请输入prank"
/>
<el-input
ref=
"input3"
v-model
.
trim=
"form.prank"
:maxlength=
"9"
placeholder=
"请输入prank"
@
keyup
.
enter
.
native=
"handelTab(3,$event)"
/>
</el-form-item>
<el-form-item
label=
"pissb"
prop=
"pissb"
>
<el-select
...
...
@@ -185,10 +187,10 @@
</el-select>
</el-form-item>
<el-form-item
label=
"psm"
prop=
"psm"
>
<el-input
v-model
.
trim=
"form.psm"
:maxlength=
"9"
placeholder=
"请输入psm
"
/>
<el-input
ref=
"input4"
v-model
.
trim=
"form.psm"
:maxlength=
"9"
placeholder=
"请输入psm"
@
keyup
.
enter
.
native=
"handelTab(4,$event)
"
/>
</el-form-item>
<el-form-item
label=
"psy"
prop=
"psy"
>
<el-input
v-model
.
trim=
"form.psy"
:maxlength=
"10"
placeholder=
"请输入psy
"
/>
<el-input
ref=
"input5"
v-model
.
trim=
"form.psy"
:maxlength=
"10"
placeholder=
"请输入psy"
@
keyup
.
enter
.
native=
"handelTab(5,$event)
"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -309,6 +311,12 @@ export default {
})
next
()
},
// 监听回车
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
input1
.
$refs
.
input
.
focus
()
})
},
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
...
...
@@ -322,9 +330,11 @@ export default {
// });
},
methods
:
{
// 初始化要调的接口
init
()
{
this
.
getDict
()
// 回车跳转下一个输入框
focusNextInput
(
form
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
form
].
$refs
.
input
.
focus
()
})
},
// 回车到下一个输入框方法
handelTab
(
i
,
e
)
{
...
...
@@ -337,6 +347,10 @@ export default {
})
}
},
// 初始化要调的接口
init
()
{
this
.
getDict
()
},
/** 查询基础信息列表 */
getList
()
{
this
.
loading
=
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