🐛(table): 修复 column 配置 align 属性失效

This commit is contained in:
就眠儀式
2022-11-22 11:40:10 +08:00
parent beded0436f
commit 99a62ada52
4 changed files with 16 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ import {
watch,
onUnmounted,
StyleValue,
Fragment,
Fragment,
} from "vue";
import { LayIcon } from "@layui/icons-vue";
import LayInput from "../input/index.vue";

View File

@@ -291,10 +291,14 @@ const renderTabTitle = (attrs: Record<string, unknown>) => {
useResizeObserver(navRef, update);
watch(tabMap, () => {
watch(
tabMap,
() => {
childrens.value = [];
setItemInstanceBySlot((slot.default && slot.default()) as VNode[]);
}, {immediate: true });
},
{ immediate: true }
);
watch(
() => [

View File

@@ -486,7 +486,7 @@ const radioProps = props.getRadioProps(props.data, props.index);
column.fixed ? `layui-table-fixed-${column.fixed}` : '',
]"
>
<div style="display: flex">
<div style="display: flex" :style="[{textAlign: column.align, justifyContent: column.align}]">
<span
v-if="expandSpace && columnIndex === expandIndex"
:style="{ 'margin-right': currentIndentSize + 'px' }"
@@ -560,7 +560,7 @@ const radioProps = props.getRadioProps(props.data, props.index);
column.fixed ? `layui-table-fixed-${column.fixed}` : '',
]"
>
<div style="display: flex">
<div style="display: flex" :style="[{textAlign: column.align, justifyContent: column.align}]">
<span
v-if="expandSpace && columnIndex === expandIndex"
:style="{ 'margin-right': currentIndentSize + 'px' }"