vxe-table-select-area
Version:
一个基于 vxe-table 的可区域选中复制、粘贴的组件
276 lines (273 loc) • 8.12 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*/
.vxe-custom--option .vxe-checkbox--icon {
font-size: 1.34em;
}
.vxe-custom--option .vxe-checkbox--icon {
color: #dcdfe6;
vertical-align: middle;
font-weight: 700;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.is--checked.vxe-custom--option, .is--indeterminate.vxe-custom--option {
color: #409eff;
}
.is--checked.vxe-custom--option .vxe-checkbox--icon, .is--indeterminate.vxe-custom--option .vxe-checkbox--icon {
color: #409eff;
}
.vxe-custom--option:not(.is--disabled) {
cursor: pointer;
}
.vxe-custom--option:not(.is--disabled):hover .vxe-checkbox--icon {
color: #409eff;
}
.is--disabled.vxe-custom--option {
color: #BFBFBF;
cursor: not-allowed;
}
.is--disabled.vxe-custom--option .vxe-checkbox--icon {
color: #dcdfe6;
}
.vxe-custom--option .vxe-checkbox--label {
padding-left: 0.5em;
vertical-align: middle;
}
/*toolbar*/
.vxe-toolbar {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
padding: 0.6em 0;
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;
}
.vxe-toolbar:after {
content: "";
display: block;
clear: both;
height: 0;
overflow: hidden;
visibility: hidden;
}
.vxe-toolbar.is--perfect {
border: 1px solid #e8eaec;
border-bottom-width: 0;
background-color: #f8f8f9;
}
.vxe-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;
user-select: none;
background-color: rgba(255, 255, 255, 0.5);
}
.vxe-toolbar .vxe-buttons--wrapper {
flex-grow: 1;
}
.vxe-toolbar .vxe-buttons--wrapper > .vxe-button + .vxe-button--item, .vxe-toolbar .vxe-buttons--wrapper > .vxe-button--item + .vxe-button, .vxe-toolbar .vxe-buttons--wrapper > .vxe-button--item + .vxe-button--item {
margin-left: 0.8em;
}
.vxe-toolbar .vxe-buttons--wrapper > .vxe-button--item {
display: inline-block;
}
.vxe-toolbar .vxe-tools--wrapper > .vxe-button + .vxe-tool--item, .vxe-toolbar .vxe-tools--wrapper > .vxe-tool--item + .vxe-button, .vxe-toolbar .vxe-tools--wrapper > .vxe-tool--item + .vxe-tool--item {
margin-left: 0.8em;
}
.vxe-toolbar .vxe-tools--wrapper > .vxe-tool--item {
display: inline-block;
}
.vxe-toolbar .vxe-tools--wrapper > .vxe-button {
display: flex;
align-items: center;
justify-content: center;
}
.vxe-toolbar .vxe-buttons--wrapper,
.vxe-toolbar .vxe-tools--wrapper,
.vxe-toolbar .vxe-tools--operate {
display: flex;
align-items: center;
}
.vxe-toolbar .vxe-buttons--wrapper,
.vxe-toolbar .vxe-tools--wrapper {
flex-wrap: wrap;
}
.vxe-toolbar .vxe-tools--operate {
flex-shrink: 0;
}
.vxe-toolbar .vxe-custom--wrapper {
position: relative;
margin-left: 0.8em;
}
.vxe-toolbar .vxe-custom--wrapper.is--active > .vxe-button {
background-color: #D9DADB;
border-radius: 50%;
}
.vxe-toolbar .vxe-custom--wrapper.is--active .vxe-custom--option-wrapper {
display: block;
}
.vxe-toolbar .vxe-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;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header {
padding: 0.28em 0;
font-weight: 700;
border-bottom: 1px solid #DADCE0;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body {
padding: 0.2em 0;
max-height: 17.6em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body .vxe-custom--option:hover {
background-color: #f5f7fa;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li {
max-width: 16em;
min-width: 12.5em;
padding: 0.2em 1em 0.2em 1em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--2,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--2 {
padding-left: 3.5em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--2 .vxe-checkbox--icon,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--2 .vxe-checkbox--icon {
left: 1.8em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--3,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--3 {
padding-left: 4.5em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--3 .vxe-checkbox--icon,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--3 .vxe-checkbox--icon {
left: 2.8em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--4,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--4 {
padding-left: 5.5em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--4 .vxe-checkbox--icon,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--4 .vxe-checkbox--icon {
left: 3.8em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--5,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--5 {
padding-left: 6.5em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--5 .vxe-checkbox--icon,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--5 .vxe-checkbox--icon {
left: 4.8em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--6,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--6 {
padding-left: 7.5em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--6 .vxe-checkbox--icon,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--6 .vxe-checkbox--icon {
left: 5.8em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--7,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--7 {
padding-left: 8.5em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--7 .vxe-checkbox--icon,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--7 .vxe-checkbox--icon {
left: 6.8em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--8,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--8 {
padding-left: 9.5em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header > li.level--8 .vxe-checkbox--icon,
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body > li.level--8 .vxe-checkbox--icon {
left: 7.8em;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer {
border-top: 1px solid #DADCE0;
text-align: right;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer button {
background-color: transparent;
width: 50%;
height: 2.5em;
border: 0;
color: #606266;
text-align: center;
cursor: pointer;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer button:focus {
outline: none;
}
.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer button:hover {
color: #409eff;
}
.vxe-custom--option-wrapper .vxe-custom--header,
.vxe-custom--option-wrapper .vxe-custom--body {
list-style-type: none;
overflow-x: hidden;
overflow-y: auto;
margin: 0;
padding: 0;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.vxe-custom--option-wrapper .vxe-custom--header > li,
.vxe-custom--option-wrapper .vxe-custom--body > li {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.vxe-toolbar {
font-size: 14px;
}
.vxe-toolbar.size--medium {
font-size: 14px;
}
.vxe-toolbar.size--small {
font-size: 13px;
}
.vxe-toolbar.size--mini {
font-size: 12px;
}