当前位置: 首页 > news >正文

做网站的公司有哪些免费注册个人网站

做网站的公司有哪些,免费注册个人网站,wordpress复制的图片不显示图片,青岛开发区 网站建设记录element-plus 表格的使用。方法、事件、属性的使用。因为是vue3的方式用到了const install getCurrentInstance();才能获取表格的相关信息 没解决怎么获取选中的行的行号,采用自己记的方式实习的。 利用row-class-name"setRowClass"实现样式的简单…

记录element-plus 表格的使用。方法、事件、属性的使用。因为是vue3的方式用到了const install = getCurrentInstance();才能获取表格的相关信息

没解决怎么获取选中的行的行号,采用自己记的方式实习的。

利用row-class-name="setRowClass"实现样式的简单设定

<template><h2>表格的方法、事件、属性的使用</h2><el-button type="primary" @click="setSelected">setSelected 1</el-button><el-button type="primary" @click="clearSelected">clearSelected</el-button><el-table ref="tableRef" :data="tableData" border style="width: 100%" highlight-current-row:row-class-name="setRowClass" @row-click="row_clicked"><el-table-column type="index" label="序号" width="100" /><el-table-column prop="date" label="Date" width="180" /><el-table-column prop="name" label="Name" width="180" /><el-table-column prop="address" label="Address" /></el-table>
</template><script lang="ts">
import { defineComponent, reactive, ref, getCurrentInstance, } from 'vue'export default {setup() {const install = getCurrentInstance();const tableRef = ref();const curIndex = ref(0);const tableData = reactive([{date: '2016-05-03',name: 'Tom',address: 'No. 189, Grove St, Los Angeles',},{date: '2016-05-02',name: 'Tom',address: 'No. 189, Grove St, Los Angeles',},{date: '2016-05-04',name: 'Tom',address: 'No. 189, Grove St, Los Angeles',},{date: '2016-05-01',name: 'Tom',address: 'No. 189, Grove St, Los Angeles',},]);function setSelected() {console.log('setSelected');curIndex.value = 1;install.refs.tableRef.setCurrentRow(tableData[1]);}function clearSelected() {console.log('clearSelected')//清除选中的项 用于单选表格,设定某一行为选中行, 如果调用时不加参数,则会取消目前高亮行的选中状态install.refs.tableRef.setCurrentRow();curIndex.value = -1;}function setRowClass(row) {// 把每一行的索引放进,自己记rowindexrow.row.my_index = row.rowIndex;if (row.rowIndex == curIndex.value) {return "myClass";}}function row_clicked(row, column, event) {//获取行号不行。。。。//利用自己记的my_index实现curIndex.value = row.my_index;console.log('row_clicked', row.my_index, row.date, row.name, row.address);}return { tableData, tableRef, curIndex, setSelected, clearSelected, setRowClass, row_clicked }},}
</script><!-- 
<script lang="ts" setup >
import { getCurrentInstance, reactive, ref } from 'vue'const install = getCurrentInstance();
const tableRef = ref();
const curIndex = ref(0);const tableData = reactive([{date: '2016-05-03',name: 'Tom',address: 'No. 189, Grove St, Los Angeles',},{date: '2016-05-02',name: 'Tom',address: 'No. 189, Grove St, Los Angeles',},{date: '2016-05-04',name: 'Tom',address: 'No. 189, Grove St, Los Angeles',},{date: '2016-05-01',name: 'Tom',address: 'No. 189, Grove St, Los Angeles',},
])function setSelected()
{console.log('setSelected');curIndex.value =  1;install.refs.tableRef.setCurrentRow(tableData[1]);}
function clearSelected()
{console.log('clearSelected')//清除选中的项 用于单选表格,设定某一行为选中行, 如果调用时不加参数,则会取消目前高亮行的选中状态install.refs.tableRef.setCurrentRow(); curIndex.value =  -1;
}function setRowClass(row)
{// 把每一行的索引放进,自己记rowindexrow.row.my_index = row.rowIndex;if (row.rowIndex == curIndex.value){return "myClass";}
}function row_clicked(row, column, event)
{//获取行号不行。。。。//利用自己记的my_index实现curIndex.value =  row.my_index;console.log('row_clicked',row.my_index, row.date,row.name,row.address);
}</script> 
--><style >
.myClass {background-color: rgb(16, 95, 95) !important;color: blueviolet;
}
</style>

http://www.tj-hxxt.cn/news/8088.html

相关文章:

  • 苏州网站建设推广服务近期出现的病毒叫什么
  • 网站美工培训机构推广网站模板
  • 望京做网站的公司利搜网站排名软件
  • 铜梁集团网站建设360推广
  • 免费网站制作推广镇江seo
  • 怎样刷新网站站长之家站长工具综合查询
  • 什么网站可以自己做名片软文街
  • 深圳网站制作招聘天津seo外包平台
  • 建设一个网站首先需要武汉今日新闻头条
  • 中国建设银行官网网址多少郑州seo优化外包顾问阿亮
  • 中石化建设工程有限公司网站关键词搜索推广
  • dede网站首页百度怎么发布自己的广告
  • 尉氏县金星网架公司莱阳seo排名
  • 明年做哪些网站致富网络营销成功案例有哪些
  • 在哪找做调查赚钱的网站好阳江网站建设
  • 江西锐安建设工程有限公司网站室内设计培训哪个机构比较好
  • 做网站用那个浏览器seo快速优化
  • 龙岩网站报价搜索引擎优化关键词选择的方法有哪些
  • wordpress改站点地址怎么给自己的公司做网站
  • 网站的组成如何制作付费视频网站
  • 建立网站需要哪些手续下载app到手机上并安装
  • 做网站aspseo费用价格
  • 做电商要不要公司网站朝阳seo建站
  • 企业网站美工设计推广文案范例
  • 泉州做外贸网站百度广告联盟赚广告费
  • 为什么企业需要建设网站?seo如何优化排名
  • 美团这个网站多少钱做的哪些平台可以免费打广告
  • 电子商务网站建设策划谷歌自然排名优化
  • 萧山网页设计seo方法培训
  • 可以自己做网站优化吗网络营销和推广的方法