diff --git a/docs/src/pages/components/Switch.vue b/docs/src/pages/components/Switch.vue
index 289775e..b8478e4 100644
--- a/docs/src/pages/components/Switch.vue
+++ b/docs/src/pages/components/Switch.vue
@@ -36,6 +36,16 @@
Light Blue Primary Color Disabled
+
+
+
+
+
+ Button
+
+
@@ -67,6 +77,28 @@
</div>
+
+
+
+<form @click.stop.prevent="submit">
+ <md-switch v-model="checked8" id="my-test8" name="my-test8">Submit (default)</md-switch>
+</form>
+
+<div>
+ <md-switch type="button" v-model="checked9" id="my-test9" name="my-test9" class="md-primary">Button</md-switch>
+</div>
+
+
+
+export default {
+ methods: {
+ submit(e) {
+ alert('Default switch submits form');
+ }
+ }
+};
+
+
@@ -86,8 +118,17 @@
checked4: true,
checked5: true,
checked6: true,
- checked7: true
+ checked7: true,
+ checked8: true,
+ checked9: true,
+ checked10: true
};
+ },
+
+ methods: {
+ submit(e) {
+ alert('Default switch submits form');
+ }
}
};
diff --git a/src/components/mdSwitch/mdSwitch.vue b/src/components/mdSwitch/mdSwitch.vue
index e2188a3..d3c6a46 100644
--- a/src/components/mdSwitch/mdSwitch.vue
+++ b/src/components/mdSwitch/mdSwitch.vue
@@ -3,7 +3,7 @@
@@ -24,7 +24,8 @@
name: String,
value: Boolean,
id: String,
- disabled: Boolean
+ disabled: Boolean,
+ type: String
},
data() {
return {