chore: 优化 table.vue 代码结构
This commit is contained in:
parent
5da5dbd690
commit
4ff49b97a0
@ -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"
|
||||
|
@ -94,7 +94,5 @@ export default {
|
||||
|
||||
:::
|
||||
|
||||
|
||||
|
||||
::: previousNext transfer
|
||||
:::
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user