1
This commit is contained in:
20
src/components/switch/index.vue
Normal file
20
src/components/switch/index.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<Switch
|
||||
:value="value"
|
||||
v-bind="$attrs"
|
||||
@on-change="handleChange"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Switch',
|
||||
props: ['value'],
|
||||
methods: {
|
||||
handleChange(checked) {
|
||||
this.$emit('input', checked)
|
||||
this.$emit('change', checked)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user