vhb-table
Version:
一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...
316 lines (301 loc) • 11.4 kB
CSS
/*font*/
/*size*/
/*icon*/
/*color*/
/*input/radio/checkbox*/
/*popup*/
/*table*/
/*filter*/
/*menu*/
/*loading*/
/*validate*/
/*grid*/
/*toolbar*/
/*tooltip*/
/*pager*/
/*modal*/
/*checkbox*/
/*radio*/
/*button*/
/*input*/
/*textarea*/
/*form*/
/*select*/
/*switch*/
/*pulldown*/
.vhb-custom--option {
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer; }
.vhb-custom--option .vhb-checkbox--icon {
display: none;
position: absolute;
height: 1em;
width: 1em; }
.vhb-custom--option .vhb-checkbox--icon {
font-size: 16px; }
.vhb-custom--option .vhb-checkbox--icon:before {
content: "";
position: absolute;
height: 1em;
width: 1em;
top: 0;
left: 0;
background-color: #fff;
border-radius: 2px;
border: 2px solid #dcdfe6; }
.vhb-custom--option .vhb-checkbox--unchecked-icon {
display: inline-block; }
.vhb-custom--option .vhb-checkbox--checked-icon:after {
content: "";
position: absolute;
height: 0.64em;
width: 0.32em;
top: 50%;
left: 50%;
border: 2px solid #fff;
border-left: 0;
border-top: 0;
-webkit-transform: translate(-50%, -50%) rotate(45deg);
transform: translate(-50%, -50%) rotate(45deg); }
.vhb-custom--option .vhb-checkbox--indeterminate-icon:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
height: 2px;
width: 0.6em;
background-color: #fff;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%); }
.is--checked.vhb-custom--option, .is--indeterminate.vhb-custom--option {
color: #409eff; }
.is--checked.vhb-custom--option .vhb-checkbox--unchecked-icon, .is--indeterminate.vhb-custom--option .vhb-checkbox--unchecked-icon {
display: none; }
.is--checked.vhb-custom--option .vhb-checkbox--icon:before, .is--indeterminate.vhb-custom--option .vhb-checkbox--icon:before {
border-color: #409eff;
background-color: #409eff; }
.is--checked.vhb-custom--option .vhb-checkbox--checked-icon {
display: inline-block; }
.is--indeterminate.vhb-custom--option .vhb-checkbox--indeterminate-icon {
display: inline-block; }
.vhb-custom--option:not(.is--disabled):hover .vhb-checkbox--icon:before {
border-color: #409eff; }
.is--disabled.vhb-custom--option {
cursor: not-allowed;
color: #BFBFBF; }
.is--disabled.vhb-custom--option .vhb-checkbox--icon:before {
border-color: #dcdfe6;
background-color: #f3f3f3; }
.is--disabled.vhb-custom--option .vhb-checkbox--icon:after {
border-color: #c0c4cc; }
.is--disabled.vhb-custom--option .vhb-checkbox--indeterminate-icon:after {
background-color: #c0c4cc; }
/*toolbar*/
.vhb-toolbar {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: #606266;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
background-color: #fff; }
.vhb-toolbar:after {
content: "";
display: block;
clear: both;
height: 0;
overflow: hidden;
visibility: hidden; }
.vhb-toolbar.is--perfect {
border: 1px solid #e8eaec;
border-bottom-width: 0;
background-color: #f8f8f9; }
.vhb-toolbar.is--loading:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: rgba(0, 0, 0, 0.2); }
.vhb-toolbar .vhb-buttons--wrapper {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1; }
.vhb-toolbar .vhb-buttons--wrapper > .vhb-button + .vhb-button--item,
.vhb-toolbar .vhb-buttons--wrapper > .vhb-button--item + .vhb-button,
.vhb-toolbar .vhb-buttons--wrapper > .vhb-button--item + .vhb-button--item {
margin-left: 0.8em; }
.vhb-toolbar .vhb-buttons--wrapper > .vhb-button--item {
display: inline-block; }
.vhb-toolbar .vhb-tools--wrapper > .vhb-button + .vhb-tool--item,
.vhb-toolbar .vhb-tools--wrapper > .vhb-tool--item + .vhb-button,
.vhb-toolbar .vhb-tools--wrapper > .vhb-tool--item + .vhb-tool--item {
margin-left: 0.8em; }
.vhb-toolbar .vhb-tools--wrapper > .vhb-tool--item {
display: inline-block; }
.vhb-toolbar .vhb-tools--wrapper > .vhb-button {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center; }
.vhb-toolbar .vhb-tools--wrapper,
.vhb-toolbar .vhb-tools--operate {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-negative: 0;
flex-shrink: 0;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; }
.vhb-toolbar .vhb-custom--wrapper {
position: relative;
margin-left: 0.8em; }
.vhb-toolbar .vhb-custom--wrapper.is--active > .vhb-button {
background-color: #D9DADB;
border-radius: 50%; }
.vhb-toolbar .vhb-custom--wrapper.is--active .vhb-custom--option-wrapper {
display: block; }
.vhb-toolbar .vhb-custom--option-wrapper {
display: none;
position: absolute;
right: 2px;
text-align: left;
background-color: #fff;
z-index: 19;
border: 1px solid #e8eaec;
border-radius: 4px;
-webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2); }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header {
padding: 0.28em 0;
font-weight: 700;
border-bottom: 1px solid #DADCE0; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body {
padding: 0.2em 0;
max-height: 17.6em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body .vhb-custom--option:hover {
background-color: #f5f7fa; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li {
max-width: 16em;
min-width: 12.5em;
padding: 0.2em 1em 0.2em 2.3em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--2,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--2 {
padding-left: 3.5em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--2 .vhb-checkbox--icon,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--2 .vhb-checkbox--icon {
left: 1.8em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--3,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--3 {
padding-left: 4.5em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--3 .vhb-checkbox--icon,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--3 .vhb-checkbox--icon {
left: 2.8em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--4,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--4 {
padding-left: 5.5em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--4 .vhb-checkbox--icon,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--4 .vhb-checkbox--icon {
left: 3.8em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--5,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--5 {
padding-left: 6.5em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--5 .vhb-checkbox--icon,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--5 .vhb-checkbox--icon {
left: 4.8em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--6,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--6 {
padding-left: 7.5em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--6 .vhb-checkbox--icon,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--6 .vhb-checkbox--icon {
left: 5.8em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--7,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--7 {
padding-left: 8.5em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--7 .vhb-checkbox--icon,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--7 .vhb-checkbox--icon {
left: 6.8em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--8,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--8 {
padding-left: 9.5em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--header > li.level--8 .vhb-checkbox--icon,
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--body > li.level--8 .vhb-checkbox--icon {
left: 7.8em; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--footer {
border-top: 1px solid #DADCE0;
text-align: right; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--footer button {
background-color: transparent;
width: 50%;
height: 2.5em;
border: 0;
color: #606266;
text-align: center;
cursor: pointer; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--footer button:focus {
outline: none; }
.vhb-toolbar .vhb-custom--option-wrapper .vhb-custom--footer button:hover {
color: #409eff; }
.vhb-custom--option-wrapper .vhb-custom--header,
.vhb-custom--option-wrapper .vhb-custom--body {
list-style-type: none;
overflow-x: hidden;
overflow-y: auto;
margin: 0;
padding: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.vhb-custom--option-wrapper .vhb-custom--header > li,
.vhb-custom--option-wrapper .vhb-custom--body > li {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; }
.vhb-custom--option .vhb-checkbox--icon {
left: 0.6em;
top: 0.38em; }
.vhb-toolbar {
font-size: 14px;
height: 52px; }
.vhb-toolbar .vhb-custom--option > .vhb-checkbox--icon {
font-size: 16px; }
.vhb-toolbar.size--medium {
font-size: 14px;
height: 50px; }
.vhb-toolbar.size--medium .vhb-custom--option > .vhb-checkbox--icon {
font-size: 15px; }
.vhb-toolbar.size--small {
font-size: 13px;
height: 48px; }
.vhb-toolbar.size--small .vhb-custom--option > .vhb-checkbox--icon {
font-size: 14px; }
.vhb-toolbar.size--mini {
font-size: 12px;
height: 46px; }
.vhb-toolbar.size--mini .vhb-custom--option > .vhb-checkbox--icon {
font-size: 14px; }