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
0510a583
Commit
0510a583
authored
Dec 04, 2023
by
高源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化table
parent
a0b8da4d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
24 deletions
+43
-24
App.vue
src/App.vue
+42
-24
collectionTable.vue
src/components/collectionTable.vue
+0
-0
sdk-table.js
src/sdk-table.js
+1
-0
No files found.
src/App.vue
View file @
0510a583
...
...
@@ -17,7 +17,8 @@
</div>
<div
style=
"width: 40%;display: flex; flex-direction: row;justify-content: flex-end;"
>
<el-button
size=
"mini"
style=
"width: 50px;height: 20px;margin-right: 5px;"
>
导入任务
</el-button>
<el-button
size=
"mini"
style=
"width: 50px;height: 20px;margin-right: 5px;"
@
click=
"exportJson"
>
导出任务
</el-button>
<el-button
size=
"mini"
style=
"width: 50px;height: 20px;margin-right: 5px;"
@
click=
"exportJson"
>
导出任务
</el-button>
<el-button
size=
"mini"
style=
"width: 50px;height: 20px;margin-right: 15px;"
>
保存任务
</el-button>
</div>
</div>
...
...
@@ -28,30 +29,40 @@
<span
style=
"width: 63px;padding-left: 15px;font-size: 13px;"
>
动作集合:
</span>
<div
class=
"scroll-container"
@
wheel=
"handleScroll"
style=
"width: 325px;padding-left: 5px;"
>
<div
class=
"scroll-content"
>
<span
id=
"Breadcrumb"
@
click=
"onBreadcrumb(item)"
v-for=
"item in currentActionsParents"
:key=
"item.tagId"
:style=
"
{ color: item == currentAction ? '#68C23A!important' : '#409EFF' }">
{{
item
.
Name
}}
>
</span>
<span
id=
"Breadcrumb"
@
click=
"onBreadcrumb(item)"
v-for=
"item in currentActionsParents"
:key=
"item.tagId"
:style=
"
{ color: item == currentAction ? '#68C23A!important' : '#409EFF' }">
{{
item
.
Name
}}
>
</span>
</div>
</div>
</div>
<div
style=
"width: 10%;margin-right: 15px;display:flex;align-items: center;justify-content: flex-end;"
>
<el-button
:disabled=
"state"
type=
"primary"
size=
"mini"
style=
"width: 20px;height: 20px;"
@
click=
"newAction"
id=
"addButton"
>
<el-button
:disabled=
"state"
type=
"primary"
size=
"mini"
style=
"width: 20px;height: 20px;"
@
click=
"newAction"
id=
"addButton"
>
<img
style=
"width: 12px;height: 12px;"
src=
"./assets/add.svg"
id=
"addImg"
>
</el-button>
</div>
</div>
<div
style=
"display: flex;align-items: flex-start;justify-content: space-between;width: 460px;min-height: 36px;"
>
<div
style=
"display: flex;align-items: flex-start;justify-content: space-between;width: 460px;min-height: 36px;"
>
<!-- 动作标签 -->
<div
style=
"margin-bottom: 5px;margin-right: 15px;white-space: wrap;display: flex;width: 100%;"
>
<draggable
v-model=
"currentAction.actions"
chosenClass=
"chosen"
forceFallback=
"true"
group=
"people"
animation=
"1000"
@
start=
"onStart"
@
end=
"onEnd"
>
<draggable
v-model=
"currentAction.actions"
chosenClass=
"chosen"
forceFallback=
"true"
group=
"people"
animation=
"1000"
@
start=
"onStart"
@
end=
"onEnd"
>
<transition-group>
<el-tag
class=
"boxtags"
v-for=
"(action, index) in currentAction.actions"
@
click=
"selectTag(action)"
:style=
"
{ backgroundColor: action == activedAction ? '#68C23A!important' : '#409EFF' }" :key="action.tagId">
<el-tag
class=
"boxtags"
v-for=
"(action, index) in currentAction.actions"
@
click=
"selectTag(action)"
:style=
"
{ backgroundColor: action == activedAction ? '#68C23A!important' : '#409EFF' }"
:key="action.tagId">
<div
style=
"display: flex;align-items: center;height: 25px;position: relative;"
>
<span
style=
"min-width: 40px;display: flex;align-items: center;"
>
<div
class=
"circle"
>
{{
index
+
1
}}
</div>
<span
style=
"margin-left: 2px;"
>
{{
action
.
Name
}}
</span>
</span>
<img
id=
"closeimg"
@
click=
"handleClose(action)"
style=
"width: 17px;position: absolute;top: -6px;right: -16px;"
src=
"./assets/close.svg"
>
<img
id=
"closeimg"
@
click=
"handleClose(action)"
style=
"width: 17px;position: absolute;top: -6px;right: -16px;"
src=
"./assets/close.svg"
>
</div>
</el-tag>
</transition-group>
...
...
@@ -61,28 +72,36 @@
<el-divider></el-divider>
<!-- 容器配置 -->
<div
v-if=
"isShowAction"
>
<div
style=
"height: 35px;width: 100%;display: flex;justify-content: space-between;align-items: center;border-bottom: 1px solid rgb(165 165 165);"
>
<div
style=
"width: 50%;height: 100%;display: flex;align-items: center;"
>
<span
style=
"width: 59px;padding-left: 15px;"
>
动作名称:
</span>
<div>
<el-input
class=
"input-new-tag dongzuo"
v-model=
"activedAction.Name"
size=
"small"
placeholder=
"请输入动作名称"
>
</el-input>
</div>
</div>
<div
style=
"width: 50%;height: 100%;padding-left: 10px;display: flex;align-items: center;justify-content: flex-start;"
>
<div
style=
"height: 35px;width: 100%;display: flex;justify-content: space-between;align-items: center;border-bottom: 1px solid rgb(165 165 165);"
>
<div
style=
"width: 50%;height: 100%;padding-left: 15px;display: flex;align-items: center;justify-content: flex-start;"
>
<span
style=
"width: 65px;"
>
动作类型:
</span>
<div>
<el-select
id=
"eventType"
name=
"eventType"
v-model=
"activedAction.Alias"
placeholder=
"请选择类型"
@
change=
"handleChange"
@
visible-change=
"handleVisibleChange"
ref=
"mySelect"
filterable
remote
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
<el-select
id=
"eventType"
name=
"eventType"
v-model=
"activedAction.Alias"
placeholder=
"请选择类型"
@
change=
"handleChange"
@
visible-change=
"handleVisibleChange"
ref=
"mySelect"
filterable
remote
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
</div>
<div
style=
"width: 50%;height: 100%;display: flex;align-items: center;"
>
<span
style=
"width: 59px;"
>
动作名称:
</span>
<div>
<el-input
class=
"input-new-tag dongzuo"
v-model=
"activedAction.Name"
size=
"small"
placeholder=
"请输入动作名称"
>
</el-input>
</div>
</div>
</div>
<div
style=
"margin-left: 15px;margin-top: 10px;"
v-if=
"activedAction.Alias == 'actions'"
>
<el-button
style=
"width: 60px !important;height: 20px !important;"
@
click=
"toActions"
>
进入容器
</el-button>
</div>
<component
:is=
"dynamicComponent"
@
dataChanged=
"handleDataChange"
:activedAction=
"activedAction"
:widthResize=
"widthResize"
v-if=
"activedAction.Alias !== ''"
>
<component
:is=
"dynamicComponent"
@
dataChanged=
"handleDataChange"
:activedAction=
"activedAction"
:widthResize=
"widthResize"
v-if=
"activedAction.Alias !== ''"
>
</component>
</div>
</div>
...
...
@@ -580,7 +599,7 @@ export default {
}
.el-select
.el-input__inner
{
width
:
1
45
px
!important
;
width
:
1
20
px
!important
;
}
...
...
@@ -679,5 +698,4 @@ export default {
/*选中样式*/
.chosen
{
border
:
solid
2px
#3089dc
!important
;
}
</
style
>
}
</
style
>
src/components/collectionTable.vue
View file @
0510a583
This diff is collapsed.
Click to expand it.
src/sdk-table.js
View file @
0510a583
...
...
@@ -50,6 +50,7 @@ function table () {
while
(
tableXpathArray
.
length
>
0
)
{
this
.
cells
.
forEach
(
cell
=>
cell
.
updateRelativePath
(
tableXpathArray
));
//先对所有的Cell更新下相对路径
if
(
this
.
cells
.
every
(
cell
=>
cell
.
isExist
()))
break
;
//如果每个cell都存在,成功
if
(
tableXpathArray
[
tableXpathArray
.
length
-
1
]
==
'HTML'
)
return
tableXpathArray
.
pop
();
//向上一级找
}
if
(
tableXpathArray
.
length
<
1
)
return
_isVerified
;
//如果没有共同父节点,返回false
...
...
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