chore: 优化 table.vue 代码结构
This commit is contained in:
parent
5da5dbd690
commit
4ff49b97a0
@ -256,15 +256,14 @@ onMounted(() => {
|
|||||||
class="layui-table-cell"
|
class="layui-table-cell"
|
||||||
:style="{ width: column.width }"
|
:style="{ width: column.width }"
|
||||||
>
|
>
|
||||||
<span v-if="column.titleSlot">
|
<span>
|
||||||
<template v-if="column.titleSlot">
|
<template v-if="column.titleSlot">
|
||||||
<slot :name="column.titleSlot"></slot>
|
<slot :name="column.titleSlot"></slot>
|
||||||
</template>
|
</template>
|
||||||
<template>
|
<template v-else>
|
||||||
{{ column.title }}
|
{{ column.title }}
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
<span v-else>{{ column.title }}</span>
|
|
||||||
<span
|
<span
|
||||||
v-if="column.sort"
|
v-if="column.sort"
|
||||||
class="layui-table-sort layui-inline"
|
class="layui-table-sort layui-inline"
|
||||||
|
@ -94,7 +94,5 @@ export default {
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::: previousNext transfer
|
::: previousNext transfer
|
||||||
:::
|
:::
|
@ -286,17 +286,20 @@ export default {
|
|||||||
width:"200px",
|
width:"200px",
|
||||||
titleSlot: "username-title",
|
titleSlot: "username-title",
|
||||||
customSlot:"username",
|
customSlot:"username",
|
||||||
key:"username"
|
key:"username",
|
||||||
|
align: "left"
|
||||||
},{
|
},{
|
||||||
title:"密码",
|
title:"密码",
|
||||||
width: "180px",
|
width: "180px",
|
||||||
customSlot:"password",
|
customSlot:"password",
|
||||||
key:"password"
|
key:"password",
|
||||||
|
align: "center"
|
||||||
},{
|
},{
|
||||||
title:"年龄",
|
title:"年龄",
|
||||||
width: "180px",
|
width: "180px",
|
||||||
key:"age",
|
key:"age",
|
||||||
sort: true
|
sort: true,
|
||||||
|
align: "right"
|
||||||
},{
|
},{
|
||||||
title:"操作",
|
title:"操作",
|
||||||
width: "180px",
|
width: "180px",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user