ComponentBuilder
  • 🌍English
    • Introduction
    • Quick Start
    • CSS Class
      • CssClass Attribute
      • BooleanCssClass Attribute
      • NullCssClass Attribute
      • BuildCssClass Method
    • HTML Attribute
      • HtmlTagAttribute
      • HtmlAttribute Attribute
      • HtmlRole Attribute
      • HtmlData Attribute
      • HtmlAria Atrribute
      • HtmlEvent Attribute
      • BuildAttributes Method
    • Component Association
    • Interceptor
    • Extensions
      • RenderTreeBuilder Extensions
  • 🇨🇳Chinese
    • 简介
    • 快速开始
    • CSS 类
      • CssClassAttribute 特性
      • BooleanCssClass 特性
      • NullCssClass Attribute
      • BuildCssClass 方法
    • HTML 属性
      • HtmlTag 特性
      • HtmlAttribute 特性
      • HtmlRole 特性
      • HtmlData 特性
      • HtmlAria Atrribute
      • HtmlEvent Attribute
      • BuildAttributes Method
    • 组件关联
    • 拦截器
    • 扩展
      • RenderTreeBuilder 的扩展
Powered by GitBook
On this page
  1. 🇨🇳Chinese
  2. HTML 属性

HtmlData 特性

生成 data-{name}="value" 的 HTML 属性

[Parameter][HtmlData("collapse")]public bool Active { get; set; }
[Parameter][HtmlData("toggle","active")]public bool Toggle { get; set; } 
<Component Active/>
<div data-collaspe="true"></div>

<Component Toggle/>
<div data-toggle="acitve"></div>
PreviousHtmlRole 特性NextHtmlAria Atrribute

Last updated 2 years ago