Commit 5bb01822dfe6b7b3434188a0334cdd75ddcccf0d

Authored by 梁灏
1 parent e7fa2799

Switch prevent space to scroll

examples/routers/form.vue
@@ -479,6 +479,7 @@ @@ -479,6 +479,7 @@
479 <Button type="primary">Submit</Button> 479 <Button type="primary">Submit</Button>
480 <Button type="ghost" style="margin-left: 8px">Cancel</Button> 480 <Button type="ghost" style="margin-left: 8px">Cancel</Button>
481 </FormItem> 481 </FormItem>
  482 + <br><br><br><br><br><br><br><br><br><br><br><br><br><br>
482 </Form> 483 </Form>
483 </template> 484 </template>
484 <script> 485 <script>
src/components/switch/switch.vue
@@ -68,7 +68,8 @@ @@ -68,7 +68,8 @@
68 } 68 }
69 }, 69 },
70 methods: { 70 methods: {
71 - toggle () { 71 + toggle (event) {
  72 + event.preventDefault();
72 if (this.disabled) { 73 if (this.disabled) {
73 return false; 74 return false;
74 } 75 }