feat: Switch component

This commit is contained in:
chenjiahan
2020-07-06 15:44:37 +08:00
parent ca0b7ff028
commit 1874b7af60
12 changed files with 657 additions and 9 deletions

31
src-next/switch/shared.ts Normal file
View File

@@ -0,0 +1,31 @@
/**
* Common Switch Props
*/
export type SharedSwitchProps = {
size?: string | number;
loading?: boolean;
disabled?: boolean;
modelValue?: any;
activeValue: any;
inactiveValue: any;
activeColor?: string;
inactiveColor?: string;
};
export const switchProps = {
size: [Number, String],
loading: Boolean,
disabled: Boolean,
modelValue: null as any,
activeColor: String,
inactiveColor: String,
activeValue: {
type: null as any,
default: true,
},
inactiveValue: {
type: null as any,
default: false,
},
};