Пример #1
0
        private RenderFragment NotBorderedContent(DescriptionsItem item)
        {
            RenderFragment notBorderedContent = b =>
            {
                b.OpenElement(1, "span");
                b.AddAttribute(2, "class", $"{prefix}-item-content");
                b.AddContent(3, item.Content);
                b.CloseElement();
            };

            return(notBorderedContent);
        }
Пример #2
0
        private RenderFragment NotBorderedLabel(DescriptionsItem item)
        {
            RenderFragment notBorderedLabel = b =>
            {
                b.OpenElement(1, "span");
                b.AddAttribute(2, "class", $"{prefix}-item-label");
                if (!Colon)
                {
                    b.AddAttribute(3, "class", $"{prefix}-item-no-colon");
                }
                b.AddContent(4, item.Label);
                b.CloseElement();
            };

            return(notBorderedLabel);
        }
Пример #3
0
        private RenderFragment BorderedContent(DescriptionsItem item)
        {
            RenderFragment borderedContent = b =>
            {
                b.OpenElement(1, "td");
                b.AddAttribute(2, "class", $"{prefix}-item-content");
                if (Direction == DescriptionsDirection.Horizontal)
                {
                    b.AddAttribute(3, "colspan", item.Span * 2 - 1);
                }
                else
                {
                    b.AddAttribute(3, "colspan", item.Span);
                }
                b.AddContent(4, item.Content);
                b.CloseElement();
            };

            return(borderedContent);
        }
Пример #4
0
 public void AddChildItem(DescriptionsItem item)
 {
     _children.Add(item);
     StateHasChanged();
 }