Skip to content

Commit

Permalink
Update apis.checkbox.html for Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxinxu committed Aug 21, 2024
1 parent 6563606 commit 8c5b687
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion edge/apis.checked.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,18 @@ <h4>半选</h4>
<input type="checkbox" id="ci" is="ui-checkbox"><label for="ci" class="ml5 f14">全选</label>
<input type="checkbox" id="ci2" is="ui-checkbox" disabled><label class="ml5">全选禁用</label>
</p>
<p>半选效果需要 JS 设置才有效果:</p>
<p>原生的半选效果需要 JS 设置才有效果:</p>
<pre>&lt;input type="checkbox" id="ci" is="ui-checkbox"&gt;</pre>
<pre>ci.indeterminate = true;</pre>

<p>如果你只希望使用半选的样式,可以通过设置indeterminate + inert属性实现。</p>
<p>
<label for class="f14">
<input type="checkbox" is="ui-checkbox" indeterminate inert>仅样式,不可点选
</label>
</p>
<pre>&lt;input type="checkbox" is="ui-checkbox" indeterminate inert&gt;</pre>

<h4>禁用态</h4>
<p>禁用效果直接在原生的复选框元素上 <code>disabled</code> 属性就可以了:</p>
<p>
Expand Down

0 comments on commit 8c5b687

Please sign in to comment.