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
75a6b6dc
Commit
75a6b6dc
authored
Nov 18, 2023
by
高源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdk-table 重构
parent
4d941edf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
collectionTable.vue
src/components/collectionTable.vue
+32
-5
sdk-table.js
src/sdk-table.js
+0
-0
No files found.
src/components/collectionTable.vue
View file @
75a6b6dc
...
...
@@ -50,7 +50,8 @@
<
script
>
import
VXETable
,
{
t
}
from
'vxe-table'
import
{
getTableData
}
from
'../sdk'
// import { getTableData } from '../sdk'
import
{
cell
,
checkTableFromXpaths
}
from
'../sdk-table'
export
default
{
name
:
'collectionTable'
,
components
:
{},
...
...
@@ -64,7 +65,9 @@ export default {
firstXpath
:
[],
somePath
:
''
,
index
:
0
,
Xpaths
:[]
Xpaths
:
[],
sdkXPath
:
[],
checkTableFrom
:
null
}
},
created
()
{
...
...
@@ -76,8 +79,25 @@ export default {
computed
:
{},
methods
:
{
getTable
()
{
//表格展示配置
let
_this
=
this
console
.
log
(
_this
.
sdkXPath
)
_this
.
checkTableFrom
=
checkTableFromXpaths
(
_this
.
sdkXPath
)
console
.
log
(
_this
.
checkTableFrom
)
_this
.
tableData
=
_this
.
checkTableFrom
.
tableData
console
.
log
(
_this
.
tableData
)
this
.
tableColumn
=
[]
for
(
let
i
=
0
;
i
<
_this
.
tableData
.
length
;
i
++
)
{
let
objs
=
{}
objs
.
field
=
(
'content'
+
i
)
+
'.content'
objs
.
title
=
'请填写标题'
objs
.
width
=
145
_this
.
tableColumn
.
push
(
objs
)
}
_this
.
isSelectTable
=
false
return
//表格展示配置
_this
.
tableData
=
[]
_this
.
tableColumn
=
[]
_this
.
tableData
=
getTableData
(
_this
.
Xpaths
)
...
...
@@ -94,7 +114,6 @@ export default {
console
.
log
(
_this
.
tableData
)
return
},
...
...
@@ -148,6 +167,14 @@ export default {
_this
.
SelectTableData
.
push
(
obj
)
_this
.
firstXpath
.
push
(
elementInfo
.
Xpath
)
_this
.
Xpaths
.
push
(
elementInfo
.
Xpath
)
// sdkTable--------------------------------------------------------------------------------------------------------
var
selectCell
=
new
cell
(
elementInfo
.
Xpath
,
'cellName'
,
'text'
,
'title'
)
// console.log(selectCell)
_this
.
sdkXPath
.
push
(
selectCell
)
// sdkTable--------------------------------------------------------------------------------------------------------
// 移除事件监听器
document
.
removeEventListener
(
'contextmenu'
,
contextMenuHandler
);
}
...
...
@@ -172,7 +199,7 @@ export default {
}
}
},
},
}
</
script
>
...
...
src/sdk-table.js
View file @
75a6b6dc
This diff is collapsed.
Click to expand it.
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