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
a0b8da4d
Commit
a0b8da4d
authored
Nov 29, 2023
by
高源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表格优化
parent
c51af5ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
collectionTable.vue
src/components/collectionTable.vue
+10
-4
No files found.
src/components/collectionTable.vue
View file @
a0b8da4d
...
@@ -184,13 +184,15 @@ export default {
...
@@ -184,13 +184,15 @@ export default {
_this
.
SelectTableData
=
this
.
SelectTableData
.
filter
(
item
=>
item
.
_X_ROW_KEY
_this
.
SelectTableData
=
this
.
SelectTableData
.
filter
(
item
=>
item
.
_X_ROW_KEY
!==
row
.
_X_ROW_KEY
!==
row
.
_X_ROW_KEY
)
)
_this
.
setElementBackgroundColor
(
_this
.
$refs
.
xTableColumn
.
getCurrentRecord
().
xpath
,
''
)
// 先将删除的元素清空,并且将背景色还原
// 先将删除的元素清空,并且将背景色还原
_this
.
SelectTableData
=
_this
.
SelectTableData
.
filter
(
xpath
=>
xpath
.
xpath
!==
row
.
xpath
);
_this
.
SelectTableData
=
_this
.
SelectTableData
.
filter
(
xpath
=>
xpath
.
xpath
!==
row
.
xpath
);
_this
.
setElementBackgroundColor
(
row
.
xpath
,
''
)
_this
.
setElementBackgroundColor
(
row
.
xpath
,
''
)
// 将表格最后一个选中,添加背景色
// 将表格最后一个选中,添加背景色
if
(
_this
.
SelectTableData
.
length
>
0
)
{
if
(
_this
.
SelectTableData
.
length
>
0
)
{
console
.
log
(
_this
.
SelectTableData
)
console
.
log
(
_this
.
SelectTableData
)
if
(
_this
.
SelectTableData
.
length
==
1
)
return
if
(
_this
.
SelectTableData
.
length
==
1
)
return
_this
.
$refs
.
xTableColumn
.
setCurrentRow
(
_this
.
SelectTableData
[
_this
.
SelectTableData
.
length
-
2
])
_this
.
$refs
.
xTableColumn
.
setCurrentRow
(
_this
.
SelectTableData
[
_this
.
SelectTableData
.
length
-
2
])
_this
.
setElementBackgroundColor
(
_this
.
SelectTableData
[
_this
.
SelectTableData
.
length
-
2
].
xpath
,
'#68C23A'
)
_this
.
setElementBackgroundColor
(
_this
.
SelectTableData
[
_this
.
SelectTableData
.
length
-
2
].
xpath
,
'#68C23A'
)
}
}
...
@@ -294,7 +296,10 @@ export default {
...
@@ -294,7 +296,10 @@ export default {
// 将新加入的tableData添加高亮
// 将新加入的tableData添加高亮
// console.log(this.$refs.xTableColumn)
// console.log(this.$refs.xTableColumn)
if
(
this
.
$refs
.
xTableColumn
!==
undefined
)
{
if
(
this
.
$refs
.
xTableColumn
!==
undefined
)
{
this
.
$refs
.
xTableColumn
.
setCurrentRow
(
_this
.
SelectTableData
[
_this
.
SelectTableData
.
length
-
1
])
// if (this.SelectTableData.length > 1) {
this
.
$refs
.
xTableColumn
.
setCurrentRow
(
_this
.
SelectTableData
[
0
])
// }
}
}
// 移除先前元素的背景色(如果有)
// 移除先前元素的背景色(如果有)
...
@@ -445,4 +450,5 @@ export default {
...
@@ -445,4 +450,5 @@ export default {
.vxe-table--filter-wrapper
.vxe-input
>
.vxe-input--inner
,
.vxe-table--filter-wrapper
.vxe-input
>
.vxe-input--inner
,
.vxe-table--filter-wrapper
.vxe-textarea
>
.vxe-textarea--inner
{
.vxe-table--filter-wrapper
.vxe-textarea
>
.vxe-textarea--inner
{
width
:
145px
!important
;
width
:
145px
!important
;
}
</
style
>
}
\ No newline at end of file
</
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