办学质量监测教学评价系统
shenrongliang
2025-06-13 11d86cc6c26bb4f709e407acadf4805c2024e79f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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';
}