예제 #1
0
 /// <summary>
 /// 添加排序变更事件处理
 /// </summary>
 protected void AddSortChange(TableHeadBuilder headBuilder)
 {
     if (_config.IsSort == false)
     {
         return;
     }
     headBuilder.AddSortChange($"{GetWrapperId()}.sort($event)");
 }
예제 #2
0
        /// <summary>
        /// 获取标签生成器
        /// </summary>
        protected override TagBuilder GetTagBuilder()
        {
            var builder    = new TableHeadBuilder();
            var rowBuilder = new TableRowBuilder();

            builder.AppendContent(rowBuilder);
            Config(rowBuilder);
            return(builder);
        }
예제 #3
0
 /// <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)");
 }
예제 #4
0
        /// <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);
        }
예제 #5
0
        /// <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);
        }
예제 #6
0
        /// <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);
        }
예제 #7
0
        /// <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)");
        }
예제 #8
0
        /// <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);
            }
        }
예제 #9
0
 /// <summary>
 /// 配置thead
 /// </summary>
 private void ConfigHead(TableHeadBuilder builder)
 {
     AddSortChange(builder);
 }