Exemple #1
0
        /// <summary>
        /// 配置宽度
        /// </summary>
        private void ConfigWidth(TableHeadColumnBuilder builder)
        {
            if (_config.Contains(UiConst.Width))
            {
                builder.AddWidth(_config.GetValue(UiConst.Width));
                return;
            }
            var columnInfo = GetColumnInfo();

            if (columnInfo == null || columnInfo.Width.IsEmpty())
            {
                return;
            }
            builder.AddWidth(columnInfo.Width);
        }
Exemple #2
0
 /// <summary>
 /// 配置序号
 /// </summary>
 private void ConfigLineNumber(TableHeadColumnBuilder builder)
 {
     if (_config.GetValue <TableColumnType?>(UiConst.Type) != TableColumnType.LineNumber)
     {
         return;
     }
     builder.Title(R.LineNumber);
     if (_config.Contains(UiConst.Width))
     {
         return;
     }
     builder.AddWidth(TableConfig.LineNumberWidth);
 }
Exemple #3
0
        /// <summary>
        /// 配置复选框
        /// </summary>
        private void ConfigCheckbox(TableHeadColumnBuilder builder)
        {
            if (_config.GetValue <TableColumnType?>(UiConst.Type) != TableColumnType.Checkbox)
            {
                return;
            }
            var tableId = _config.GetValueFromItems <TableShareConfig>()?.TableId;

            builder.AddCheckBox(tableId);
            if (_config.Contains(UiConst.Width))
            {
                return;
            }
            builder.AddWidth(TableConfig.CheckboxWidth);
        }
Exemple #4
0
 /// <summary>
 /// 添加复选框列
 /// </summary>
 private void AddColumn(TableHeadColumnBuilder headColumnBuilder, ColumnInfo column)
 {
     headColumnBuilder.AddWidth(column.Width);
     headColumnBuilder.Title(column.Title);
     headColumnBuilder.AddSort(column.GetSortKey());
 }