chore: 新增 table 组件 coulmn 配置 align 属性
This commit is contained in:
parent
4ff49b97a0
commit
a41f463a65
@ -5,4 +5,4 @@ Component.install = (app: App) => {
|
|||||||
app.component(Component.name, Component);
|
app.component(Component.name, Component);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Component;
|
export default Component;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,14 +254,14 @@ 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">
|
||||||
<slot :name="column.titleSlot"></slot>
|
<slot :name="column.titleSlot"></slot>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ column.title }}
|
{{ column.title }}
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user