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
a26f01c8
Commit
a26f01c8
authored
Nov 21, 2023
by
郁子恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化数据传递
parent
3e1ffeb4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
elOutput.vue
src/components/elOutput.vue
+7
-3
elclick.vue
src/components/elclick.vue
+10
-3
sysSleep.vue
src/components/sysSleep.vue
+6
-2
No files found.
src/components/elOutput.vue
View file @
a26f01c8
...
...
@@ -28,7 +28,7 @@
export
default
{
name
:
'elOutput'
,
components
:
{},
props
:
[
'actionName'
,
'actionType'
],
props
:
[
'actionName'
,
'actionType'
,
'dynamicTagObj'
],
data
()
{
return
{
elementInfos
:
{},
// 存储当前选中元素的信息
...
...
@@ -46,7 +46,11 @@ export default {
},
};
},
created
()
{
},
created
()
{
console
.
log
(
this
.
dynamicTagObj
);
if
(
Object
.
keys
(
this
.
dynamicTagObj
.
actionConfigs
).
length
==
0
)
return
this
.
actionConfig
=
this
.
dynamicTagObj
.
actionConfigs
},
mounted
()
{
// 在组件挂载后调用selectElement来添加事件监听器
this
.
selectElement
();
...
...
@@ -77,7 +81,7 @@ export default {
};
this
.
elementInfos
=
elementInfo
;
this
.
actionConfig
.
Target
.
Xpath
=
elementInfo
.
Xpath
;
this
.
actionConfig
.
Attributes
.
innerText
=
element
.
inner
Text
;
this
.
actionConfig
.
Attributes
.
innerText
=
element
Info
.
Text
;
// 移除事件监听器
document
.
removeEventListener
(
'contextmenu'
,
this
.
contextMenuHandler
);
},
...
...
src/components/elclick.vue
View file @
a26f01c8
...
...
@@ -12,7 +12,7 @@
<el-input
v-model=
"actionConfig.Target.Type"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"内容"
>
<el-input
v-model=
"
elementInfos.
Text"
disabled
></el-input>
<el-input
v-model=
"
actionConfig.Target.Inner
Text"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"查询时间"
>
<el-input
v-model=
"actionConfig.Target.Timeout"
></el-input>
...
...
@@ -29,7 +29,7 @@
export
default
{
name
:
'elClick'
,
components
:
{},
props
:
[
'actionName'
,
'actionType'
],
props
:
[
'actionName'
,
'actionType'
,
'dynamicTagObj'
],
data
()
{
return
{
elementInfos
:
{},
// 存储当前选中元素的信息
...
...
@@ -37,6 +37,7 @@ export default {
"Target"
:
{
"Type"
:
"xpath"
,
"Xpath"
:
""
,
"InnerText"
:
""
,
"Timeout"
:
5000
},
"Name"
:
this
.
actionName
,
...
...
@@ -44,7 +45,11 @@ export default {
},
};
},
created
()
{
},
created
()
{
console
.
log
(
this
.
dynamicTagObj
);
if
(
Object
.
keys
(
this
.
dynamicTagObj
.
actionConfigs
).
length
==
0
)
return
this
.
actionConfig
=
this
.
dynamicTagObj
.
actionConfigs
},
mounted
()
{
},
beforeDestroy
()
{
// 在组件销毁前移除事件监听器
...
...
@@ -72,6 +77,8 @@ export default {
};
this
.
elementInfos
=
elementInfo
;
this
.
actionConfig
.
Target
.
Xpath
=
elementInfo
.
Xpath
;
this
.
actionConfig
.
Target
.
InnerText
=
elementInfo
.
Text
;
console
.
log
(
element
.
innerText
);
// 移除事件监听器
document
.
removeEventListener
(
'contextmenu'
,
this
.
contextMenuHandler
);
},
...
...
src/components/sysSleep.vue
View file @
a26f01c8
...
...
@@ -18,7 +18,7 @@
export
default
{
name
:
'sysSleep'
,
components
:
{},
props
:
[
'actionName'
,
'actionType'
],
props
:
[
'actionName'
,
'actionType'
,
'dynamicTagObj'
],
data
()
{
return
{
actionConfig
:
{
...
...
@@ -28,7 +28,11 @@ export default {
},
};
},
created
()
{
},
created
()
{
console
.
log
(
this
.
dynamicTagObj
);
if
(
Object
.
keys
(
this
.
dynamicTagObj
.
actionConfigs
).
length
==
0
)
return
this
.
actionConfig
=
this
.
dynamicTagObj
.
actionConfigs
},
mounted
()
{
},
watch
:
{},
computed
:
{},
...
...
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