/// <summary> /// 设置目标属性 /// </summary> /// <param name="source"></param> /// <param name="element"></param> internal static void SetTargetAttribute(this LinkBehave source, IHtmlElement element) { var target = source.GetTarget(); if (target == null) { return; } element.Attribute(HtmlAttribute.Target, target); }
/// <summary> /// 获取目标内容 /// </summary> /// <param name="source"></param> /// <returns></returns> internal static string GetTarget(this LinkBehave source) { switch (source) { case LinkBehave.Open: return("_open"); case LinkBehave.Call: return("_call"); case LinkBehave.Self: return("_self"); case LinkBehave.Blank: return("_blank"); default: return(null); } }
public DynamicTableAction(string text, string location, LinkBehave behave) : base(text, location, behave) { }
public TableAction(string text, string location, LinkBehave behave) { Text = text; Location = location; Behave = behave; }
/// <summary> /// 创建路径 /// </summary> /// <param name="display"></param> /// <param name="path"></param> /// <param name="icon"></param> /// <param name="behave"></param> /// <returns></returns> public static ILocation Create(string display, string path, FontAwesome icon, LinkBehave behave) { return(new Location(path) { Display = display, Icon = icon, Behave = behave }); }