index.vue 1.33 KB
<!--
 * @Author: 王志慧 wangzh@didihu.com.cn
 * @Date: 2024-06-12 15:21:09
 * @LastEditors: 'wangzhihui' '1733904062@qq.com'
 * @LastEditTime: 2025-10-22 22:21:08
 * @FilePath: \dj-car-life-system\src\components\d2-table-header\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <el-row class="table-header">
        <el-col :span="leftSpan" :class="titleClassName">
            <span class="table-header-title" v-text="title" />
            <slot name="left" />
        </el-col>
        <el-col :span="24 - leftSpan">
            <slot />
        </el-col>
    </el-row>
</template>

<script>
export default {
	name: "D2TebleHeader",
	props: {
		title: {
			type: String,
			required: false,
			default: "",
		},
		titleClassName: {
			type: String,
			default: "",
		},
		leftSpan: {
			type: Number,
			required: false,
			default: 12,
		},
	},
};
</script>

<style lang="scss">
.table-header {
	font-size: 14px;
	> .el-col {
		align-items: center;
	}
}
.table-header-title {
	color: #111111;
	font-size: 16px;
}

.table-header .el-col-12 {
	/* min-width: 50%; */
	height: 32px;
}

.table-header .grid {
	margin-right: 20px;
}

.count-txt {
	font-weight: 700;
	color: #2a58ad;
	margin: 0 2px;
}
</style>