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
Show 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,6 +11,8 @@
<template
v-for=
"column in columns"
:key=
"column.prop"
>
<el-table-column
v-bind=
"column"
:align=
"align"
>
<template
#
default=
"scope"
>
<!-- 在每个td里包一层span,追加唯一的 data-testid -->
<span
:data-testid=
"`cell-$
{scope.$index}-${column.prop}`">
<slot
:name=
"column.prop"
v-bind=
"scope"
...
...
@@ -19,6 +21,7 @@
>
{{
scope
.
row
[
column
.
prop
]
}}
</slot>
</span>
</
template
>
</el-table-column>
</template>
...
...
@@ -43,6 +46,7 @@
</div>
</template>
<
script
setup
>
import
{
ref
,
computed
,
watch
,
onMounted
,
onUnmounted
,
nextTick
}
from
"vue"
;
...
...
@@ -225,7 +229,6 @@ watch(
}
}
</
style
>
<
<<<<<<
HEAD
<
style
lang=
"scss"
>
.el-table__header
,
...
...
@@ -244,5 +247,3 @@ watch(
}
}
</
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