mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
feat: Switch component
This commit is contained in:
31
src-next/switch/shared.ts
Normal file
31
src-next/switch/shared.ts
Normal 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,
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user