示例#1
0
 /// <summary>
 /// 配置文本
 /// </summary>
 private void ConfigText(TagBuilder builder)
 {
     if (_config.Contains(UiConst.Text))
     {
         builder.SetContent(_config.GetValue(UiConst.Text));
     }
 }
示例#2
0
 /// <summary>
 /// 配置标识
 /// </summary>
 private void ConfigId(TagBuilder builder)
 {
     if (_config.Contains(UiConst.Id))
     {
         builder.AddAttribute($"#{_config.GetValue( UiConst.Id )}", "", false);
     }
 }
示例#3
0
        /// <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));
        }
示例#4
0
 /// <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 )}}}}}");
     }
 }