📝(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; display: inline-block;
} }
.layui-table-view .layui-form-checkbox,
.layui-table-view .layui-form-radio, .layui-table-view .layui-form-radio,
.layui-table-view .layui-form-checkbox,
.layui-table-view .layui-form-switch { .layui-table-view .layui-form-switch {
top: 0; top: 0;
margin: 0; margin: 0;
@ -579,11 +579,6 @@
text-align: center; text-align: center;
} }
.layui-table,
.layui-table-view {
margin: 10px 0;
}
.layui-table-cell-expand { .layui-table-cell-expand {
border-bottom: 1px solid #eee; word-break: break-all;
} }

View File

@ -280,7 +280,10 @@ const getFixedColumn = () => {
hasr.value = true; hasr.value = true;
} else { } else {
// @ts-ignore // @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; hasl.value = true;
hasr.value = false; hasr.value = false;
} else { } else {

View File

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