mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
types(Stepper): improve theme prop typing (#8489)
This commit is contained in:
parent
07431487f3
commit
471fabb810
@ -30,11 +30,13 @@ function add(num1: number, num2: number) {
|
||||
return Math.round((num1 + num2) * cardinal) / cardinal;
|
||||
}
|
||||
|
||||
export type StepperTheme = 'default' | 'round';
|
||||
|
||||
export default defineComponent({
|
||||
name,
|
||||
|
||||
props: {
|
||||
theme: String,
|
||||
theme: String as PropType<StepperTheme>,
|
||||
integer: Boolean,
|
||||
disabled: Boolean,
|
||||
allowEmpty: Boolean,
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { withInstall } from '../utils';
|
||||
import _Stepper from './Stepper';
|
||||
import _Stepper, { StepperTheme } from './Stepper';
|
||||
|
||||
const Stepper = withInstall<typeof _Stepper>(_Stepper);
|
||||
|
||||
export default Stepper;
|
||||
export { Stepper };
|
||||
export type { StepperTheme };
|
||||
|
Loading…
x
Reference in New Issue
Block a user