import { AsyncDataProps, AsyncDataPropsEmits } from '../../hooks/useGetAsyncData'; import { Component } from 'vue'; type HTMLString = string; export type CheckSelectOptionItem = { value: (string | number); label: string | number; disabled?: boolean; tooltip?: HTMLString; afterComponent?: Component | string; }; export interface CheckboxProps extends Partial> { modelValue?: (string | number)[]; /** * 是否是按钮模式 */ buttonRadio?: boolean; /** * 选择项目 */ options?: CheckSelectOptionItem[]; /** * 普通的Radio添加边框 */ border?: boolean; } export type CheckboxEmits = { 'update:modelValue': [value: (string | number)[]]; } & AsyncDataPropsEmits; export type CheckboxSlot = { /** * 自定义筛选项目 */ default: (props: any) => void; /** * 自定义loading状态 * @param props */ loading: (props: any) => void; /** * 自定义error状态 * @param props */ errorSlot: (props: { error: any; }) => void; }; export {};