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>
<template v-else>
{{ column.title }}
</template>
</span>
<span v-else>{{ column.title }}</span>
<span
v-if="column.sort"
class="layui-table-sort layui-inline"

View File

@ -94,7 +94,5 @@ export default {
:::
::: previousNext transfer
:::

View File

@ -286,17 +286,20 @@ export default {
width:"200px",
titleSlot: "username-title",
customSlot:"username",
key:"username"
key:"username",
align: "left"
},{
title:"密码",
width: "180px",
customSlot:"password",
key:"password"
key:"password",
align: "center"
},{
title:"年龄",
width: "180px",
key:"age",
sort: true
sort: true,
align: "right"
},{
title:"操作",
width: "180px",