(component): 新增 table 组件 skin 属性, 用于切换风格, 可选参数为 row line nob, 默认为空

This commit is contained in:
就眠儀式
2022-07-03 23:08:04 +08:00
parent d32d0c3a79
commit fd3ca29bd0
2 changed files with 60 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ export interface LayTableProps {
cellClassName?: string | Function;
rowStyle?: string | Function;
cellStyle?: string | Function;
skin?: string;
}
const props = withDefaults(defineProps<LayTableProps>(), {
@@ -296,7 +297,7 @@ props.dataSource.map((value: any) => {
<div class="layui-table-box">
<!-- 表头 -->
<div class="layui-table-header" ref="tableHeader">
<table class="layui-table" :lay-size="size">
<table class="layui-table" :lay-size="size" :lay-skin="skin">
<colgroup>
<col v-if="checkbox" class="layui-table-col-special" />
<template v-for="column in columns" :key="column">
@@ -378,6 +379,7 @@ props.dataSource.map((value: any) => {
class="layui-table"
:class="{ 'layui-table-even': props.even }"
:lay-size="size"
:lay-skin="skin"
>
<colgroup>
<col v-if="checkbox" class="layui-table-col-special" />