📝(table): update

This commit is contained in:
就眠儀式 2022-07-18 21:59:37 +08:00
parent 9f2440c621
commit b6a3f37197
4 changed files with 16 additions and 128 deletions

View File

@ -196,7 +196,7 @@ const renderFixedClassName = (column: any, columnIndex: number) => {
<template v-if="column.type == 'radio'"> <template v-if="column.type == 'radio'">
<td <td
class="layui-table-cell" class="layui-table-cell layui-table-cell-radio"
:style="[ :style="[
{ {
textAlign: column.align, textAlign: column.align,
@ -246,7 +246,7 @@ const renderFixedClassName = (column: any, columnIndex: number) => {
<template v-if="column.type == 'checkbox'"> <template v-if="column.type == 'checkbox'">
<td <td
class="layui-table-cell" class="layui-table-cell layui-table-cell-checkbox"
:style="[ :style="[
{ {
textAlign: column.align, textAlign: column.align,
@ -297,7 +297,7 @@ const renderFixedClassName = (column: any, columnIndex: number) => {
<template v-if="column.type == 'number'"> <template v-if="column.type == 'number'">
<td <td
class="layui-table-cell" class="layui-table-cell layui-table-cell-number"
:style="[ :style="[
{ {
textAlign: column.align, textAlign: column.align,
@ -487,6 +487,7 @@ const renderFixedClassName = (column: any, columnIndex: number) => {
@row-double="rowDoubleClick" @row-double="rowDoubleClick"
@contextmenu="contextmenu" @contextmenu="contextmenu"
v-model:selectedKeys="tableSelectedKeys" v-model:selectedKeys="tableSelectedKeys"
v-model:selectedKey="tableSelectedKey"
> >
<template v-for="name in slotsData" #[name]="{ data }"> <template v-for="name in slotsData" #[name]="{ data }">
<slot :name="name" :data="data"></slot> <slot :name="name" :data="data"></slot>

View File

@ -456,14 +456,6 @@
border-right: none !important; border-right: none !important;
} }
.layui-table-mend {
position: absolute;
right: -49px;
top: 0;
height: 100%;
width: 50px;
}
.layui-table-tool { .layui-table-tool {
position: relative; position: relative;
z-index: 890; z-index: 890;
@ -494,6 +486,10 @@
white-space: nowrap; white-space: nowrap;
} }
.layui-table-page .layui-laypage select{
margin-top: 0px;
}
.layui-table-page > div { .layui-table-page > div {
height: 26px; height: 26px;
} }
@ -554,31 +550,6 @@
display: inline-block; display: inline-block;
} }
.layui-table-patch .layui-table-cell {
padding: 0;
width: 30px;
}
.layui-table-edit {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
padding: 0 14px 1px;
border-radius: 0;
box-shadow: 1px 1px 20px rgba(0, 0, 0, 0.15);
}
.layui-table-edit:focus {
border-color: #5fb878 !important;
}
select.layui-table-edit {
padding: 0 0 0 10px;
border-color: #d2d2d2;
}
.layui-table-view .layui-form-checkbox, .layui-table-view .layui-form-checkbox,
.layui-table-view .layui-form-radio, .layui-table-view .layui-form-radio,
.layui-table-view .layui-form-switch { .layui-table-view .layui-form-switch {
@ -587,81 +558,11 @@ select.layui-table-edit {
box-sizing: content-box; box-sizing: content-box;
} }
.layui-table-view .layui-form-checkbox { .layui-table-view .layui-table-cell-number,
top: -1px; .layui-table-view .layui-table-cell-radio,
height: 26px; .layui-table-view .layui-table-cell-checkbox {
line-height: 26px; width: 30px;
}
.layui-table-view .layui-form-checkbox i {
height: 26px;
}
.layui-table-grid .layui-table-cell {
overflow: visible;
}
.layui-table-grid-down {
position: absolute;
top: 0;
right: 0;
width: 26px;
height: 100%;
padding: 5px 0;
border-width: 0 0 0 1px;
text-align: center; text-align: center;
background-color: #fff;
color: #999;
cursor: pointer;
}
.layui-table-grid-down .layui-icon {
position: absolute;
top: 50%;
left: 50%;
margin: -8px 0 0 -8px;
}
.layui-table-grid-down:hover {
background-color: #fbfbfb;
}
body .layui-table-tips .layui-layer-content {
background: 0 0;
padding: 0;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}
.layui-table-tips-main {
margin: -44px 0 0 -1px;
max-height: 150px;
padding: 8px 15px;
font-size: 14px;
overflow-y: scroll;
background-color: #fff;
color: #666;
}
.layui-table-tips-c {
position: absolute;
right: -3px;
top: -13px;
width: 20px;
height: 20px;
padding: 3px;
cursor: pointer;
background-color: #666;
border-radius: 50%;
color: #fff;
}
.layui-table-tips-c:hover {
background-color: #777;
}
.layui-table-tips-c:before {
position: relative;
right: -2px;
} }
.layui-table, .layui-table,

View File

@ -395,6 +395,9 @@ const renderFixedClassName = (column: any, columnIndex: number) => {
:class="[ :class="[
column.fixed ? `layui-table-fixed-${column.fixed}` : '', column.fixed ? `layui-table-fixed-${column.fixed}` : '',
renderFixedClassName(column, columnIndex), renderFixedClassName(column, columnIndex),
column.type == 'checkbox' ? 'layui-table-cell-checkbox' : '',
column.type == 'radio' ? 'layui-table-cell-radio' : '',
column.type == 'number' ? 'layui-table-cell-number' : '',
]" ]"
:style="[ :style="[
{ {

View File

@ -630,10 +630,7 @@ export default {
const columns21 = [ const columns21 = [
{ {
title: "ID",
width: "30px",
type: "number", type: "number",
align: "center"
}, },
{ {
title:"账户", title:"账户",
@ -645,7 +642,6 @@ export default {
key:"password" key:"password"
},{ },{
title:"性别", title:"性别",
width: "300px",
key:"sex" key:"sex"
},{ },{
title:"年龄", title:"年龄",
@ -694,15 +690,7 @@ export default {
const columns23 = [ const columns23 = [
{ {
title: "ID",
width: "30px",
type: "checkbox", type: "checkbox",
align: "center"
},
{
title:"标识",
width:"30px",
key:"id"
}, },
{ {
title:"账户", title:"账户",
@ -714,7 +702,6 @@ export default {
key:"password" key:"password"
},{ },{
title:"性别", title:"性别",
width: "300px",
key:"sex" key:"sex"
},{ },{
title:"年龄", title:"年龄",
@ -763,10 +750,7 @@ export default {
const columns24 = [ const columns24 = [
{ {
title: "ID", type: "radio"
width: "30px",
type: "radio",
align: "center"
}, },
{ {
title:"账户", title:"账户",
@ -778,7 +762,6 @@ export default {
key:"password" key:"password"
},{ },{
title:"性别", title:"性别",
width: "300px",
key:"sex" key:"sex"
},{ },{
title:"年龄", title:"年龄",