您的位置:首页 > 新闻 > 热点要闻 > 市场监督管理局投诉电话是多少_泰安网签查询2023_媒体发稿公司_合肥网络推广软件

市场监督管理局投诉电话是多少_泰安网签查询2023_媒体发稿公司_合肥网络推广软件

2025/3/10 15:39:42 来源:https://blog.csdn.net/weixin_54514048/article/details/142859613  浏览:    关键词:市场监督管理局投诉电话是多少_泰安网签查询2023_媒体发稿公司_合肥网络推广软件
市场监督管理局投诉电话是多少_泰安网签查询2023_媒体发稿公司_合肥网络推广软件
<template><el-table:data="tableData"style="width: 100%"ref="multipleTable"@selection-change="handleSelectionChange"><el-table-columntype="selection"width="55"></el-table-column><!-- 其他列 --></el-table>
</template><script>
export default {data() {return {tableData: [], // 表格数据selectedRows: [], // 已选行id数组};},methods: {// 数据初始加载后,可以根据已选行id数组回显复选框loadTableData() {// 模拟从API获取数据this.tableData = [// ...获取到的数据];// 回显复选框this.tableData.forEach(row => {if (this.selectedRows.includes(row.id)) {this.$refs.multipleTable.toggleRowSelection(row, true);}});},handleSelectionChange(selection) {// 当复选框选项变化时更新已选行id数组this.selectedRows = selection.map(item => item.id);},},mounted() {this.loadTableData();},
};
</script>

方法二

//vue3写法
import { ref, reactive, defineProps, defineEmits, nextTick } from 'vue'const multipleTable = ref(null)
const comonArr = ref([])
nextTick(() => {comonArr.value.forEach((row) => {const row = tableData.find((f) => f.id = row)multipleTable.toggleRowSelection(row, true);});
})

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com