Permalink
Browse files

feat: 优化columnMenuType为border情况下的操作区展示

  • Loading branch information...
LiuYueKai committed Jun 23, 2017
1 parent 745ac15 commit 28d7a43c904b39da04616d787f3db0ab12dfaa03
Showing with 53 additions and 13 deletions.
  1. +43 −4 src/css/grid.css
  2. +10 −9 src/js/re_gridCompColMenu.js
View
@@ -232,7 +232,7 @@ header区域css begin
cursor: col-resize;
z-index: 12;
width: .6em;
height: 2.125em;
height: 100%;
display: block;
bottom: 0px;
}
@@ -779,7 +779,6 @@ columnMenu区域css begin
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
padding: 20px;
border-width: 1px;
border-style: solid;
border-color: #cecece;
@@ -803,6 +802,21 @@ columnMenu区域css begin
-webkit-box-sizing: border-box;
}
.u-grid-column-menu-ul-border {
background-color: #fff;
font-weight: 500;
background-image: none;
padding: 16px;
margin: 0px;
background-position: 50% 50%;
border-width: 0px 0px 1px 0px;
border-style: solid;
border-color: #cecece;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.u-grid-column-menu-li {
display: block;
height: 2.125em;
@@ -876,6 +890,19 @@ columnMenu columns区域css begin
margin: 0px;
}
.u-grid-column-menu-columns-ul-border {
border-width: 1px 0px 1px 0px;
border-style: solid;
border-color: #cecece;
background-color: #fff;
font-weight: 500;
background-image: none;
padding: 0px;
background-position: 50% 50%;
margin: 0px;
}
.u-grid-column-menu-columns-li {
display: block;
height: 30px;
@@ -935,7 +962,8 @@ columnMenu columns区域css begin
-khtml-opacity: 0.7;
opacity: .7;*/
width: 60px;
text-align: center;
text-align: left;
padding-left: 8px;
border-width: 0px 1px 1px 0px;
border-style: solid;
border-color: #cecece;
@@ -946,7 +974,7 @@ columnMenu columns区域css begin
.u-grid-column-menu-columns-span-border {
position: absolute;
width: 136px;
width: 144px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -961,6 +989,17 @@ columnMenu columns区域css begin
padding-right: 12px;
}
.u-grid-column-menu-div1-border{
position: relative;
width: 100%;
height: 30px;
text-align: center;
line-height: 30px;
}
.u-grid-column-menu-span-border{
}
/*
columnMenu columns区域css end
@@ -60,17 +60,13 @@ const re_createColumnMenu_base = function() {
const re_createColumnMenu_border = function() {
var oThis = this;
var htmlStr = '<div class="u-grid-column-menu-border" id="' + this.options.id + '_column_menu">';
htmlStr += '<ul data-role="menu" role="menubar" class="u-grid-column-menu-ul" id="' + this.options.id + '_column_menu_ul">';
htmlStr += '<ul data-role="menu" role="menubar" class="u-grid-column-menu-ul-border" id="' + this.options.id + '_column_menu_ul">';
// 创建清除设置
htmlStr += '<li class="u-grid-column-menu-li" role="menuitem">';
htmlStr += '<div class="u-grid-column-menu-div1" id="' + this.options.id + '_clearSet">';
htmlStr += '<span class="u-grid-column-menu-span">' + this.transMap.ml_clear_set + '</span>';
htmlStr += '</div></li>';
var columnHtmlStr = '<div class="u-grid-column-menu-columns" id="' + this.options.id + '_column_menu_columns">';
columnHtmlStr += '<ul data-role="menu" role="menubar" class="u-grid-column-menu-columns-ul" id="' + this.options.id + '_column_menu_columns_ul">';
columnHtmlStr += '<ul data-role="menu" role="menubar" class="u-grid-column-menu-columns-ul-border" id="' + this.options.id + '_column_menu_columns_ul">';
var allCheckFlag = true;
$.each(this.gridCompColumnArr, function(i) {
if (oThis.getString(this.options.title, '') != '') {
@@ -97,13 +93,18 @@ const re_createColumnMenu_border = function() {
var headerHtmlStr = '<li class="u-grid-column-menu-columns-li header" role="menuitem">';
headerHtmlStr += '<div class="u-grid-column-menu-columns-div1-border">';
headerHtmlStr += '<div class="u-grid-column-menu-columns-div2-border"><input type="checkbox" ' + checkedStr + '><label></label>&nbsp;显示</div>';
headerHtmlStr += '<span class="u-grid-column-menu-columns-span-border">项目</span>';
headerHtmlStr += '<span class="u-grid-column-menu-columns-span-border" style="text-align:center;">项目名称</span>';
headerHtmlStr += '</div></li>';
htmlStr += headerHtmlStr;
htmlStr += columnHtmlStr;
htmlStr += '</ul></div>';
htmlStr += '</ul>';
// 创建清除设置
htmlStr += '<div class="u-grid-column-menu-div1-border" id="' + this.options.id + '_clearSet">';
htmlStr += '<span class="u-grid-column-menu-span-border">' + this.transMap.ml_clear_set + '</span>';
htmlStr += '</div>';
htmlStr += '</div>';
// 创建数据列区域

0 comments on commit 28d7a43

Please sign in to comment.