首页
视频
资源
登录
小可爱
什么时候才能领悟,取之越多失之越多
博主信息
排名
6
文章
6
粉丝
16
评论
8
文章类别
ASP.NET
16篇
JS
1篇
.NET
23篇
英语
4篇
redis
4篇
随笔
30篇
EF
3篇
前端
53篇
.net core
25篇
python
8篇
版本控制
1篇
java
2篇
nginx
2篇
docker
6篇
后端
5篇
更多
mysql
8篇
数据库
15篇
微服务
4篇
移动开发
7篇
架构
6篇
linux
2篇
最新文章
最新评价
{{item.articleTitle}}
{{item.blogName}}
:
{{item.content}}
关于我们
ICP备案 :
渝ICP备18016597号-1
网站信息:
2018-2024
TNBLOG.NET
技术交流:
群号656732739
联系我们:
contact@tnblog.net
欢迎加群
欢迎加群交流技术
原
element ui table 表格获取 行号,列数
354
人阅读
2024/3/5 17:03
总访问:
880263
评论:
0
收藏:
0
手机
分类:
前端
#### 方法一: 页面 ``` <el-table-column prop="courseName" label="测试获取行号" align="center" width="80"> <template slot-scope="{row,$index}"> <span @click="showTest(row,$index)">点击查看</span> </template> </el-table-column> ``` js方法 ``` methods: { showTest(my,index){ console.log(my) console.log("行号",index) }, ``` #### 方法二: 页面 ``` <el-table-column prop="courseName" label="测试获取行号" align="center" width="80"> <template slot-scope="scope"> <span @click="showTest(scope)">点击查看</span> </template> </el-table-column> ``` js ``` methods: { showTest(my){ console.log(my) console.log("行号",my.$index) }, ``` 本质是一样的,都是通过获取element ui table 列里边的$index属性
欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739
👈{{preArticle.title}}
👉{{nextArticle.title}}
评价
{{titleitem}}
{{titleitem}}
{{item.content}}
{{titleitem}}
{{titleitem}}
{{item.content}}