/// <summary> /// 配置文本 /// </summary> private void ConfigText(TagBuilder builder) { if (_config.Contains(UiConst.Text)) { builder.SetContent(_config.GetValue(UiConst.Text)); } }
/// <summary> /// 配置标识 /// </summary> private void ConfigId(TagBuilder builder) { if (_config.Contains(UiConst.Id)) { builder.AddAttribute($"#{_config.GetValue( UiConst.Id )}", "", false); } }
/// <summary> /// 获取渲染器 /// </summary> /// <param name="context">上下文</param> protected override IRender GetRender(Context context) { var config = new ButtonConfig(context); if (config.Contains(MaterialConst.MenuId)) { return(new ButtonRender(config)); } return(new ButtonWrapperRender(config)); }
/// <summary> /// 配置文本 /// </summary> private void ConfigText(TagBuilder builder) { if (_config.Contains(UiConst.Text)) { builder.SetContent(_config.GetValue(UiConst.Text)); } if (_config.Contains(AngularConst.BindText)) { builder.SetContent($"{{{{{_config.GetValue( AngularConst.BindText )}}}}}"); } }