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
9b7dd16f
Commit
9b7dd16f
authored
Nov 23, 2023
by
郁子恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增脚本执行动作
parent
898f23b8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
12 deletions
+52
-12
App.vue
src/App.vue
+3
-3
pageJavascript.vue
src/components/pageJavascript.vue
+49
-9
No files found.
src/App.vue
View file @
9b7dd16f
...
@@ -138,6 +138,9 @@ export default {
...
@@ -138,6 +138,9 @@ export default {
value
:
'el.output'
,
value
:
'el.output'
,
label
:
'取值'
label
:
'取值'
},
{
},
{
value
:
'page.javascipt'
,
label
:
'脚本执行'
},
{
value
:
'collectionTable'
,
value
:
'collectionTable'
,
label
:
'采集表'
label
:
'采集表'
},
{
},
{
...
@@ -153,9 +156,6 @@ export default {
...
@@ -153,9 +156,6 @@ export default {
value
:
'mouseMove'
,
value
:
'mouseMove'
,
label
:
'鼠标移动'
label
:
'鼠标移动'
},
{
},
{
value
:
'page.javascipt'
,
label
:
'脚本执行'
},
{
value
:
'submit'
,
value
:
'submit'
,
label
:
'提交'
label
:
'提交'
},
{
},
{
...
...
src/components/pageJavascript.vue
View file @
9b7dd16f
<
template
>
<
template
>
<div
class=
"pageJavascipt"
>
页面执行
</div>
<div
class=
"pageJavascript"
>
<!-- 表单区域 -->
<el-form
label-position=
"right"
label-width=
"120px"
:model=
"actionConfig"
>
<el-form-item
label=
"JavaScript脚本"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"actionConfig.Script"
></el-input>
</el-form-item>
</el-form>
<!-- 提交按钮 -->
<el-button
size=
"small"
class=
"button-new-tag"
@
click=
"submit"
style=
"position: absolute;bottom: 10px;right: 15px;"
>
提交信息
</el-button>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'pageJavascipt'
,
name
:
'pageJavasc
r
ipt'
,
components
:
{},
components
:
{},
props
:
{}
,
props
:
[
'actionName'
,
'actionType'
,
'dynamicTagObj'
]
,
data
()
{
data
()
{
return
{
return
{
}
elementInfos
:
{},
// 存储当前选中元素的信息
actionConfig
:
{
"Script"
:
""
,
"Name"
:
this
.
actionName
,
"Alias"
:
this
.
actionType
},
};
},
created
()
{
console
.
log
(
this
.
dynamicTagObj
);
if
(
Object
.
keys
(
this
.
dynamicTagObj
.
actionConfigs
).
length
==
0
)
return
this
.
actionConfig
=
this
.
dynamicTagObj
.
actionConfigs
},
},
created
()
{
},
mounted
()
{
},
mounted
()
{
},
watch
:
{},
watch
:
{},
computed
:
{},
computed
:
{},
methods
:
{},
methods
:
{
}
// 提交表单信息
submit
()
{
console
.
log
(
this
.
actionConfig
);
// 防止父级改变,子级未改变重新赋值
this
.
actionConfig
.
Name
=
this
.
actionName
;
this
.
actionConfig
.
Alias
=
this
.
actionType
;
this
.
$emit
(
'dataChanged'
,
this
.
actionConfig
);
},
},
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
\ No newline at end of file
<
style
scoped
>
.el-form-item
{
margin-bottom
:
0
;
padding-top
:
20px
;
margin-right
:
15px
;
}
.tooltips
button
{
width
:
60px
!important
;
height
:
30px
!important
;
}
</
style
>
\ No newline at end of file
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