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
facac2a8
Commit
facac2a8
authored
Nov 25, 2023
by
郁子恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化界面样式,实现下拉列表失去焦点收起
parent
a24ec526
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
71 deletions
+61
-71
App.vue
src/App.vue
+1
-1
collectionTable.vue
src/components/collectionTable.vue
+7
-5
elOutput.vue
src/components/elOutput.vue
+9
-11
elclick.vue
src/components/elclick.vue
+9
-10
onInput.vue
src/components/onInput.vue
+10
-14
pageJavascript.vue
src/components/pageJavascript.vue
+8
-10
pageNavigates.vue
src/components/pageNavigates.vue
+9
-9
sysSleep.vue
src/components/sysSleep.vue
+8
-11
No files found.
src/App.vue
View file @
facac2a8
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</el-button>
</el-button>
</div>
</div>
</div>
</div>
<div
style=
"display: flex;align-items: flex-start;justify-content: space-between;width: 460px;"
>
<div
style=
"display: flex;align-items: flex-start;justify-content: space-between;width: 460px;
height: 36px;
"
>
<!-- 动作标签 -->
<!-- 动作标签 -->
<div
style=
"margin-bottom: 5px;margin-right: 1px;white-space: wrap;display: flex;width: 88%;"
>
<div
style=
"margin-bottom: 5px;margin-right: 1px;white-space: wrap;display: flex;width: 88%;"
>
<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"
>
...
...
src/components/collectionTable.vue
View file @
facac2a8
<
template
>
<
template
>
<div
class=
"collectionTable"
>
<div
class=
"collectionTable"
>
<div
style=
"display: flex;height: 40px;
margin
-left: 15px;text-align: left;align-items: center;justify-content: flex-start;"
>
<div
style=
"display: flex;height: 40px;
padding
-left: 15px;text-align: left;align-items: center;justify-content: flex-start;"
>
<el-button
style=
"width: 60px;height: 30px;"
size=
"mini"
class=
"button-new-tag"
@
click=
"selectElement"
v-if=
"isSelectTable"
>
选择元素
</el-button>
<el-button
style=
"width: 60px;height: 30px;"
size=
"mini"
class=
"button-new-tag"
@
click=
"selectElement"
v-if=
"isSelectTable"
>
选择元素
</el-button>
<el-button
style=
"width: 60px;height: 30px;"
size=
"mini"
class=
"button-new-tag"
@
click=
"columnBack"
v-else
>
返回
</el-button>
<el-button
style=
"width: 60px;height: 30px;"
size=
"mini"
class=
"button-new-tag"
@
click=
"columnBack"
v-else
>
返回
</el-button>
<span
style=
"margin-left: 80px;font-size: 15px;"
v-if=
"isSelectTable"
>
表名:
</span>
<div
style=
"display: flex;"
>
<span
style=
"margin-left: 45px;font-size: 15px;"
v-if=
"isSelectTable"
>
表名:
</span>
<vxe-input
style=
"margin-left: 10px;"
v-if=
"isSelectTable"
v-model=
"tableName"
placeholder=
"请填写表名"
size=
"mini"
></vxe-input>
<vxe-input
style=
"margin-left: 10px;"
v-if=
"isSelectTable"
v-model=
"tableName"
placeholder=
"请填写表名"
size=
"mini"
></vxe-input>
</div>
</div>
<el-button
style=
"padding-right: 15px;"
size=
"small"
class=
"button-new-tag"
@
click=
"getTable"
>
获取表格信息
</el-button>
</div>
<!-- 全部表格信息 -->
<!-- 全部表格信息 -->
<div
style=
"overflow: auto;"
:style=
"
{ width: widthResize + 'px' }">
<div
style=
"overflow: auto;
height: 290px;
"
:style=
"
{ width: widthResize + 'px' }">
<vxe-table
:data=
"SelectTableData"
ref=
"xTableColumn"
border
class=
"mytable-scrollbar"
height=
"250"
v-if=
"isSelectTable"
auto-resize
style=
"margin-bottom: 5px;"
>
<vxe-table
:data=
"SelectTableData"
ref=
"xTableColumn"
border
class=
"mytable-scrollbar"
height=
"250"
v-if=
"isSelectTable"
auto-resize
style=
"margin-bottom: 5px;"
>
<vxe-column
field=
""
title=
"列名"
min-width=
"150"
>
<vxe-column
field=
""
title=
"列名"
min-width=
"150"
>
<template
v-slot=
"
{ row }">
<template
v-slot=
"
{ row }">
...
@@ -46,7 +49,7 @@
...
@@ -46,7 +49,7 @@
<vxe-table-column
show-overflow=
"ellipsis"
v-for=
"(config, index) in tableColumn"
:key=
"index"
v-bind=
"config"
></vxe-table-column>
<vxe-table-column
show-overflow=
"ellipsis"
v-for=
"(config, index) in tableColumn"
:key=
"index"
v-bind=
"config"
></vxe-table-column>
</vxe-table>
</vxe-table>
</div>
</div>
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"getTable"
style=
"position: absolute;bottom: 10px;right: 15px;"
>
获取表格信息
</el-button>
</div>
</div>
</template>
</template>
...
@@ -87,7 +90,6 @@ export default {
...
@@ -87,7 +90,6 @@ export default {
watch
:
{},
watch
:
{},
computed
:
{},
computed
:
{},
methods
:
{
methods
:
{
getTable
()
{
getTable
()
{
let
_this
=
this
let
_this
=
this
_this
.
table
=
new
table
()
_this
.
table
=
new
table
()
...
...
src/components/elOutput.vue
View file @
facac2a8
...
@@ -17,10 +17,6 @@
...
@@ -17,10 +17,6 @@
<el-input
v-model=
"actionConfig.Target.Timeout"
></el-input>
<el-input
v-model=
"actionConfig.Target.Timeout"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 提交按钮 -->
<div
style=
"width: 100%; text-align: right;"
>
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"submit"
style=
"margin-right: 5px;"
>
提交信息
</el-button>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -61,17 +57,19 @@ export default {
...
@@ -61,17 +57,19 @@ export default {
// 在组件销毁前移除事件监听器
// 在组件销毁前移除事件监听器
document
.
removeEventListener
(
'contextmenu'
,
this
.
contextMenuHandler
);
document
.
removeEventListener
(
'contextmenu'
,
this
.
contextMenuHandler
);
},
},
watch
:
{},
watch
:
{
computed
:
{},
actionConfig
:
{
methods
:
{
handler
(
newVal
)
{
// 提交表单信息
submit
()
{
console
.
log
(
this
.
actionConfig
);
// 防止父级改变,子级未改变重新赋值
this
.
activedAction
.
Target
=
this
.
actionConfig
.
Target
;
this
.
activedAction
.
Target
=
this
.
actionConfig
.
Target
;
this
.
activedAction
.
Attributes
=
this
.
actionConfig
.
Attributes
;
this
.
activedAction
.
Attributes
=
this
.
actionConfig
.
Attributes
;
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
console
.
log
(
this
.
activedAction
)
},
},
deep
:
true
}
},
computed
:
{},
methods
:
{
// 获取页面元素方法
// 获取页面元素方法
contextMenuHandler
(
event
)
{
contextMenuHandler
(
event
)
{
event
.
preventDefault
();
// 阻止默认的右击菜单
event
.
preventDefault
();
// 阻止默认的右击菜单
...
...
src/components/elclick.vue
View file @
facac2a8
...
@@ -18,8 +18,6 @@
...
@@ -18,8 +18,6 @@
<el-input
v-model=
"actionConfig.Target.Timeout"
></el-input>
<el-input
v-model=
"actionConfig.Target.Timeout"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 提交按钮 -->
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"submit"
style=
"position: absolute;bottom: 10px;right: 15px;"
>
提交信息
</el-button>
</div>
</div>
</
template
>
</
template
>
...
@@ -53,17 +51,18 @@ export default {
...
@@ -53,17 +51,18 @@ export default {
// 在组件销毁前移除事件监听器
// 在组件销毁前移除事件监听器
document
.
removeEventListener
(
'contextmenu'
,
this
.
contextMenuHandler
);
document
.
removeEventListener
(
'contextmenu'
,
this
.
contextMenuHandler
);
},
},
watch
:
{},
watch
:
{
computed
:
{},
actionConfig
:
{
methods
:
{
handler
(
newVal
)
{
// 提交表单信息
submit
()
{
console
.
log
(
this
.
actionConfig
);
// 防止父级改变,子级未改变重新赋值
this
.
activedAction
.
Target
=
this
.
actionConfig
.
Target
;
this
.
activedAction
.
Target
=
this
.
actionConfig
.
Target
;
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
console
.
log
(
this
.
activedAction
)
},
},
deep
:
true
}
},
computed
:
{},
methods
:
{
// 获取页面元素方法
// 获取页面元素方法
contextMenuHandler
(
event
)
{
contextMenuHandler
(
event
)
{
event
.
preventDefault
();
// 阻止默认的右击菜单
event
.
preventDefault
();
// 阻止默认的右击菜单
...
...
src/components/onInput.vue
View file @
facac2a8
...
@@ -20,10 +20,6 @@
...
@@ -20,10 +20,6 @@
<el-input
v-model=
"actionConfig.Target.Timeout"
></el-input>
<el-input
v-model=
"actionConfig.Target.Timeout"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 提交按钮 -->
<div
style=
"width: 100%; text-align: right;"
>
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"submit"
style=
"margin-right: 5px;"
>
提交信息
</el-button>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -44,8 +40,6 @@ export default {
...
@@ -44,8 +40,6 @@ export default {
},
},
"InputValue"
:
""
,
//输入的内容
"InputValue"
:
""
,
//输入的内容
"Script"
:
null
,
"Script"
:
null
,
"Name"
:
this
.
actionName
,
"Alias"
:
this
.
actionType
},
},
selectDisabled
:
true
// 控制选择按钮的禁用状态
selectDisabled
:
true
// 控制选择按钮的禁用状态
}
}
...
@@ -60,18 +54,20 @@ export default {
...
@@ -60,18 +54,20 @@ export default {
}
}
},
},
mounted
()
{
},
mounted
()
{
},
watch
:
{},
watch
:
{
computed
:
{},
actionConfig
:
{
methods
:
{
handler
(
newVal
)
{
// 提交表单信息
submit
()
{
console
.
log
(
this
.
actionConfig
);
// 防止父级改变,子级未改变重新赋值
this
.
activedAction
.
Target
=
this
.
actionConfig
.
Target
;
this
.
activedAction
.
Target
=
this
.
actionConfig
.
Target
;
this
.
activedAction
.
InputValue
=
this
.
actionConfig
.
InputValue
;
this
.
activedAction
.
InputValue
=
this
.
actionConfig
.
InputValue
;
this
.
activedAction
.
Script
=
this
.
actionConfig
.
Script
;
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
console
.
log
(
this
.
activedAction
)
},
},
deep
:
true
}
},
computed
:
{},
methods
:
{
// 获取页面元素方法
// 获取页面元素方法
contextMenuHandler
(
event
)
{
contextMenuHandler
(
event
)
{
event
.
preventDefault
();
// 阻止默认的右击菜单
event
.
preventDefault
();
// 阻止默认的右击菜单
...
...
src/components/pageJavascript.vue
View file @
facac2a8
...
@@ -6,8 +6,6 @@
...
@@ -6,8 +6,6 @@
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"actionConfig.Script"
></el-input>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"actionConfig.Script"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 提交按钮 -->
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"submit"
style=
"position: absolute;bottom: 10px;right: 15px;"
>
提交信息
</el-button>
</div>
</div>
</
template
>
</
template
>
...
@@ -18,7 +16,6 @@ export default {
...
@@ -18,7 +16,6 @@ export default {
props
:
[
'activedAction'
],
props
:
[
'activedAction'
],
data
()
{
data
()
{
return
{
return
{
elementInfos
:
{},
// 存储当前选中元素的信息
actionConfig
:
{
actionConfig
:
{
"Script"
:
""
,
"Script"
:
""
,
},
},
...
@@ -31,17 +28,18 @@ export default {
...
@@ -31,17 +28,18 @@ export default {
}
}
},
},
mounted
()
{
},
mounted
()
{
},
watch
:
{},
watch
:
{
computed
:
{},
actionConfig
:
{
methods
:
{
handler
(
newVal
)
{
// 提交表单信息
submit
()
{
console
.
log
(
this
.
actionConfig
);
// 防止父级改变,子级未改变重新赋值
this
.
activedAction
.
Script
=
this
.
actionConfig
.
Script
;
this
.
activedAction
.
Script
=
this
.
actionConfig
.
Script
;
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
console
.
log
(
this
.
activedAction
)
},
},
deep
:
true
}
},
},
computed
:
{},
methods
:
{},
};
};
</
script
>
</
script
>
...
...
src/components/pageNavigates.vue
View file @
facac2a8
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
<!-- 获取当前页面地址的按钮 -->
<!-- 获取当前页面地址的按钮 -->
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"getCurrentPageUrl"
style=
"margin-left: 15px;"
>
获取当前页面地址
</el-button>
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"getCurrentPageUrl"
style=
"margin-left: 15px;"
>
获取当前页面地址
</el-button>
</div>
</div>
<!-- 提交信息的按钮 -->
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"submit"
style=
"position: absolute;bottom: 10px;right: 15px;"
>
提交信息
</el-button>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -38,16 +36,18 @@ export default {
...
@@ -38,16 +36,18 @@ export default {
}
}
},
},
mounted
()
{
},
mounted
()
{
},
watch
:
{},
watch
:
{
computed
:
{},
actionConfig
:
{
methods
:
{
handler
(
newVal
)
{
// 提交表单信息的方法
submit
()
{
console
.
log
(
this
.
actionConfig
);
// 防止父级改变,子级未改变重新赋值
this
.
activedAction
.
Url
=
this
.
actionConfig
.
Url
;
this
.
activedAction
.
Url
=
this
.
actionConfig
.
Url
;
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
console
.
log
(
this
.
activedAction
)
},
},
deep
:
true
}
},
computed
:
{},
methods
:
{
// 获取当前页面地址的方法
// 获取当前页面地址的方法
getCurrentPageUrl
(
event
)
{
getCurrentPageUrl
(
event
)
{
// 使用window.location.href获取当前页面地址
// 使用window.location.href获取当前页面地址
...
...
src/components/sysSleep.vue
View file @
facac2a8
...
@@ -7,10 +7,6 @@
...
@@ -7,10 +7,6 @@
<el-input
v-model=
"actionConfig.PauseMilliseconds"
></el-input>
<el-input
v-model=
"actionConfig.PauseMilliseconds"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 提交按钮 -->
<div
style=
"width: 100%; text-align: right;"
>
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"submit"
style=
"margin-right:15px;"
>
提交信息
</el-button>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -33,17 +29,18 @@ export default {
...
@@ -33,17 +29,18 @@ export default {
}
}
},
},
mounted
()
{
},
mounted
()
{
},
watch
:
{},
watch
:
{
computed
:
{},
actionConfig
:
{
methods
:
{
handler
(
newVal
)
{
// 提交表单信息
submit
()
{
console
.
log
(
this
.
actionConfig
);
// 防止父级改变,子级未改变重新赋值
this
.
activedAction
.
PauseMilliseconds
=
this
.
actionConfig
.
PauseMilliseconds
;
this
.
activedAction
.
PauseMilliseconds
=
this
.
actionConfig
.
PauseMilliseconds
;
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
this
.
$emit
(
'dataChanged'
,
this
.
activedAction
);
console
.
log
(
this
.
activedAction
)
},
},
deep
:
true
}
},
},
computed
:
{},
methods
:
{},
};
};
</
script
>
</
script
>
...
...
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