/// <summary> /// 添加排序变更事件处理 /// </summary> protected void AddSortChange(TableHeadBuilder headBuilder) { if (_config.IsSort == false) { return; } headBuilder.AddSortChange($"{GetWrapperId()}.sort($event)"); }
/// <summary> /// 获取标签生成器 /// </summary> protected override TagBuilder GetTagBuilder() { var builder = new TableHeadBuilder(); var rowBuilder = new TableRowBuilder(); builder.AppendContent(rowBuilder); Config(rowBuilder); return(builder); }
/// <summary> /// 添加排序变更事件处理 /// </summary> private void AddSortChange(TableHeadBuilder builder) { if (_config.Contains(UiConst.OnSortChange)) { builder.AddSortChange(_config.GetValue(UiConst.OnSortChange)); return; } if (_isSort == false) { return; } builder.AddSortChange($"{_tableWrapperId}.sort($event)"); }
/// <summary> /// 添加表头 /// </summary> protected virtual void AddHead(TagBuilder tableBuilder) { if (_config.Columns.Count == 0 || _config.AutoCreateHead == false) { return; } var headBuilder = new TableHeadBuilder(); tableBuilder.AppendContent(headBuilder); AddSortChange(headBuilder); var rowBuilder = new TableRowBuilder(); AddHeadColumns(rowBuilder); headBuilder.AppendContent(rowBuilder); }
/// <summary> /// 添加表头 /// </summary> protected virtual void AddHead(TagBuilder tableBuilder) { if (_config.Titles.Count == 0 || _config.AutoCreateHead == false) { return; } var headBuilder = new TableHeadBuilder(); tableBuilder.AppendContent(headBuilder); var rowBuilder = new TableRowBuilder(); AddHeadCheckbox(rowBuilder); AddHeadTitles(rowBuilder); headBuilder.AppendContent(rowBuilder); }
/// <summary> /// 获取标签生成器 /// </summary> protected override TagBuilder GetTagBuilder() { var builder = new TableHeadBuilder(); ConfigHead(builder); var shareConfig = GetShareConfig(); if (shareConfig != null && shareConfig.AutoCreateHeadRow == false) { ConfigContent(builder); return(builder); } var rowBuilder = new TableRowBuilder(); builder.AppendContent(rowBuilder); ConfigRow(rowBuilder); return(builder); }
/// <summary> /// 添加排序变更事件处理 /// </summary> private void AddSortChange(TableHeadBuilder builder) { if (_config.Contains(UiConst.OnSortChange)) { builder.AddSortChange(_config.GetValue(UiConst.OnSortChange)); return; } var shareConfig = GetShareConfig(); if (shareConfig == null) { return; } if (shareConfig.IsSort == false) { return; } builder.AddSortChange($"{shareConfig.TableWrapperId}.sort($event)"); }
/// <summary> /// 添加表头 /// </summary> protected virtual void AddHead(TagBuilder tableBuilder) { if (_config.Titles.Count == 0 || _config.AutoCreateHead == false) { return; } var headBuilder = new TableHeadBuilder(); tableBuilder.AppendContent(headBuilder); var rowBuilder = new TableRowBuilder(); headBuilder.AppendContent(rowBuilder); foreach (var title in _config.Titles) { var headColumnBuilder = new TableHeadColumnBuilder(); headColumnBuilder.Title(title); rowBuilder.AppendContent(headColumnBuilder); } }
/// <summary> /// 配置thead /// </summary> private void ConfigHead(TableHeadBuilder builder) { AddSortChange(builder); }