Permalink
Browse files

feat: 增加grid列支持通过参数来配置文字对齐方式

  • Loading branch information...
HuYuee committed Aug 3, 2017
1 parent 07ee1ba commit 5f28bb754f69eca5507f200a19ff126fabf9f1ac
Showing with 7 additions and 1 deletion.
  1. +6 −0 snippets/grid_column/base.md
  2. +1 −1 src/js/gridCompCreate.js
@@ -123,3 +123,9 @@ integer | 1 | header的层级,目前只支持最大2级
类型 | 默认值 | 说明
------- | --- | --------------------------------------------------------
integer | 1 | 当表格属性overWidthHiddenColumn为true时,自动隐藏的优先级,数值越大,宽度不足时优先显示
### textAlign
类型 | 默认值 | 说明
------ | ------ | --------------------------------------------------------
string | left | 设置grid列的文字对齐方式,例如:left,right,center;
View
@@ -347,7 +347,7 @@ const createThead = function(createFlag) {
if (this.options.required) {
requiredHtml = '<span style="color:red;">*</span>';
}
htmlStr += '<div class="u-grid-header-link" field="' + this.options.field + '" ' + colorStype + '>' + this.options.title + requiredHtml + '</div>';
htmlStr += '<div class="u-grid-header-link" field="' + this.options.field + '" style="text-align:' + this.options.textAlign + '" ' + colorStype + '>' + this.options.title + requiredHtml + '</div>';
/*if(oThis.options.columnMenu && createFlag != 'fixed'){
// 创建右侧按钮图标
htmlStr += '<div class="u-grid-header-columnmenu uf uf-navmenu-light " field="' + this.options.field + '" style="display:none;"></div>';

0 comments on commit 5f28bb7

Please sign in to comment.