element UI汉语维语双语显示

汉语维语双语显示

按钮,标签,表格表头等汉语维语双语显示

el-form-item标签双语

javascript 复制代码
<el-form-item label="名称" prop="irrName">
	<el-input v-model="queryParams.irrName" placeholder="请输入名称" clearable
		style="background-color: #f5f5f5;" />
	<div style="margin-top:-15px; margin-left:-70px; font-size: 12px;">修改成对应维语</div>
</el-form-item>

el-button按钮内容双语

javascript 复制代码
<el-button type="primary" size="mini" @click="handleQuery">
	<span>查询</span><br />
	<span style="font-size:12px!important;">修改成对应维语</span>
</el-button>

el-table表头双语及表格样式

表头双语

表头的样式是公用的,无需单独设置

javascript 复制代码
<el-table-column align="center" prop="irrName" >
	<template #header>
		<div class="custom-header">
			<div class="header-line1">名称</div>
			<div class="header-line2">修改成对应的维语</div>
		</div>
	</template>
</el-table-column>

css样式不用设置,公共样式封装好了。

css 复制代码
.custom-header {
  line-height: 1.1; /* 调整行高避免重叠 */
}
.header-line1 {
  font-size: 14px;
  color: rgba(89, 89, 89, 1);
  font-weight: bold;
}
.header-line2 {
  font-size: 12px;
  color: rgba(89, 89, 89, 1);
  font-style: italic;
}

表格样式

表头模板中加入cell-style 、 header-cell-style 、 row-class-name属性

js 复制代码
<el-table v-loading="loading" stripe="stripe" :data="baseList" @selection-change="handleSelectionChange" :cell-style="{ height: '46px', color: '#595959' }" :header-cell-style="{background: '#f2f4fa',fontWeight: '400',fontSize: '16px;',height: '54px',	color: 'rgba(26,26,26,1)'}" :row-class-name="tableRowClassName">

js的methods中加入tableRowClassName 方法

js 复制代码
tableRowClassName ({ row, rowIndex }) {
	if (rowIndex % 2 != 0) {
		return 'warning-row';
	}
	return '';
},

css中加入下面代码必须引入,无法封装

css 复制代码
::v-deep .el-table td.el-table__cell,
::v-deep .el-table th.el-table__cell.is-leaf {
	border: none !important;
}

::v-deep .el-table--border::after,
.el-table--group::after,
.el-table::before {
	background-color: transparent !important;
}

::v-deep .el-table .warning-row {
	background: #f5f5f5;
}
::v-deep .el-table td.el-table__cell div {
	font-size: 14px !important;
	font-weight: 400 !important;
	color: #595959 !important;
	;
}
相关推荐
B站计算机毕业设计超人1 小时前
计算机毕业设计SpringBoot+Vue.js民族婚纱预定系统(源码+文档+PPT+讲解)
java·vue.js·spring boot·后端·毕业设计·课程设计·毕设
Georgewu2 小时前
【HarmonyOS Next】鸿蒙应用故障处理思路详解
前端·vue.js·harmonyos
方方洛2 小时前
网页端电子书阅读器的实现
前端·javascript·vue.js
大波V52 小时前
vue3新增修改页面,字段来源于其他表
javascript·vue.js·elementui
内向的小农2 小时前
Vue3安全新防线:RSA加密密码的实现与优化指南
前端·vue.js·安全
blzlh3 小时前
春招面试大整理,全程拷打,干货满满(1)
前端·vue.js·面试
唐小墨同学4 小时前
Pico 4 Enterprise(企业版)与Unity的交互-打包运行及UI交互篇
ui·unity
六个点4 小时前
ref和reactive的实现原理
前端·vue.js·面试
86Eric4 小时前
Vue 使用 vue-router 时,多级嵌套路由缓存问题处理
前端·vue.js·vue-router·vue 路由缓存·多级菜单缓存
计算机学姐5 小时前
基于Asp.net的零食购物商城网站
vue.js·vscode·后端·mysql·sqlserver·vue·asp.net