Browse Source

隐藏表格默认 全选按钮

admin_version1.0_2025_06_26
zq 2 weeks ago
parent
commit
d47cc229f8
  1. 31
      src/views/AddNewTreatment.vue

31
src/views/AddNewTreatment.vue

@ -52,7 +52,12 @@
</div> </div>
<GuipTable :tableData="sortedProjectList" style="width: 100%" ref="multipleTable" max-height="600px" <GuipTable :tableData="sortedProjectList" style="width: 100%" ref="multipleTable" max-height="600px"
@selection-change="handleSelectionChange" :loading="loading" @select="handleSelect"> @selection-change="handleSelectionChange" :loading="loading" @select="handleSelect">
<el-table-column type="selection" label="选择" width="150"></el-table-column> <!-- <el-table-column type="selection" label="选择" width="150"></el-table-column> -->
<el-table-column type="selection" width="150">
<template slot="header">
<span class="selection-header-text">选择</span>
</template>
</el-table-column>
<el-table-column prop="name" label="项目名称" min-width="150"></el-table-column> <el-table-column prop="name" label="项目名称" min-width="150"></el-table-column>
<el-table-column label="次数" min-width="150px" prop="num"> <el-table-column label="次数" min-width="150px" prop="num">
<template slot-scope="scope"> <template slot-scope="scope">
@ -532,6 +537,30 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-table__header-wrapper .el-checkbox {
display: none;
}
/* 隐藏表头的复选框 */
::v-deep .el-table__header-wrapper .el-checkbox {
display: none !important;
}
/* 确保选择文字可见 */
::v-deep .selection-header-text {
display: inline-block;
margin-left: 8px;
/* 调整位置 */
font-size: 14px;
color: #606266;
font-weight: bold;
}
/* 调整表头单元格的padding */
::v-deep .el-table .el-table__header th {
padding: 8px 0;
/* 根据需要调整 */
}
.siteMessage { .siteMessage {
border-radius: 4px; border-radius: 4px;
transition: all .5s; transition: all .5s;

Loading…
Cancel
Save