/// <summary> /// 配置数据源 /// </summary> private void ConfigData(TagBuilder builder) { if (_config.Contains(UiConst.Data) == false) { return; } builder.AddAttribute("[dataSource]", _config.GetValue(UiConst.Data)); builder.AddAttribute("[loading]", "false"); }
/// <summary> /// 配置前端分页 /// </summary> private void ConfigFrontPage(TagBuilder tableBuilder) { if (_config.Contains(UiConst.FrontPage)) { tableBuilder.AddAttribute("[nzFrontPagination]", _config.GetBoolValue(UiConst.FrontPage)); return; } tableBuilder.AddAttribute("[nzFrontPagination]", "false"); }
/// <summary> /// 配置表格包装器分页信息 /// </summary> private void ConfigTableWrapperPage(TagBuilder builder) { if (_config.Contains(UiConst.PageSizeOptions)) { builder.AddAttribute("[pageSizeOptions]", _config.GetValue(UiConst.PageSizeOptions)); } }
/// <summary> /// 获取渲染器 /// </summary> /// <param name="context">上下文</param> protected override IRender GetRender(Context context) { var config = new TableConfig(context); if (config.Contains(UiConst.MaxHeight)) { return(new TempTableRender(config)); } return(new TableRender(config)); }