UNPKG

sci-pro

Version:
657 lines (656 loc) 16.5 kB
.sci-table { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; } .sci-table .sci-checkbox { position: relative; display: inline-flex; align-items: center; width: 14px; height: 14px; cursor: pointer; } .sci-table .sci-checkbox input { position: absolute; z-index: -1; width: 0; height: 0; margin: 0; outline: none; opacity: 0; } .sci-table .sci-checkbox .sci-checkbox__inner { position: relative; box-sizing: border-box; display: inline-block; width: 14px; height: 14px; background: #fff; border: 1px solid #dcdfe6; border-radius: 2px; } .sci-table .sci-checkbox .sci-checkbox__inner::after { position: absolute; top: 1px; left: 4px; box-sizing: content-box; width: 3px; height: 7px; content: ''; border: 1px solid transparent; border-top: 0; border-left: 0; transition: transform 0.15s ease-in 0.05s; transform: rotate(45deg) scaleY(0); transform-origin: center; } .sci-table .sci-checkbox.is-checked .sci-checkbox__inner { background-color: #409eff; border-color: #409eff; } .sci-table .sci-checkbox.is-checked .sci-checkbox__inner::after { border-color: #ebebeb; transform: rotate(45deg) scaleY(1); } .sci-table .sci-checkbox.is-disabled .sci-checkbox__inner { cursor: not-allowed; background-color: #e9e9e9; border-color: #e9e9e9; } .sci-table .sci-checkbox.is-indeterminate .sci-checkbox__inner { background-color: #409eff; border-color: #409eff; } .sci-table .sci-checkbox.is-indeterminate .sci-checkbox__inner::before { position: absolute; top: 5px; right: 0; left: 0; display: block; height: 2px; content: ''; background-color: #fff; transform: scale(0.5); } .sci-table .head-table { overflow: hidden; border: 1px solid #d8dbe1; } .sci-table .head-table table { position: relative; display: table; width: 100%; text-align: center; table-layout: fixed; border-spacing: 0; border-collapse: collapse; } .sci-table .head-table table thead { position: relative; z-index: 3; background: #e7edf9; } .sci-table .head-table table thead tr th { position: relative; box-sizing: border-box; display: table-cell; height: 40px; padding: 6px 12px; font-weight: 500; font-size: 14px; text-align: left; word-break: break-all; word-wrap: break-word; background: #e7edf9; } .sci-table .head-table table thead tr th.borderTop::before { position: absolute; top: 0; right: 0; z-index: 1; width: 100%; height: 1px; content: ''; background: #d8dbe1; } .sci-table .head-table table thead tr th.fixed { position: sticky; z-index: 2; } .sci-table .head-table table thead tr th.right-fixed-border::after { position: absolute; top: 0; left: 0; z-index: 1; width: 1px; height: 100%; content: ''; background: #d8dbe1; } .sci-table .head-table table thead tr th::after { position: absolute; top: 0; right: 0; z-index: 1; width: 1px; height: 100%; content: ''; background: #d8dbe1; } .sci-table .head-table table thead tr th .sort-container { position: absolute; top: 0; right: 0; bottom: 0; width: 16px; height: 100%; } .sci-table .head-table table thead tr th .sort-container span { position: absolute; width: 16px; height: 22px; top: 50%; left: 0; transform: translateY(-50%); cursor: pointer; } .sci-table .head-table table thead tr th .sort-container span i { position: absolute; width: 0; height: 0; border: solid 5px transparent; left: 3px; } .sci-table .head-table table thead tr th .sort-container span i.up { border-bottom-color: #999; top: 0; } .sci-table .head-table table thead tr th .sort-container span i.down { border-top-color: #999; bottom: 0; } .sci-table .head-table table thead tr th .sort-container span.asc i.up { border-bottom-color: #409eff; } .sci-table .head-table table thead tr th .sort-container span.desc i.down { border-top-color: #409eff; } .sci-table .head-table table thead tr th .filter-container { position: absolute; top: 0; right: 0; bottom: 0; width: 16px; height: 100%; } .sci-table .head-table table thead tr th .filter-container .filter-icon { position: absolute; top: 50%; right: 0; width: 16px; height: 10px; cursor: pointer; transform: translateY(-50%); } .sci-table .head-table table thead tr th .filter-container .filter-icon::before { position: absolute; left: 2px; content: ''; border-top: 10px solid #999; border-right: 5px solid transparent; border-left: 5px solid transparent; } .sci-table .head-table table thead tr th .filter-container .filter-icon::after { position: absolute; top: 6px; left: 5px; width: 4px; height: 4px; content: ''; background: #999; border-top: 1px solid #fff; } .sci-table .head-table table thead tr th .filter-container .filter-icon.active::before { border-top-color: #409eff; } .sci-table .head-table table thead tr th .filter-container .filter-icon.active::after { background: #409eff; } .sci-table .head-table table thead tr .head-selection { position: sticky; left: 0; z-index: 2; text-align: center; } .sci-table .body-table-outer { position: relative; flex: 1; overflow: hidden; border: 1px solid #eaebf1; border-top: none; } .sci-table .body-table-outer .body-table { position: relative; height: 100%; overflow-x: auto; overflow-y: auto; } .sci-table .body-table-outer .body-table table { position: relative; display: table; width: 100%; table-layout: fixed; border-spacing: 0; border-collapse: collapse; } .sci-table .body-table-outer .body-table table tbody tr { height: 40px; min-height: 40px; border-collapse: collapse; background: #fff; border-bottom: 1px solid #eaebf1; } .sci-table .body-table-outer .body-table table tbody tr td { position: relative; box-sizing: border-box; display: table-cell; min-height: 40px; padding: 4px 12px; font-size: 14px; text-align: left; word-break: break-all; word-wrap: break-word; background: #fff; } .sci-table .body-table-outer .body-table table tbody tr td.fixed { position: sticky; z-index: 1; } .sci-table .body-table-outer .body-table table tbody tr td::after { position: absolute; top: 0; right: 0; width: 1px; height: 100%; content: ''; background: #eaebf1; } .sci-table .body-table-outer .body-table table tbody tr td.right-fixed-border::after { position: absolute; top: 0; left: 0; z-index: 1; width: 1px; height: 100%; content: ''; background: #eaebf1; } .sci-table .body-table-outer .body-table table tbody tr td .td-text-container { position: relative; display: flex; align-items: center; width: 100%; min-height: 30px; } .sci-table .body-table-outer .body-table table tbody tr td .td-text-container .td-text { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: 10px; cursor: pointer; border: 1px solid #b0b8c0; border-radius: 4px; } .sci-table .body-table-outer .body-table table tbody tr td .td-text-container .td-text span { color: #000; } .sci-table .body-table-outer .body-table table tbody tr td .td-text-container input { box-sizing: border-box; flex: 1; width: 100%; max-width: 100%; height: 90%; padding-left: 6px; border: 1px solid #bababa; border-radius: 3px; outline: none; } .sci-table .body-table-outer .body-table table tbody tr td .td-text-container .td-text-slot-container { height: 100%; display: flex; align-items: center; } .sci-table .body-table-outer .body-table table tbody tr td .td-text-container .td-text-slot-container > div { width: 100%; } .sci-table .body-table-outer .body-table table tbody tr td .td-text-container > div { width: 100%; } .sci-table .body-table-outer .body-table table tbody tr td .col-search-container { display: flex; align-items: center; height: 32px; } .sci-table .body-table-outer .body-table table tbody tr td .col-search-container select { width: 24px; height: 100%; padding: 0 2px; cursor: pointer; background: transparent; border: none; border-radius: 4px; outline: none; -webkit-appearance: none; -moz-appearance: none; appearance: none; } .sci-table .body-table-outer .body-table table tbody tr td .col-search-container input { flex: 1; width: calc(100% - 22px); padding: 0 4px; background: transparent; border: none; outline: none; } .sci-table .body-table-outer .body-table table tbody tr td .col-search-container input.search-option { width: calc(100% - 46px); } .sci-table .body-table-outer .body-table table tbody tr td .col-search-container .search-type-button { display: block; width: 16px; height: 16px; color: #108ee9; cursor: pointer; } .sci-table .body-table-outer .body-table table tbody tr td .col-search-container button { width: 14px; height: 14px; padding: 0; cursor: pointer; background: transparent; border: none; } .sci-table .body-table-outer .body-table table tbody tr td .col-search-container button i { display: block; width: 14px; height: 14px; color: #108ee9; } .sci-table .body-table-outer .body-table table tbody tr .head-selection { position: sticky; left: 0; z-index: 2; text-align: center; } .sci-table .body-table-outer .body-table table tbody tr .children-td { padding-left: 20px; } .sci-table .body-table-outer .body-table table tbody tr .children-td input { box-sizing: border-box; flex: 1; width: 90%; max-width: 90%; height: 90%; padding-left: 6px; border: 1px solid #bababa; border-radius: 3px; outline: none; } .sci-table .body-table-outer .body-table table tbody tr.sci-table-tbody-tr:nth-of-type(even) td { background-color: #fafbfe; } .sci-table .body-table-outer .body-table table tbody tr.sci-table-tbody-tr:hover td { background-color: #f5f8fc; } .sci-table .body-table-outer .no-data-box { display: flex; align-items: center; justify-content: center; padding: 20px 0; color: #ddd; text-align: center; } .sci-table .body-table-outer .table-x-scrollbar-container { position: absolute; right: 0; bottom: 0; left: 0; z-index: 3; height: 8px; } .sci-table .body-table-outer .table-x-scrollbar-container .table-x-scrollbar { position: absolute; bottom: 0; left: 0; height: 8px; cursor: pointer; background: #909399; border-radius: 4px; opacity: 0.4; } .sci-table .body-table-outer .table-y-scrollbar-container { position: absolute; top: 0; right: 1px; bottom: 0; z-index: 3; width: 8px; } .sci-table .body-table-outer .table-y-scrollbar-container .table-y-scrollbar { position: absolute; top: 0; left: 0; width: 8px; cursor: pointer; background: #909399; border-radius: 4px; opacity: 0.4; } .sci-table .fade-enter-active, .sci-table .fade-leave-active { transition: transform 0.1s ease; } .sci-table .fade-enter-from, .sci-table .fade-leave-to { transform: scale(0); } .sci-table .filter-content-container { position: absolute; z-index: 11; display: flex; flex-direction: column; justify-content: space-between; min-width: 180px; min-height: 200px; max-height: 280px; padding: 6px; font-size: 14px; color: #333; background: #fff; border: 1px solid #d7d7d7; border-radius: 6px; box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2); } .sci-table .filter-content-container .filter-search-container { padding: 4px 6px; border: 1px solid #c7c7c7; border-radius: 4px; } .sci-table .filter-content-container .filter-search-container .search-icon { display: inline-block; width: 12px; } .sci-table .filter-content-container .filter-search-container input { width: calc(100% - 18px); height: 100%; margin-left: 6px; border: none; outline: transparent; } .sci-table .filter-content-container .filter-list-container { flex: 1; margin: 4px 0; overflow-y: auto; } .sci-table .filter-content-container .filter-list-container::-webkit-scrollbar { width: 6px; } .sci-table .filter-content-container .filter-list-container::-webkit-scrollbar-track { background-color: #fdfdfd; /* 设置滑道背景色 */ } .sci-table .filter-content-container .filter-list-container::-webkit-scrollbar-thumb { background-color: #d6d6d6; /* 设置滑块背景色 */ border-radius: 4px; /* 设置滑块圆角 */ } .sci-table .filter-content-container .filter-list-container .filter-list-item { display: flex; align-items: center; padding: 2px 0; cursor: pointer; } .sci-table .filter-content-container .filter-list-container .filter-list-item .sci-checkbox-input { position: relative; display: inline-flex; align-items: center; width: 14px; height: 14px; } .sci-table .filter-content-container .filter-list-container .filter-list-item .sci-checkbox-input input { position: absolute; z-index: -1; width: 0; height: 0; margin: 0; outline: none; opacity: 0; } .sci-table .filter-content-container .filter-list-container .filter-list-item .sci-checkbox-input .sci-checkbox__inner { position: relative; box-sizing: border-box; display: inline-block; width: 14px; height: 14px; background: #fff; border: 1px solid #dcdfe6; border-radius: 2px; } .sci-table .filter-content-container .filter-list-container .filter-list-item .sci-checkbox-input .sci-checkbox__inner::after { position: absolute; top: 1px; left: 4px; box-sizing: content-box; width: 3px; height: 7px; content: ''; border: 1px solid transparent; border-top: 0; border-left: 0; transition: transform 0.15s ease-in 0.05s; transform: rotate(45deg) scaleY(0); transform-origin: center; } .sci-table .filter-content-container .filter-list-container .filter-list-item.is-checked .sci-checkbox__inner { background-color: #409eff; border-color: #409eff; } .sci-table .filter-content-container .filter-list-container .filter-list-item.is-checked .sci-checkbox__inner::after { border-color: #fff; transform: rotate(45deg) scaleY(1); } .sci-table .filter-content-container .filter-list-container .filter-list-item.is-indeterminate .sci-checkbox__inner { background-color: #409eff; border-color: #409eff; } .sci-table .filter-content-container .filter-list-container .filter-list-item.is-indeterminate .sci-checkbox__inner::before { position: absolute; top: 5px; right: 0; left: 0; display: block; height: 2px; content: ''; background-color: #fff; transform: scale(0.5); } .sci-table .filter-content-container .filter-list-container .filter-list-item .filter-item-text { padding-left: 6px; } .sci-table .filter-content-container .filter-list-container .filter-loading-container { display: flex; align-items: center; justify-content: center; height: 32px; gap: 5px; } .sci-table .filter-content-container .filter-list-container .filter-loading-container .filter-loading-spinner { position: relative; display: inline-block; width: 18px; height: 18px; animation: loading-rotate 0.8s linear infinite; animation-timing-function: steps(12); } .sci-table .filter-content-container .filter-list-container .filter-loading-container .filter-loading-spinner i { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .sci-table .filter-content-container .filter-list-container .filter-loading-container .filter-loading-spinner i::before { display: block; width: 2px; height: 20%; margin: 0 auto; content: ' '; background-color: currentcolor; border-radius: 40%; } @keyframes loading-rotate { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } } .sci-table .filter-content-container .filter-list-container .filter-loading-container .filter-loading-text { font-size: 12px; } .sci-table .filter-content-container .filter-button-group { display: flex; justify-content: space-around; height: 24px; } .sci-table .filter-content-container .filter-button-group div { box-sizing: border-box; width: 60px; height: 22px; font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; border: 1px solid #cacaca; border-radius: 4px; } .sci-table .filter-content-container .filter-button-group .filter-button-ok { color: #fff; background: #409eff; border-color: #409eff; } .sci-table .filter-content-container .filter-button-group .filter-button-ok:hover { opacity: 0.9; } .sci-table .filter-content-container .filter-button-group .filter-button-cancel:hover { color: #409eff; border-color: #409eff; }