Merge branch 'next' of https://gitee.com/layui/layui-vue into next
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
.layui-table-tool,
|
||||
.layui-table-total,
|
||||
.layui-table-total tr,
|
||||
.layui-table[lay-even] tr:nth-child(even) {
|
||||
.layui-table.layui-table-even tr:nth-child(even) {
|
||||
background-color: var(--global-neutral-color-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ export interface LayTableProps {
|
||||
childrenColumnName?: string;
|
||||
height?: number;
|
||||
maxHeight?: string;
|
||||
even?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<LayTableProps>(), {
|
||||
@@ -39,6 +40,7 @@ const props = withDefaults(defineProps<LayTableProps>(), {
|
||||
dataSource: () => [],
|
||||
selectedKeys: () => [],
|
||||
maxHeight: "auto",
|
||||
even: false,
|
||||
});
|
||||
|
||||
const tableId = uuidv4();
|
||||
@@ -364,7 +366,7 @@ props.dataSource.map((value: any) => {
|
||||
:style="{ height: height, maxHeight: maxHeight }"
|
||||
ref="tableBody"
|
||||
>
|
||||
<table class="layui-table" :lay-size="size">
|
||||
<table class="layui-table" :class="{'layui-table-even': props.even}" :lay-size="size">
|
||||
<colgroup>
|
||||
<col v-if="checkbox" class="layui-table-col-special" />
|
||||
<template v-for="column in columns" :key="column">
|
||||
|
||||
Reference in New Issue
Block a user