fix: 修复 table.css 样式
This commit is contained in:
parent
90f89c7c5f
commit
f3d29a3711
@ -1,8 +1,5 @@
|
|||||||
@import (reference) "../../theme/variable.less";
|
@import (reference) "../../theme/variable.less";
|
||||||
|
|
||||||
.laytable-cell-checkbox {
|
|
||||||
width: 34px;
|
|
||||||
}
|
|
||||||
.layui-table-col-special {
|
.layui-table-col-special {
|
||||||
width: 34px;
|
width: 34px;
|
||||||
}
|
}
|
||||||
@ -88,11 +85,6 @@
|
|||||||
padding: 15px 30px;
|
padding: 15px 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-table-view .layui-table[lay-size="lg"] .layui-table-cell {
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layui-table[lay-size="sm"] td,
|
.layui-table[lay-size="sm"] td,
|
||||||
.layui-table[lay-size="sm"] th {
|
.layui-table[lay-size="sm"] th {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -135,7 +127,7 @@
|
|||||||
|
|
||||||
.layui-table-view .layui-table td.layui-table-col-special,
|
.layui-table-view .layui-table td.layui-table-col-special,
|
||||||
.layui-table-view .layui-table th.layui-table-col-special {
|
.layui-table-view .layui-table th.layui-table-col-special {
|
||||||
padding: 5px 16px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-table-view .layui-table th.layui-unselect .layui-table-cell span {
|
.layui-table-view .layui-table th.layui-unselect .layui-table-cell span {
|
||||||
|
@ -251,11 +251,7 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<template v-for="column in columns" :key="column">
|
<template v-for="column in columns" :key="column">
|
||||||
<th v-if="tableColumnKeys.includes(column.key)">
|
<th class="layui-table-cell" :style="{ width: column.width, textAlign: column.align }" v-if="tableColumnKeys.includes(column.key)">
|
||||||
<div
|
|
||||||
class="layui-table-cell"
|
|
||||||
:style="{ width: column.width, textAlign: column.align }"
|
|
||||||
>
|
|
||||||
<span>
|
<span>
|
||||||
<template v-if="column.titleSlot">
|
<template v-if="column.titleSlot">
|
||||||
<slot :name="column.titleSlot"></slot>
|
<slot :name="column.titleSlot"></slot>
|
||||||
@ -280,7 +276,6 @@ onMounted(() => {
|
|||||||
title="降序"
|
title="降序"
|
||||||
></i>
|
></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
</th>
|
</th>
|
||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
@ -314,15 +309,11 @@ onMounted(() => {
|
|||||||
<template v-if="tableColumnKeys.includes(column.key)">
|
<template v-if="tableColumnKeys.includes(column.key)">
|
||||||
<!-- 插 槽 Column -->
|
<!-- 插 槽 Column -->
|
||||||
<template v-if="column.customSlot">
|
<template v-if="column.customSlot">
|
||||||
<td class="layui-table-cell">
|
<td class="layui-table-cell" :style="{
|
||||||
<div
|
|
||||||
:style="{
|
|
||||||
width: column.width,
|
width: column.width,
|
||||||
textAlign: column.align,
|
textAlign: column.align,
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
<slot :name="column.customSlot" :data="data"></slot>
|
<slot :name="column.customSlot" :data="data"></slot>
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</template>
|
</template>
|
||||||
<!-- 匹 配 Column -->
|
<!-- 匹 配 Column -->
|
||||||
@ -331,15 +322,11 @@ onMounted(() => {
|
|||||||
v-for="(value, key) in data"
|
v-for="(value, key) in data"
|
||||||
:key="value"
|
:key="value"
|
||||||
>
|
>
|
||||||
<td v-if="column.key == key" class="layui-table-cell">
|
<td v-if="column.key == key" class="layui-table-cell" :style="{
|
||||||
<div
|
|
||||||
:style="{
|
|
||||||
width: column.width,
|
width: column.width,
|
||||||
textAlign: column.align,
|
textAlign: column.align,
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
<span> {{ value }} </span>
|
<span> {{ value }} </span>
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
@ -43,11 +43,8 @@ let activeIndex = ref<number>(0);
|
|||||||
const show = ref<boolean>(props.show);
|
const show = ref<boolean>(props.show);
|
||||||
const iconType = ref<string>("layui-icon-right");
|
const iconType = ref<string>("layui-icon-right");
|
||||||
const anchors: string | string[] | undefined = props.anchors;
|
const anchors: string | string[] | undefined = props.anchors;
|
||||||
/**滚动条高度 */
|
|
||||||
const scrollTop = ref<number>(0);
|
const scrollTop = ref<number>(0);
|
||||||
/**要监听的滚动元素 */
|
|
||||||
const scrollRefEl = shallowRef<HTMLElement | undefined>(undefined);
|
const scrollRefEl = shallowRef<HTMLElement | undefined>(undefined);
|
||||||
/**折叠动画 */
|
|
||||||
let enableAnimation = false;
|
let enableAnimation = false;
|
||||||
|
|
||||||
const anchorList = computed(() => {
|
const anchorList = computed(() => {
|
||||||
@ -126,8 +123,7 @@ onMounted(() => {
|
|||||||
scrollRefEl.value?.addEventListener("scroll", throttle(handlerScroll, 500));
|
scrollRefEl.value?.addEventListener("scroll", throttle(handlerScroll, 500));
|
||||||
// 如果已折叠,关闭组件初始渲染时的动画,然后自动开启
|
// 如果已折叠,关闭组件初始渲染时的动画,然后自动开启
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
show.value =
|
show.value = scrollRefEl.value!.firstElementChild!.style.marginRight !== "0px";
|
||||||
scrollRefEl.value!.firstElementChild!.style.marginRight !== "0px";
|
|
||||||
enableAnimation = show.value;
|
enableAnimation = show.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
<template v-slot:username="{ data }"> {{data.username}} </template>
|
<template v-slot:username="{ data }"> {{data.username}} </template>
|
||||||
<template v-slot:password="{ data }"> {{data.password}} </template>
|
<template v-slot:password="{ data }"> {{data.password}} </template>
|
||||||
<template v-slot:operator="{ data }">
|
<template v-slot:operator="{ data }">
|
||||||
<lay-button >修改</lay-button>
|
<lay-button size="xs">修改</lay-button>
|
||||||
<lay-button type="primary">删除</lay-button>
|
<lay-button size="xs" type="primary">删除</lay-button>
|
||||||
</template>
|
</template>
|
||||||
</lay-table>
|
</lay-table>
|
||||||
</template>
|
</template>
|
||||||
@ -77,8 +77,8 @@ export default {
|
|||||||
<template v-slot:username="{ data }"> {{data.username}} </template>
|
<template v-slot:username="{ data }"> {{data.username}} </template>
|
||||||
<template v-slot:password="{ data }"> {{data.password}} </template>
|
<template v-slot:password="{ data }"> {{data.password}} </template>
|
||||||
<template v-slot:operator="{ data }">
|
<template v-slot:operator="{ data }">
|
||||||
<lay-button >修改</lay-button>
|
<lay-button size="xs">修改</lay-button>
|
||||||
<lay-button type="primary">删除</lay-button>
|
<lay-button size="xs" type="primary">删除</lay-button>
|
||||||
</template>
|
</template>
|
||||||
</lay-table>
|
</lay-table>
|
||||||
</template>
|
</template>
|
||||||
@ -137,8 +137,8 @@ export default {
|
|||||||
<template v-slot:username="{ data }"> {{data.username}} </template>
|
<template v-slot:username="{ data }"> {{data.username}} </template>
|
||||||
<template v-slot:password="{ data }"> {{data.password}} </template>
|
<template v-slot:password="{ data }"> {{data.password}} </template>
|
||||||
<template v-slot:operator="{ data }">
|
<template v-slot:operator="{ data }">
|
||||||
<lay-button >修改</lay-button>
|
<lay-button size="xs">修改</lay-button>
|
||||||
<lay-button type="primary">删除</lay-button>
|
<lay-button size="xs" type="primary">删除</lay-button>
|
||||||
</template>
|
</template>
|
||||||
</lay-table>
|
</lay-table>
|
||||||
</template>
|
</template>
|
||||||
@ -264,8 +264,8 @@ export default {
|
|||||||
<template v-slot:username-title>😊</template>
|
<template v-slot:username-title>😊</template>
|
||||||
<template v-slot:password="{ data }"> {{data.password}} </template>
|
<template v-slot:password="{ data }"> {{data.password}} </template>
|
||||||
<template v-slot:operator="{ data }">
|
<template v-slot:operator="{ data }">
|
||||||
<lay-button >修改</lay-button>
|
<lay-button size="xs">修改</lay-button>
|
||||||
<lay-button type="primary">删除</lay-button>
|
<lay-button size="xs" type="primary">删除</lay-button>
|
||||||
</template>
|
</template>
|
||||||
</lay-table>
|
</lay-table>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user