1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| import type { PropType } from 'vue';
|
| const validColors = ['primary', 'error', 'warning', 'success', 'info', ''] as const;
| type ButtonColorType = (typeof validColors)[number];
|
| export const buttonProps = {
| color: {
| default: '',
| type: String as PropType<ButtonColorType>,
| validator: (v: any) => validColors.includes(v),
| },
| disabled: { type: Boolean },
| loading: { type: Boolean },
| onClick: { default: null, type: Function as PropType<(...args: any) => any> },
| /**
| * Text after icon.
| */
| postIcon: { type: String },
| /**
| * Text before icon.
| */
| preIcon: { type: String },
| };
|
|