Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
Vue-WebDriver
Project
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
高源
Vue-WebDriver
Commits
ae58854c
Commit
ae58854c
authored
Nov 28, 2023
by
郁子恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
6ad9d76e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
27 deletions
+15
-27
App.vue
src/App.vue
+3
-24
collectionForm.vue
src/components/collectionForm.vue
+12
-3
No files found.
src/App.vue
View file @
ae58854c
...
@@ -276,31 +276,10 @@ export default {
...
@@ -276,31 +276,10 @@ export default {
// 将新动作添加到动作列表中
// 将新动作添加到动作列表中
parent
.
actions
.
push
(
rtns
);
parent
.
actions
.
push
(
rtns
);
// 返回新动作
// 返回新动作
return
rtns
;
if
(
this
.
currentAction
.
actions
.
length
>=
15
)
{
},
alert
(
'创建动作上限'
);
initActionParent
(
action
)
{
this
.
state
=
true
;
if
(
action
.
actions
===
null
||
action
.
actions
===
undefined
||
action
.
actions
.
length
===
0
)
return
;
action
.
actions
.
forEach
(
a
=>
{
a
.
parent
=
action
;
this
.
initActionParent
(
a
);
});
},
getActionParents
(
action
)
{
let
parents
=
[];
parents
.
push
(
action
);
while
(
action
.
parent
)
{
parents
.
push
(
action
.
parent
);
action
=
action
.
parent
;
}
}
return
parents
.
reverse
();
},
createNewAction
(
parent
)
{
let
rtns
=
{};
rtns
.
Name
=
"新建动作"
;
rtns
.
parent
=
parent
;
rtns
.
tagId
=
this
.
tagId
++
;
parent
.
actions
=
parent
.
actions
||
[];
parent
.
actions
.
push
(
rtns
);
return
rtns
;
return
rtns
;
},
},
// 新建动作
// 新建动作
...
...
src/components/collectionForm.vue
View file @
ae58854c
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</div>
</div>
<!-- 全部表格信息 -->
<!-- 全部表格信息 -->
<div
style=
"overflow: auto;height: 230px;"
:style=
"
{ width: widthResize + 'px' }">
<div
style=
"overflow: auto;height: 230px;"
:style=
"
{ width: widthResize + 'px' }">
<vxe-table
:data=
"SelectFormData"
ref=
"x
Table
Column"
border
class=
"mytable-scrollbar"
height=
"220"
auto-resize
style=
"margin-bottom: 5px;"
@
current-change=
"currentChangeEvent"
highlight-hover-row
highlight-current-row
>
<vxe-table
:data=
"SelectFormData"
ref=
"x
Form
Column"
border
class=
"mytable-scrollbar"
height=
"220"
auto-resize
style=
"margin-bottom: 5px;"
@
current-change=
"currentChangeEvent"
highlight-hover-row
highlight-current-row
>
<vxe-column
field=
""
min-width=
"150"
>
<vxe-column
field=
""
min-width=
"150"
>
<template
#
header
>
<template
#
header
>
<span
style=
"font-size: 13px;"
>
属性名
</span>
<span
style=
"font-size: 13px;"
>
属性名
</span>
...
@@ -87,6 +87,13 @@ export default {
...
@@ -87,6 +87,13 @@ export default {
return
;
return
;
// 移除监听器的代码已经移动到函数开头
// 移除监听器的代码已经移动到函数开头
}
}
if
(
event
.
target
.
id
==
'closeimg'
)
{
_this
.
setElementBackgroundColor
(
_this
.
selectedRow
.
xpath
,
''
);
_this
.
selectedRow
=
null
;
document
.
removeEventListener
(
'click'
,
handleClick
);
return
;
// 移除监听器的代码已经移动到函数开头
}
});
});
},
},
watch
:
{
watch
:
{
...
@@ -116,7 +123,7 @@ export default {
...
@@ -116,7 +123,7 @@ export default {
_this
.
setElementBackgroundColor
(
row
.
xpath
,
''
)
_this
.
setElementBackgroundColor
(
row
.
xpath
,
''
)
// 将表格最后一个选中,添加背景色
// 将表格最后一个选中,添加背景色
if
(
_this
.
SelectFormData
.
length
>
0
)
{
if
(
_this
.
SelectFormData
.
length
>
0
)
{
_this
.
$refs
.
x
Table
Column
.
setCurrentRow
(
_this
.
SelectFormData
[
_this
.
SelectFormData
.
length
-
1
])
_this
.
$refs
.
x
Form
Column
.
setCurrentRow
(
_this
.
SelectFormData
[
_this
.
SelectFormData
.
length
-
1
])
_this
.
setElementBackgroundColor
(
_this
.
SelectFormData
[
_this
.
SelectFormData
.
length
-
1
].
xpath
,
'#68C23A'
)
_this
.
setElementBackgroundColor
(
_this
.
SelectFormData
[
_this
.
SelectFormData
.
length
-
1
].
xpath
,
'#68C23A'
)
}
}
if
(
_this
.
table
==
null
)
return
if
(
_this
.
table
==
null
)
return
...
@@ -201,7 +208,9 @@ export default {
...
@@ -201,7 +208,9 @@ export default {
info
.
type
=
''
info
.
type
=
''
_this
.
SelectFormData
.
push
(
info
)
_this
.
SelectFormData
.
push
(
info
)
// 将新加入的tableData添加高亮
// 将新加入的tableData添加高亮
_this
.
$refs
.
xTableColumn
.
setCurrentRow
(
_this
.
SelectFormData
[
_this
.
SelectFormData
.
length
-
1
])
if
(
_this
.
$refs
.
xFormColumn
!=
undefined
)
{
_this
.
$refs
.
xFormColumn
.
setCurrentRow
(
_this
.
SelectFormData
[
_this
.
SelectFormData
.
length
-
1
])
}
// 移除先前元素的背景色(如果有)
// 移除先前元素的背景色(如果有)
if
(
window
.
currentlyHighlighted
)
{
if
(
window
.
currentlyHighlighted
)
{
window
.
currentlyHighlighted
.
style
.
backgroundColor
=
''
;
window
.
currentlyHighlighted
.
style
.
backgroundColor
=
''
;
...
...
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