mirror of
https://github.com/certd/certd.git
synced 2026-07-07 21:17:42 +08:00
335d175d57
chore: Merge branch 'vben' # Conflicts: # package.json perf: antdv示例改成使用vben框架 chore: vben chore: vben chore: vben
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import type { AsTag } from 'radix-vue';
|
|
|
|
import type { Component } from 'vue';
|
|
|
|
import type { ButtonVariants, ButtonVariantSize } from '../../ui';
|
|
|
|
export interface VbenButtonProps {
|
|
/**
|
|
* The element or component this component should render as. Can be overwrite by `asChild`
|
|
* @defaultValue "div"
|
|
*/
|
|
as?: AsTag | Component;
|
|
/**
|
|
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
*
|
|
* Read our [Composition](https://www.radix-vue.com/guides/composition.html) guide for more details.
|
|
*/
|
|
asChild?: boolean;
|
|
class?: any;
|
|
disabled?: boolean;
|
|
loading?: boolean;
|
|
size?: ButtonVariantSize;
|
|
variant?: ButtonVariants;
|
|
}
|
|
|
|
export type CustomRenderType = (() => Component | string) | string;
|
|
|
|
export type ValueType = boolean | number | string;
|
|
|
|
export interface VbenButtonGroupProps
|
|
extends Pick<VbenButtonProps, 'disabled'> {
|
|
beforeChange?: (
|
|
value: ValueType,
|
|
isChecked: boolean,
|
|
) => boolean | PromiseLike<boolean | undefined> | undefined;
|
|
btnClass?: any;
|
|
gap?: number;
|
|
multiple?: boolean;
|
|
options?: { label: CustomRenderType; value: ValueType }[];
|
|
showIcon?: boolean;
|
|
size?: 'large' | 'middle' | 'small';
|
|
}
|