[improvement] SwitchCell: jsx (#2656)

This commit is contained in:
neverland
2019-01-31 14:37:24 +08:00
committed by GitHub
parent 1c70cf6ead
commit 9183849e6a
11 changed files with 82 additions and 118 deletions

View File

@@ -1,28 +1,11 @@
import { use } from '../utils';
import Loading from '../loading';
import SwitchMixin from '../mixins/switch';
const [sfc, bem] = use('switch');
export default sfc({
props: {
value: null,
loading: Boolean,
disabled: Boolean,
activeColor: String,
inactiveColor: String,
activeValue: {
type: null,
default: true
},
inactiveValue: {
type: null,
default: false
},
size: {
type: String,
default: '30px'
}
},
mixins: [SwitchMixin],
methods: {
onClick() {