Skip to content

Commit

Permalink
revert "Switch: Label with el-switch repeating event(fix ElemeFE#14959)"
Browse files Browse the repository at this point in the history
This reverts commit 9e7c701.
  • Loading branch information
FAKER-A committed May 7, 2019
1 parent 9ccc36e commit 39d6395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
20 changes: 1 addition & 19 deletions examples/play/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,14 @@
element-loading-background="rgba(0, 0, 0, 0.8)">
</div>
<el-button @click="clickMe">狂点我</el-button>
<p >
<label @click="nativeclick">
<el-switch v-model="val1" @change="log" @input="log"/>
label wrapping switch
</label>
</p>
<p>
<el-switch id="switch" v-model="val2" @change="log" @input="log"/>
<label for="switch">label next to switch</label>
</p>
</div>
</template>

<script>
export default {
data() {
return {
loading: true,
val1: true,
val2: true,
loading: true
};
},
mounted() {
Expand All @@ -38,12 +26,6 @@
methods: {
clickMe() {
this.loading = true
},
log($event) {
console.log($event)
},
nativeclick() {
console.log('native')
}
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/switch/src/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
role="switch"
:aria-checked="checked"
:aria-disabled="switchDisabled"
@click.prevent="switchValue"
@click="switchValue"
>
<input
class="el-switch__input"
Expand Down

0 comments on commit 39d6395

Please sign in to comment.