📝(component): update

This commit is contained in:
就眠儀式 2022-07-31 00:55:52 +08:00
parent 43e626cfe6
commit 7d1927248a
3 changed files with 19 additions and 15 deletions

View File

@ -564,8 +564,8 @@
display: inline-block;
}
.layui-table-view .layui-form-checkbox,
.layui-table-view .layui-form-radio,
.layui-table-view .layui-form-checkbox,
.layui-table-view .layui-form-switch {
top: 0;
margin: 0;
@ -579,11 +579,6 @@
text-align: center;
}
.layui-table,
.layui-table-view {
margin: 10px 0;
}
.layui-table-cell-expand {
border-bottom: 1px solid #eee;
}
word-break: break-all;
}

View File

@ -280,7 +280,10 @@ const getFixedColumn = () => {
hasr.value = true;
} else {
// @ts-ignore
if (tableBody.value?.scrollLeft + tableBody.value?.offsetWidth + 2 > tableBody.value?.scrollWidth) {
if (
tableBody.value?.scrollLeft + tableBody.value?.offsetWidth + 2 >
tableBody.value?.scrollWidth
) {
hasl.value = true;
hasr.value = false;
} else {

View File

@ -227,9 +227,9 @@ export default {
<template>
<lay-table :columns="columns6" :data-source="dataSource6">
<template v-slot:expand="{ data }">
{{ data }}
</template>
<template v-slot:expand="{ data }">
<lay-table :columns="columns6" :data-source="dataSource6"></lay-table>
</template>
</lay-table>
</template>
@ -502,9 +502,12 @@ export default {
::: demo 通过 `skin` 属性, 切换 table 风格。
<template>
<lay-table :columns="columns1" :data-source="dataSource1" skin="line"></lay-table>
<lay-table :columns="columns1" :data-source="dataSource1" skin="nob" :even="true"></lay-table>
<lay-table :columns="columns1" :data-source="dataSource1" skin="row"></lay-table>
<lay-form>
<lay-radio v-model="skin1" name="action" value="line">sm</lay-radio>
<lay-radio v-model="skin1" name="action" value="nob">md</lay-radio>
<lay-radio v-model="skin1" name="action" value="row">lg</lay-radio>
</lay-form>
<lay-table :columns="columns1" :data-source="dataSource1" :skin="skin1"></lay-table>
</template>
<script>
@ -513,6 +516,8 @@ import { ref } from 'vue'
export default {
setup() {
const skin1 = ref("line");
const columns1 = [
{
title:"账户",
@ -543,6 +548,7 @@ export default {
]
return {
skin1,
columns1,
dataSource1,
}