Commit 85aeb758 by 郁子恒

Merge branch 'master' of http://git.kivii.org/gy/Vue-WebDriver

parents 93c06e86 a0b8da4d
......@@ -168,9 +168,11 @@ export default {
_this.SelectTableData = this.SelectTableData.filter(item => item._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.setElementBackgroundColor(row.xpath, '')
// 将表格最后一个选中,添加背景色
if (_this.SelectTableData.length > 0) {
console.log(_this.SelectTableData)
......@@ -278,7 +280,10 @@ export default {
// 将新加入的tableData添加高亮
// console.log(this.$refs.xTableColumn)
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])
// }
}
// 移除先前元素的背景色(如果有)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment