chore: 新增 table 组件 coulmn 配置 align 属性

This commit is contained in:
就眠儀式 2022-04-13 08:57:55 +08:00
parent 4ff49b97a0
commit a41f463a65
3 changed files with 6 additions and 5 deletions

View File

@ -292,6 +292,7 @@
width: 10px;
height: 20px;
margin-left: 5px;
margin-right: 5px;
cursor: pointer !important;
}

View File

@ -254,7 +254,7 @@ onMounted(() => {
<th v-if="tableColumnKeys.includes(column.key)">
<div
class="layui-table-cell"
:style="{ width: column.width }"
:style="{ width: column.width ,textAlign: column.align}"
>
<span>
<template v-if="column.titleSlot">
@ -315,7 +315,7 @@ onMounted(() => {
<!-- Column -->
<template v-if="column.customSlot">
<td class="layui-table-cell">
<div :style="{ width: column.width }">
<div :style="{ width: column.width,textAlign: column.align }">
<slot :name="column.customSlot" :data="data"></slot>
</div>
</td>
@ -327,7 +327,7 @@ onMounted(() => {
:key="value"
>
<td v-if="column.key == key" class="layui-table-cell">
<div :style="{ width: column.width }">
<div :style="{ width: column.width, textAlign: column.align }">
<span> {{ value }} </span>
</div>
</td>