Commit 4b48b69a9fc1a4226a897de3f0690a56a22030c7
1 parent
c124ed5e
Don't tab to disable checkboxes
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
examples/routers/checkbox.vue
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | size="small">全选</Checkbox> | 14 | size="small">全选</Checkbox> |
15 | <div> | 15 | <div> |
16 | <Checkbox size="large" true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox> | 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 | <Checkbox size="small" true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox> | 18 | <Checkbox size="small" true-value="true" false-value="false" v-model="testValue1">Apple</Checkbox> |
19 | {{ testValue1 }} | 19 | {{ testValue1 }} |
20 | </div> | 20 | </div> |
src/components/checkbox/checkbox.vue
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <label | 2 | <label |
3 | :class="wrapClasses" | 3 | :class="wrapClasses" |
4 | @keydown.space.prevent="$el.click()" | 4 | @keydown.space.prevent="$el.click()" |
5 | - tabindex="0"> | 5 | + :tabindex="disabled ? -1 : 0"> |
6 | <span :class="checkboxClasses"> | 6 | <span :class="checkboxClasses"> |
7 | <span :class="innerClasses"></span> | 7 | <span :class="innerClasses"></span> |
8 | <input | 8 | <input |