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
dd0a0633
Commit
dd0a0633
authored
Dec 04, 2023
by
高源
Browse files
Options
Browse Files
Download
Plain Diff
优化
parents
0510a583
5509792c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
collectionTable.vue
src/components/collectionTable.vue
+22
-20
No files found.
src/components/collectionTable.vue
View file @
dd0a0633
<
template
>
<
template
>
<div
class=
"collectionTable"
>
<div
class=
"collectionTable"
>
<div
<div
style=
"display: flex;height: 25px;padding-left: 15px;text-align: left;align-items: center;justify-content: space-between;"
>
style=
"display: flex;height: 25px;padding-left: 15px;text-align: left;align-items: center;justify-content: space-between;"
>
<template
v-if=
"isSelectTable"
>
<template
v-if=
"isSelectTable"
>
<!--
<el-tooltip
class=
"item"
effect=
"dark"
content=
"点击新增,右击页面元素添加数据"
placement=
"top"
>
<!--
<el-tooltip
class=
"item"
effect=
"dark"
content=
"点击新增,右击页面元素添加数据"
placement=
"top"
>
<el-button
type=
"primary"
size=
"mini"
style=
"width: 40px;height: 20px;"
@
click=
"selectElement"
<el-button
type=
"primary"
size=
"mini"
style=
"width: 40px;height: 20px;"
@
click=
"selectElement"
...
@@ -13,23 +12,21 @@
...
@@ -13,23 +12,21 @@
<!--
<el-button
style=
"width: 50px;height: 20px;"
size=
"small"
class=
"button-new-tag"
@
click=
"cancelSelect"
<!--
<el-button
style=
"width: 50px;height: 20px;"
size=
"small"
class=
"button-new-tag"
@
click=
"cancelSelect"
v-if=
"selectTable"
>
取消选择
</el-button>
-->
v-if=
"selectTable"
>
取消选择
</el-button>
-->
</
template
>
</
template
>
<el-button
style=
"width: 50px;height: 20px;"
size=
"mini"
class=
"button-new-tag"
@
click=
"columnBack"
<el-button
style=
"width: 50px;height: 20px;"
size=
"mini"
class=
"button-new-tag"
@
click=
"columnBack"
v-else
>
返回
</el-button>
v-else
>
返回
</el-button>
<div
style=
"display: flex;align-items: center;"
>
<div
style=
"display: flex;align-items: center;"
>
<span
style=
"font-size: 13px;"
v-if=
"isSelectTable"
>
表格名称:
</span>
<span
style=
"font-size: 13px;"
v-if=
"isSelectTable"
>
表格名称:
</span>
<vxe-input
style=
"margin-left: 10px;"
v-if=
"isSelectTable"
v-model=
"tableName"
placeholder=
"请填写表名"
<vxe-input
style=
"margin-left: 13px;"
v-if=
"isSelectTable"
v-model=
"tableName"
placeholder=
"请填写表名"
size=
"mini"
></vxe-input>
size=
"mini"
></vxe-input>
</div>
</div>
<!-- <el-button style="padding-right: 15px;" size="small" class="button-new-tag" @click="getTable" v-if="isSelectTable">获取表格信息</el-button> -->
<!-- <el-button style="padding-right: 15px;" size="small" class="button-new-tag" @click="getTable" v-if="isSelectTable">获取表格信息</el-button> -->
<el-button
size=
"mini"
style=
"width: 74px;height: 20px;margin-right: 7px;"
@
click=
"getTable"
<el-button
size=
"mini"
style=
"width: 74px;height: 20px;margin-right: 7px;"
@
click=
"getTable"
v-if=
"isSelectTable"
>
获取表格信息
</el-button>
v-if=
"isSelectTable"
>
获取表格信息
</el-button>
</div>
</div>
<!-- 全部表格信息 -->
<!-- 全部表格信息 -->
<div
style=
"overflow: auto;height: 230px;"
:style=
"{ width: widthResize + 'px' }"
>
<div
style=
"overflow: auto;height: 230px;"
:style=
"{ width: widthResize + 'px' }"
>
git
<vxe-table
:data=
"selectTableData"
ref=
"xTableColumn"
border
class=
"mytable-scrollbar"
height=
"220"
<vxe-table
:data=
"selectTableData"
ref=
"xTableColumn"
border
class=
"mytable-scrollbar"
height=
"220"
v-if=
"isSelectTable"
auto-resize
style=
"margin-bottom: 5px;"
@
current-change=
"currentChangeEvent"
v-if=
"isSelectTable"
auto-resize
style=
"margin-bottom: 5px;"
@
current-change=
"currentChangeEvent"
highlight-hover-row
highlight-current-row
>
highlight-hover-row
highlight-current-row
>
<vxe-column
field=
""
min-width=
"130"
>
<vxe-column
field=
""
min-width=
"130"
>
<
template
#
header
>
<
template
#
header
>
<span
style=
"font-size: 13px;"
>
列名
</span>
<span
style=
"font-size: 13px;"
>
列名
</span>
</
template
>
</
template
>
...
@@ -55,13 +52,10 @@
...
@@ -55,13 +52,10 @@
</
template
>
</
template
>
<
template
v-slot=
"{ row }"
>
<
template
v-slot=
"{ row }"
>
<div
style=
"display: flex;flex-direction: column;"
v-if=
"row.xpath !== ''"
>
<div
style=
"display: flex;flex-direction: column;"
v-if=
"row.xpath !== ''"
>
<el-select
style=
"height: 28px;"
v-model=
"row.type"
placeholder=
"选择值类型"
<el-select
style=
"height: 28px;"
v-model=
"row.type"
placeholder=
"选择值类型"
v-if=
"row.typeOptions.length > 1"
:popper-append-to-body=
"false"
filterable
remote
>
v-if=
"row.typeOptions.length > 1"
:popper-append-to-body=
"false"
filterable
remote
>
<el-option
v-for=
"num in row.typeOptions"
:key=
"num.xpath"
:value=
"num.label"
:label=
"num.value"
></el-option>
<el-option
v-for=
"num in row.typeOptions"
:key=
"num.xpath"
:value=
"num.label"
:label=
"num.value"
></el-option>
</el-select>
</el-select>
<vxe-input
style=
"width: 100% !important;"
v-model=
"row.type"
<vxe-input
style=
"width: 100% !important;"
v-model=
"row.type"
:placeholder=
"row.typeOptions[0].value"
size=
"mini"
v-else
disabled
></vxe-input>
:placeholder=
"row.typeOptions[0].value"
size=
"mini"
v-else
disabled
></vxe-input>
</div>
</div>
</
template
>
</
template
>
</vxe-column>
</vxe-column>
...
@@ -70,23 +64,24 @@
...
@@ -70,23 +64,24 @@
<span
style=
"font-size: 13px;"
>
操作
</span>
<span
style=
"font-size: 13px;"
>
操作
</span>
</
template
>
</
template
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
<<<<<<<
HEAD
<img
style=
"width: 38px;height: 28px;vertical-align: bottom;cursor: pointer;"
<img
style=
"width: 38px;height: 28px;vertical-align: bottom;cursor: pointer;"
src=
"../assets/close.svg"
@
click
.
stop=
"columnDelete(row)"
v-if=
"row.xpath !== ''"
>
src=
"../assets/close.svg"
@
click
.
stop=
"columnDelete(row)"
v-if=
"row.xpath !== ''"
>
=======
<img
style=
"width: 38px;height: 28px;vertical-align: bottom;cursor: pointer;"
src=
"../assets/close.svg"
@
click
.
stop=
"columnDelete(row)"
v-if=
"row.xpath !== ''"
>
>>>>>>> 5509792c37aa1abff718eb8e1a32b1f5cb234afd
<template
v-else
>
<template
v-else
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"点击按钮,右击页面元素添加数据"
placement=
"top"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"点击按钮,右击页面元素添加数据"
placement=
"top"
>
<img
style=
"width: 24px;height: 24px;vertical-align: bottom;cursor: pointer;background-color: transparent;"
<img
style=
"width: 24px;height: 24px;vertical-align: bottom;cursor: pointer;background-color: transparent;"
src=
"../assets/addTable.svg"
@
click
.
stop=
"selectElement"
>
src=
"../assets/addTable.svg"
@
click
.
stop=
"selectElement"
>
</el-tooltip>
</el-tooltip>
</
template
>
</
template
>
</template>
</template>
</vxe-column>
</vxe-column>
</vxe-table>
</vxe-table>
<vxe-table
:data=
"tableData"
ref=
"xTable"
border
class=
"mytable-scrollbar"
height=
"220"
v-else
>
<vxe-table
:data=
"tableData"
ref=
"xTable"
border
class=
"mytable-scrollbar"
height=
"220"
v-else
>
<vxe-table-column
show-overflow=
"ellipsis"
v-for=
"(config, index) in tableColumn"
:key=
"index"
<vxe-table-column
show-overflow=
"ellipsis"
v-for=
"(config, index) in tableColumn"
:key=
"index"
v-bind=
"config"
></vxe-table-column>
v-bind=
"config"
></vxe-table-column>
</vxe-table>
</vxe-table>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -273,10 +268,17 @@ export default {
...
@@ -273,10 +268,17 @@ export default {
info
.
title
=
'columnName'
info
.
title
=
'columnName'
_this
.
selectTableData
.
unshift
(
info
)
_this
.
selectTableData
.
unshift
(
info
)
if
(
this
.
$refs
.
xTableColumn
!==
undefined
)
{
if
(
this
.
$refs
.
xTableColumn
!==
undefined
)
{
<<<<<<<
HEAD
this
.
$refs
.
xTableColumn
.
setCurrentRow
(
_this
.
selectTableData
[
0
])
this
.
$refs
.
xTableColumn
.
setCurrentRow
(
_this
.
selectTableData
[
0
])
}
}
if
(
this
.
selectedRow
!==
null
)
{
if
(
this
.
selectedRow
!==
null
)
{
this
.
setElementBackgroundColor
(
this
.
selectedRow
.
xpath
,
''
);
this
.
setElementBackgroundColor
(
this
.
selectedRow
.
xpath
,
''
);
=======
// if (this.SelectTableData.length > 1) {
this
.
$refs
.
xTableColumn
.
setCurrentRow
(
_this
.
SelectTableData
[
0
])
// }
>>>>>>>
5509792
c37aa1abff718eb8e1a32b1f5cb234afd
}
}
// 移除先前元素的背景色(如果有)
// 移除先前元素的背景色(如果有)
if
(
window
.
currentlyHighlighted
)
{
if
(
window
.
currentlyHighlighted
)
{
...
...
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