dykj-football/uni_modules/uview-plus/components/u-switch/props.js
2024-04-17 15:27:43 +08:00

64 lines
1.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import defProps from '../../libs/config/props.js';
export default {
props: {
// 是否为加载中状态
loading: {
type: Boolean,
default: () => defProps.switch.loading
},
// 是否为禁用装填
disabled: {
type: Boolean,
default: () => defProps.switch.disabled
},
// 开关尺寸单位px
size: {
type: [String, Number],
default: () => defProps.switch.size
},
// 打开时的背景颜色
activeColor: {
type: String,
default: () => defProps.switch.activeColor
},
// 关闭时的背景颜色
inactiveColor: {
type: String,
default: () => defProps.switch.inactiveColor
},
// 通过v-model双向绑定的值
// #ifdef VUE3
modelValue: {
type: [Boolean, String, Number],
default: () => defProps.switch.value
},
// #endif
// #ifdef VUE2
value: {
type: [Boolean, String, Number],
default: () => defProps.switch.value
},
// #endif
// switch打开时的值
activeValue: {
type: [String, Number, Boolean],
default: () => defProps.switch.activeValue
},
// switch关闭时的值
inactiveValue: {
type: [String, Number, Boolean],
default: () => defProps.switch.inactiveValue
},
// 是否开启异步变更,开启后需要手动控制输入值
asyncChange: {
type: Boolean,
default: () => defProps.switch.asyncChange
},
// 圆点与外边框的距离
space: {
type: [String, Number],
default: () => defProps.switch.space
}
}
}