Testing: switch (#477)

This commit is contained in:
杨奕
2016-10-18 17:00:50 +08:00
committed by FuryBean
parent c7103edd65
commit 2ec517505b
3 changed files with 83 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="el-switch" :class="{ 'is-disabled': disabled, 'el-switch--wide': hasText }">
<div class="el-switch__mask" v-show="disabled"></div>
<input class="el-switch__input" type="checkbox" v-model="value" :name="name" :disabled="disabled" style="display: none;">
<input class="el-switch__input" type="checkbox" :checked="value" :name="name" :disabled="disabled" style="display: none;">
<span class="el-switch__core" ref="core" @click="handleMiscClick" :style="{ 'width': coreWidth + 'px' }">
<span class="el-switch__button" ref="button"></span>
</span>
@@ -75,7 +75,7 @@
},
data() {
return {
coreWidth: 0
coreWidth: this.width
};
},
computed: {