广告
返回顶部
首页 > 资讯 > 前端开发 > JavaScript >vue element 表头添加斜线的实现代码
  • 812
分享到

vue element 表头添加斜线的实现代码

2024-04-02 19:04:59 812人浏览 薄情痞子
摘要

<template> <div class="app-container"> <el-table :data="tableD


<template>
    <div class="app-container">
        <el-table :data="tableData3" style="width: 100%">
            <el-table-column width="120" prop="date"></el-table-column>
            <el-table-column prop="name" label="姓名" width="120"></el-table-column>
            <el-table-column label="地址">
                <el-table-column prop="province" label="省份" width="120"></el-table-column>
                <el-table-column prop="city" label="市区" width="120"></el-table-column>
                <el-table-column prop="address" label="地址" width="300"></el-table-column>
                <el-table-column prop="zip" label="邮编" width="120"></el-table-column>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
    export default {
        filters: {},
        data() {
            return {
                tableData3: [{
                    date: '2016-05-03',
                    name: '王小虎',
                    province: '上海',
                    city: '普陀区',
                    address: '上海市普陀区金沙江路 1518 弄',
                    zip: 200333
                }, {
                    date: '2016-05-02',
                    name: '王小虎',
                    province: '上海',
                    city: '普陀区',
                    address: '上海市普陀区金沙江路 1518 弄',
                    zip: 200333
                }, {
                    date: '2016-05-04',
                    name: '王小虎',
                    province: '上海',
                    city: '普陀区',
                    address: '上海市普陀区金沙江路 1518 弄',
                    zip: 200333
                }, {
                    date: '2016-05-01',
                    name: '王小虎',
                    province: '上海',
                    city: '普陀区',
                    address: '上海市普陀区金沙江路 1518 弄',
                    zip: 200333
                }, {
                    date: '2016-05-08',
                    name: '王小虎',
                    province: '上海',
                    city: '普陀区',
                    address: '上海市普陀区金沙江路 1518 弄',
                    zip: 200333
                }, {
                    date: '2016-05-06',
                    name: '王小虎',
                    province: '上海',
                    city: '普陀区',
                    address: '上海市普陀区金沙江路 1518 弄',
                    zip: 200333
                }, {
                    date: '2016-05-07',
                    name: '王小虎',
                    province: '上海',
                    city: '普陀区',
                    address: '上海市普陀区金沙江路 1518 弄',
                    zip: 200333
                }]
            }
        },
        created() {},
        methods: {}
    }
</script>
<style lang="sCSS">
    .el-table thead.is-group th {
        background: #fff;
    }
    
    .el-table thead.is-group tr:first-of-type th:first-of-type:before {
        content: '日期';
        text-align: center;
        position: absolute;
        width: 152px;
        height: 1px;
        bottom: 30px;
        right: 0;
    }
    
    .el-table thead.is-group tr:first-of-type th:first-of-type:after {
        content: '配送新增';
        text-align: center;
        position: absolute;
        width: 152px;
        top: 10px;
        left: 0;
    }
    
    .el-table thead.is-group tr:first-of-type th:first-of-type .cell {
        position: absolute;
        top: 0;
        left: 0;
        width: 152px;
        height: 1px;
        background-color: #EBEEF5;
        display: block;
        text-align: center;
        transfORM: rotate(38deg);
        transform-origin: top left;
        -ms-transform: rotate(38deg);
        -ms-transform-origin: top left;
        -WEBkit-transform: rotate(38deg);
        -webkit-transform-origin: top left;
    }
</style>

效果:

到此这篇关于Vue element 表头添加斜线的文章就介绍到这了,更多相关vue element 表头添加斜线内容请搜索编程网以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程网!

--结束END--

本文标题: vue element 表头添加斜线的实现代码

本文链接: https://www.lsjlt.com/news/156727.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作