Commit 57fe55624ea2298ad36dd018ffbeea0001fee611

Authored by Aresn
Committed by GitHub
2 parents afa803bc 4b48b69a

Merge pull request #2855 from Xotic750/checkbox_tabindex

 Don't tab to disable checkboxes
examples/routers/checkbox.vue
... ... @@ -14,7 +14,7 @@
14 14 size="small">全选</Checkbox>
15 15 <div>
16 16 <Checkbox size="large" true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox>
17   - <Checkbox true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox>
  17 + <Checkbox true-value="true" false-value="false" v-model="testValue1" disabled>Apple</Checkbox>
18 18 <Checkbox size="small" true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox>
19 19 {{ testValue1 }}
20 20 </div>
... ...
src/components/checkbox/checkbox.vue
... ... @@ -2,7 +2,7 @@
2 2 <label
3 3 :class="wrapClasses"
4 4 @keydown.space.prevent="$el.click()"
5   - tabindex="0">
  5 + :tabindex="disabled ? -1 : 0">
6 6 <span :class="checkboxClasses">
7 7 <span :class="innerClasses"></span>
8 8 <input
... ...