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; width: 10px;
height: 20px; height: 20px;
margin-left: 5px; margin-left: 5px;
margin-right: 5px;
cursor: pointer !important; cursor: pointer !important;
} }

View File

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