vxe-table-demonic
Version:
一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式...
111 lines (95 loc) • 2.68 kB
TypeScript
import { SetupContext, RenderFunction, ComponentPublicInstance } from 'vue'
import { VXEComponent, VxeComponentBase, VxeEvent, SizeType, ValueOf } from './component'
/* eslint-disable no-use-before-define */
/**
* 组件 - 单选框
* @example import { VxeRadio } from 'vxe-components'
*/
export const VxeRadio: VXEComponent<VxeRadioProps, VxeRadioEventProps, VxeRadioSlots>
/**
* 组件 - 单选框
*/
export const Radio: typeof VxeRadio
export type VxeRadioInstance = ComponentPublicInstance<VxeRadioProps, VxeRadioConstructor>
export interface VxeRadioConstructor extends VxeComponentBase, VxeRadioMethods {
props: VxeRadioProps
context: SetupContext<VxeRadioEmits>
renderVN: RenderFunction
}
export type VxeRadioProps = {
size?: VxeRadioPropTypes.Size
/**
* 严格模式,不允许取消
*/
strict?: VxeRadioPropTypes.Strict
/**
* 绑定值
*/
modelValue?: VxeRadioPropTypes.ModelValue
/**
* 值
*/
label?: VxeRadioPropTypes.Label
/**
* 原生 title 属性
*/
title?: VxeRadioPropTypes.Title
/**
* 内容
*/
content?: VxeRadioPropTypes.Content
/**
* 是否禁用
*/
disabled?: VxeRadioPropTypes.Disabled
/**
* 原生 title 属性
*/
name?: VxeRadioPropTypes.Name
}
export namespace VxeRadioPropTypes {
export type Size = SizeType
export type Strict = boolean
export type ModelValue = any
export type Label = any
export type Title = string | number
export type Content = string | number
export type Disabled = boolean
export type Name = string
}
export interface RadioMethods {
dispatchEvent(type: ValueOf<VxeRadioEmits>, params: any, evnt: Event): void
}
export interface VxeRadioMethods extends RadioMethods { }
export interface RadioPrivateMethods { }
export interface VxeRadioPrivateMethods extends RadioPrivateMethods { }
export type VxeRadioEmits = [
'update:modelValue',
'change'
]
export namespace VxeRadioDefines {
interface RadioEventParams extends VxeEvent {
$radio: VxeRadioConstructor
}
export interface ChangeParams {
label: any
}
export interface ChangeEventParams extends RadioEventParams, ChangeParams { }
}
export type VxeRadioEventProps = {
onChange?: VxeRadioEvents.Change
}
export interface VxeRadioListeners {
change?: VxeRadioEvents.Change
}
export namespace VxeRadioEvents {
export type Change = (params: VxeRadioDefines.ChangeEventParams) => void
}
export interface VxeRadioSlots {
/**
* 自定义插槽模板
*/
[key: string]: ((params: {
[key: string]: any
}) => any) | undefined
}