chore: 优化 table.vue 代码结构

This commit is contained in:
就眠儀式
2022-04-13 08:52:51 +08:00
parent 5da5dbd690
commit 4ff49b97a0
3 changed files with 9 additions and 9 deletions

View File

@@ -256,15 +256,14 @@ onMounted(() => {
class="layui-table-cell"
:style="{ width: column.width }"
>
<span v-if="column.titleSlot">
<span>
<template v-if="column.titleSlot">
<slot :name="column.titleSlot"></slot>
</template>
<template>
{{ column.title }}
<template v-else>
{{ column.title }}
</template>
</span>
<span v-else>{{ column.title }}</span>
<span
v-if="column.sort"
class="layui-table-sort layui-inline"