//protected override ItemText Deserialize(string exp) => Serializer.Deserialize<ItemTextHeader>(exp, RootName); //protected override string Serialize() => Serializer.Serialize(this, RootName); protected override void Build(ItemText source) { base.Build(source); if (source is ItemTextHeader s) { Header = s.Header; } }
/// <summary> /// 格式化 /// </summary> /// <param name="outer"></param> protected override void Format(IHtmlOutput outer) { Header.Prepend(Icon.CreateElement()); HeaderCaption.Text(Caption); if (HeaderSearchForm != null) { Header.Append(HeaderSearchForm); } if (!string.IsNullOrWhiteSpace(Description)) { var span = new HtmlElement(HtmlTag.Span); span.Text(Description); HeaderCaption.After(span); } AddClass("webman-panel"); base.Format(outer); }