UNPKG

dareway-rui

Version:

516 lines (418 loc) 10.5 kB
/************************************************************************************ * grid */ .rui-grid-wrapper { padding: 10px 10px 10px 10px; } .rui-grid-wrapper:focus { /* 去掉 grid 获得焦点后的外框颜色 */ border-color: transparent !important; outline: transparent !important; } /** * 支持双击的Grid */ .rui-grid-dblclck{ } /** * !!注意!! * 1. 主流浏览器支持 cursor: url() x y, default 格式;IE只支持 cursor: url(), default; * 2. 主流浏览器,鼠标指针默认为图片的左上角;IE为图片左下角(会给人比较大的位置错觉,所以IE中降级处理,不展示自定义cursor) */ .rui-grid-dblclck .ant-table-tbody > tr{ cursor: url(./dblclick.ico) 0 0, pointer; } /************************************************************************************ * grid 高度模式 */ .rui-grid-height-fill { display: flex; flex-direction: column; flex-shrink: 0; flex-grow: 1; } .rui-grid-height-fixed { flex-shrink: 0; } .rui-grid-height-need { flex-shrink: 0; } .rui-grid-height-min{ min-height: 250px; } /************************************************************************************ * grid 右键菜单 */ .react-contextmenu-wrapper { } .react-contextmenu { padding: 4px 0; background-color: #fff; border-radius: 4px; box-shadow: 2px 2px 8px rgba(0, 0, 0, .25); } .react-contextmenu-item { padding: 5px 12px; margin: 0; font-size: 14px; color: black; white-space: nowrap; line-height: 22px; cursor: pointer; min-width: 150px; } /* ## 1. fill 模式*/ .rui-grid-height-fill .react-contextmenu-wrapper { display: flex; flex-grow: 1; flex-shrink: 1; } /* ## 2. fixed 模式*/ .rui-grid-height-fixed .react-contextmenu-wrapper { height: 100%; } /************************************************************************************ * grid 表格区域容器 */ .ant-table-wrapper { width: 100%; } /* ## 1. fill 模式 */ .rui-grid-height-fill .ant-table-wrapper { display: flex; flex-direction: column; flex-grow: 1; flex-shrink: 1; } /* ## 2. fixed 模式*/ .rui-grid-height-fixed .ant-table-wrapper { height: 100%; display: flex; flex-direction: column; } /************************************************************************************ * grid 表格区 */ .ant-table { color: black; } /* ## 1. fill 模式 */ .rui-grid-height-fill .ant-table, .rui-grid-height-fixed .ant-table { display: flex; flex-direction: column; flex-grow: 1; flex-shrink: 1; } /************************************************************************************ * grid 表格标题 */ .ant-table-title { padding: 8px 0; width: 100%; } /* ## 1. fill 模式 */ .rui-grid-height-fill .ant-table-title, .rui-grid-height-fixed .ant-table-title{ flex-grow: 0; flex-shrink: 0; } /** * 标题区域的导出图标 */ .rui-grid-title-exportImage { height: 22px; width: 20px; background: url("../export/exportExcel.png") no-repeat right top; position: absolute; right: 5px; cursor: pointer } /************************************************************************************ * grid 表格内容区 */ .ant-table-content { width: 100%; } /* ## 1. fill 模式 */ .rui-grid-height-fill .ant-table-content, .rui-grid-height-fixed .ant-table-content{ display: flex; flex-grow: 1; flex-shrink: 1; } /************************************************************************************ * grid 表格内容区滚动容器 */ .ant-table-scroll { width: 100%; overflow: auto; overflow-x: hidden; } /* ## 1. fill 模式 */ .rui-grid-height-fill .ant-table-scroll, .rui-grid-height-fixed .ant-table-scroll{ display: flex; flex-direction: column; flex-grow: 1; } /************************************************************************************ * grid 表格表头区 */ .ant-table-header { background: #fafafa; overflow: hidden; scrollbar-arrow-color: #fafafa; scrollbar-track-color: #fafafa; border: solid #e8e8e8 1px; border-bottom-width: 0px; } .ant-table-header::-webkit-scrollbar { background: #fafafa; } /* ## 1. fill 模式 */ .rui-grid-height-fill .ant-table-header, .rui-grid-height-fixed .ant-table-header { flex-shrink: 0; flex-grow: 0; } /************************************************************************************ * grid 表格表体区 */ .ant-table-body { border: 1px solid #e8e8e8; } .ant-table-body th:first-child { border-left: none; border-right: none; } /* ## 1. fill 模式 */ .rui-grid-height-fill .ant-table-body, .rui-grid-height-fixed .ant-table-body{ overflow: auto; flex-grow: 1; flex-shrink: 1; flex-direction: column; height: 0px; } /************************************************************************************ * grid 分页器 */ .ant-pagination.ant-table-pagination { margin: 12px 0; text-align: right; } .ant-pagination-prev, .ant-pagination-next { min-width: 30px; min-height: 30px; height: 30px; line-height: 28px; } .ant-pagination-item { min-width: 30px; min-height: 30px; height: 30px; line-height: 28px; } /* ## 1. fill 模式下的分页器 */ .rui-grid-height-fill .ant-pagination, .rui-grid-height-fixed .ant-pagination{ flex-shrink: 0; flex-grow: 0; } /************************************************************************************ * 未分配 */ .rui-grid-column-has-sorter { cursor: pointer; } .rui-grid-column-has-sorter:hover { background-color: rgb(233, 233, 233); } .rui-grid-column-has-sorter.rui-grid-column-sorted:hover { background-color: rgb(233, 233, 233); } .rui-grid-column-has-sorter.rui-grid-column-sorted { background-color: #f5f5f5; } .rui-grid-column-sorter-container { display: inline-block; top: 2px; position: relative; width: 12px; flex-grow: 0; flex-shrink: 0; } .rui-grid-column-sorter-item { width: 14px; height: 14px; } .rui-grid-column-sorter-icon-on { color: #1890ff; font-size: 12px; height: 4px; } .rui-grid-column-sorter-icon-off { color: rgb(191, 191, 191); font-size: 12px; } .ant-table table { table-layout: fixed; min-width: 0; width: auto; } .ant-table-bordered .ant-table-body > table { border-top: none; } .ant-table-thead > tr > th { color: black; } .ant-table-thead > tr > th { padding: 8px 12px; } .ant-table-tbody > tr > td { padding: 4px 4px; } /*排序ui时 高度会撑开 为同没有排序时保持一致*/ .ant-table-thead > tr > th.rui-grid-column-has-sorter { padding: 5px 12px 7px 12px } .ant-table-placeholder { display: none; } /** * 解决ButtonsColumn中按钮换行问题 */ .rui-grid-buttonscolumn { text-align: center; white-space: nowrap; overflow: hidden; } .rui-grid-buttonscolumn-picbutton-wrapper { margin-left: 10px; cursor: pointer; font-size: 17px; display: inline-block; } .rui-grid-buttonscolumn .ant-btn { height: 26px; padding: 0 12px; font-size: 12px; } /** * 定制 checkbox 列颜色 */ rui-grid-wrapper .ant-checkbox-inner { border: 1px solid rgba(0, 0, 0, 0.65); } .rui-grid-wrapper .ant-input { height: 29px; } .rui-grid-wrapper .ant-select-selection__clear { top: 13px; } .rui-grid-wrapper .ant-select-selection__rendered { height: 27px; line-height: 27px; } .rui-grid-wrapper .ant-select-selection { min-height: 27px; } .rui-grid-wrapper .ant-input-suffix { top: 49%; } .rui-grid-wrapper .ant-btn.ant-input-search-button.ant-btn-primary { height: 27px; padding: 0px 4px; } .rui-grid-wrapper .anticon.anticon-search { font-size: 14px; } .rui-grid-wrapper .ant-select-selection { height: 29px; } /** * Header */ .rui-grid-column-header-cell-wrapper { position: relative; text-align: center; display: flex; justify-content: center; } .rui-grid-column-header-required { color: red; width: 7px; flex-shrink: 0; flex-grow: 0; } .rui-grid-column-header-text{ flex-grow: 0; flex-shrink: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rui-grid-column-has-edit { position: absolute; top: 8px; right: 1px; font-size:13px; color: #6f6f6f; } /** * 伸缩列 */ .rui-grid-wrapper .react-resizable { position: relative; background-clip: padding-box; } .rui-grid-wrapper .react-resizable-handle { position: absolute; width: 10px; height: 100%; bottom: 0; right: -5px; cursor: col-resize; } /*** 鼠标移上去的时候 行不变颜色 */ .ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row) > td, .ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row) > td, .ant-table-thead > tr:hover:not(.ant-table-expanded-row) > td, .ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td { background: none; } /** * compact mode */ .rui-grid-wrapper-compact .ant-input { height: 21px; } .rui-grid-wrapper-compact .ant-table-tbody > tr > td { padding: 2px 4px; } .rui-grid-wrapper-compact .rui-singleSelect-selection__rendered { line-height: 21px; } .rui-grid-wrapper-compact .rui-singleSelect-selection--single { height: 21px; } .rui-grid-wrapper-compact .ant-select-selection { height: 21px; min-height: 20px; } .rui-grid-wrapper-compact .ant-select-selection__rendered { height: 21px; line-height: 21px; } .rui-grid-wrapper-compact .ant-btn.ant-input-search-button.ant-btn-primary { height: 21px; } .rui-grid-wrapper-compact .ant-table-thead > tr > th { padding: 4px 12px; } .rui-grid-wrapper-compact .rui-grid-column-has-edit { top: 4px; } .ant-table-bordered .ant-table-tbody > tr > td { border: 1px solid #a7a4a4; }