2015-07-07 11:25:16 +08:00
|
|
|
# 禁用状态
|
2015-06-15 20:24:01 +08:00
|
|
|
|
2015-07-21 14:55:22 +08:00
|
|
|
- order: 2
|
2015-06-15 20:24:01 +08:00
|
|
|
|
2015-07-07 11:25:16 +08:00
|
|
|
1) 单独为输入框设置 `disabled` 属性;
|
|
|
|
|
|
|
|
2) 为 `<fieldset>` 设置 `disabled` 属性,可以禁用 `<fieldset>` 中包含的所有控件。
|
2015-06-15 20:24:01 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2015-07-08 15:41:19 +08:00
|
|
|
#### 禁用的表单控件
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
2015-06-15 20:24:01 +08:00
|
|
|
````html
|
2015-07-07 23:45:46 +08:00
|
|
|
<form class="ant-form-horizontal">
|
|
|
|
<div class="ant-form-item">
|
|
|
|
<label class="col-5">禁用的输入框:</label>
|
|
|
|
<div class="col-12">
|
|
|
|
<input class="ant-input" type="text" value="我是禁用的" disabled>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2015-07-08 15:41:19 +08:00
|
|
|
````
|
2015-07-07 11:25:16 +08:00
|
|
|
|
2015-07-08 15:41:19 +08:00
|
|
|
#### 禁用的 fieldset
|
2015-06-15 20:24:01 +08:00
|
|
|
|
2015-07-08 15:41:19 +08:00
|
|
|
<br>
|
|
|
|
|
|
|
|
````html
|
2015-07-07 23:45:46 +08:00
|
|
|
<form class="ant-form-horizontal">
|
2015-06-15 20:24:01 +08:00
|
|
|
<fieldset disabled>
|
2015-07-20 20:35:48 +08:00
|
|
|
<div class="ant-form-item ant-form-item-compact">
|
|
|
|
<label for="userName" class="col-5" required>用户名:</label>
|
2015-07-07 23:45:46 +08:00
|
|
|
<div class="col-12">
|
2015-07-20 20:35:48 +08:00
|
|
|
<p class="ant-form-text">大眼萌 minion</p>
|
2015-07-07 23:45:46 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ant-form-item">
|
2015-07-20 20:35:48 +08:00
|
|
|
<label for="password" class="col-5" required>密码:</label>
|
2015-07-07 23:45:46 +08:00
|
|
|
<div class="col-12">
|
2015-07-20 20:35:48 +08:00
|
|
|
<input class="ant-input" type="password" id="password" value="123456"/>
|
2015-07-07 23:45:46 +08:00
|
|
|
</div>
|
2015-06-15 20:24:01 +08:00
|
|
|
</div>
|
2015-07-07 23:45:46 +08:00
|
|
|
<div class="row">
|
2015-07-20 20:35:48 +08:00
|
|
|
<div class="col-12 col-offset-5">
|
|
|
|
<input type="submit" class="ant-btn ant-btn-primary" value="确 定" />
|
2015-07-07 23:45:46 +08:00
|
|
|
</div>
|
2015-06-15 20:24:01 +08:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
````
|