1.2.0 • Published 6 years ago
simply-switch v1.2.0
simply-switch
Vue-component
npm引入
npm install simply-switch
使用方法
import Vue from 'vue';
import Switch from 'simply-switch';
Vue.use(Switch);
<s-switch></s-switch>
参数
onColor: {
type: String,
default: '#4cd864'
//打开时背景色
},
offColor: {
type: String,
default: '#ff4949'
//关闭时背景色
},
width: {
type: String,
default: '40'
//组件宽度
},
isRound: {
type: Boolean,
default: true
//是否圆角
},
centerColor: {
type: String,
default: '#ffffff'
//中间滑块颜色
},
txtOnColor: {
type: String,
default: '#409eff'
//选中文字颜色
},
txtOffColor: {
type: String,
default: '#9e9e9e'
//未选中文字颜色
},
offTxt: {
type: String,
default: ''
//左边文字
},
onTxt: {
type: String,
default: ''
//右边文字
},
disabled: {
type: Boolean,
default: false
//是否可用
}