Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DC-TOM
Project
Project
Details
Activity
Releases
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
刘照晖
DC-TOM
Commits
d2bf561f
Commit
d2bf561f
authored
Sep 08, 2025
by
Cai Wei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(*): 表格新增测试标记
parent
4b32bc3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
index.vue
src/components/commonTable/index.vue
+12
-11
No files found.
src/components/commonTable/index.vue
View file @
d2bf561f
...
@@ -11,14 +11,17 @@
...
@@ -11,14 +11,17 @@
<template
v-for=
"column in columns"
:key=
"column.prop"
>
<template
v-for=
"column in columns"
:key=
"column.prop"
>
<el-table-column
v-bind=
"column"
:align=
"align"
>
<el-table-column
v-bind=
"column"
:align=
"align"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<slot
<!-- 在每个td里包一层span,追加唯一的 data-testid -->
:name=
"column.prop"
<span
:data-testid=
"`cell-$
{scope.$index}-${column.prop}`">
v-bind=
"scope"
<slot
:row=
"scope.row"
:name=
"column.prop"
:column=
"column"
v-bind=
"scope"
>
:row=
"scope.row"
{{
scope
.
row
[
column
.
prop
]
}}
:column=
"column"
</slot>
>
{{
scope
.
row
[
column
.
prop
]
}}
</slot>
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</template>
</template>
...
@@ -43,6 +46,7 @@
...
@@ -43,6 +46,7 @@
</div>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
ref
,
computed
,
watch
,
onMounted
,
onUnmounted
,
nextTick
}
from
"vue"
;
import
{
ref
,
computed
,
watch
,
onMounted
,
onUnmounted
,
nextTick
}
from
"vue"
;
...
@@ -225,7 +229,6 @@ watch(
...
@@ -225,7 +229,6 @@ watch(
}
}
}
}
</
style
>
</
style
>
<
<<<<<<
HEAD
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.el-table__header
,
.el-table__header
,
...
@@ -244,5 +247,3 @@ watch(
...
@@ -244,5 +247,3 @@ watch(
}
}
}
}
</
style
>
</
style
>
=======
>>>>>>> 14bd703db4380d50659b719495c761ed24c2c0d5
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