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

Vue3框架中让table合计居中对齐

第一步:给它加一个类名 center-table 如下:

 <el-table
      :data="datas.shows"
      max-height="600px"
      show-summary
      stripe
      border
      style="width: 100%"
      :header-cell-style="{ textAlign: 'center' }"
      :cell-style="{ textAlign: 'center' }"
      class="center-table"
    ></el-table>

第二步: 使用v-deep选择器

:deep(.center-table td), 
:deep(.center-table th) {
  text-align: center !important;
}

效果

原创作者:吴小糖

创作时间:2023.11.24


http://www.kler.cn/a/150163.html

相关文章:

  • 【分布式架构理论2】分布式架构要处理的问题及解决方案
  • Ubuntu x64下交叉编译ffmpeg、sdl2到目标架构为aarch64架构的系统(生成ffmpeg、ffprobe、ffplay)
  • 修剪二叉搜索树(力扣669)
  • 解决threeJS加载obj gltf和glb模型后颜色太暗的方法
  • 【分布式架构理论3】分布式调用(2):API 网关分析
  • 【怎么用系列】短视频戒除—1—对推荐算法进行干扰
  • 自定义类型:结构体,枚举,联合
  • A*算法学习
  • 论文笔记:Confidential Assets
  • Python与设计模式--命令模式
  • Spark将execl表格文件导入到mysql中
  • 亚马逊云科技基于 Polygon 推出首款 Amazon Managed Blockchain Access,助 Web3 开发人员降低区块链节点运行成本
  • springboot(ssm文学名著分享系统 文化交流平台Java(codeLW)
  • 【brew】Mac上安装vue3
  • 【数据挖掘】国科大刘莹老师数据挖掘课程作业 —— 第二次作业
  • Linux的基本指令(3)
  • 初识Dockerfile
  • 3dMax导出glft和glb格式模型插件Max2Babylon教程
  • 针对net core 使用CSRedis 操作redis的三种连接实例方式
  • Typescript中 interface 和 type 的区别是什么?
  • 后端Java日常实习生面试(七牛云2023年11月14日)
  • php通过curl方式发送接受xml数据
  • HarmonyOS入门开发(三) 持久化存储Preferences
  • day65 django回顾3
  • WordPress 粘贴图片上传插件
  • pytorch 多卡并行训练