form-layout
界面基元 组件无法成为的那些形状,因为它们包住的主体只有调用方知道:卡片、数据网格、菜单,以及外壳自身的框架。
给表单节奏感和保存栏的那些属性。它们包住你自己拼出来的一串字段。
每个示例都能真实操作,但其中的链接不会跳转到任何地方。 HTML 显示可复制的标记。
<form rst-form-flow method ="post" action ="/settings" >
<div rst-field >
<label rst-field-label for ="name" >姓名</label >
<input rst-input type ="text" id ="name" name ="name" >
</div >
<div rst-field >
<label rst-field-label for ="email" >电子邮件</label >
<input rst-input type ="email" id ="email" name ="email" >
</div >
<div rst-field-row >
<div class ="rst-grow" rst-field >
<label rst-field-label for ="city" >城市</label >
<input rst-input type ="text" id ="city" name ="city" >
</div >
<div rst-field >
<label rst-field-label for ="zip" >邮编</label >
<input rst-input ="short" type ="text" id ="zip" name ="zip" >
</div >
</div >
<div rst-form-bar >
<span rst-form-bar-note >更改会立即保存。</span >
<div rst-form-actions >
<a rst-btn href ="/settings" >取消</a >
<button rst-btn ="primary" type ="submit" >保存</button >
</div >
</div >
</form >
在应用里,这会到达 /settings。在这里,它的链接和表单哪儿也不去。