@opensig/opendesign
Version:
150 lines (149 loc) • 3.4 kB
TypeScript
import { ExtractPropTypes, PropType } from 'vue';
export declare const InputNumberControlTypes: readonly ["both", "right", "left", "none"];
export type InputNumberControlT = (typeof InputNumberControlTypes)[number];
export declare const inputNumberProps: {
/**
* @zh-CN 数字输入框的值 v-model
* @en-US The value of the input number
*/
modelValue: {
type: NumberConstructor;
};
/**
* @zh-CN 数字输入框的默认值,非受控
* @en-US The default value of the input number, uncontrolled
*/
defaultValue: {
type: NumberConstructor;
};
/**
* @zh-CN 按钮点击时步长
* @en-US Step size when clicking buttons
* @default 1
*/
step: {
type: NumberConstructor;
default: number;
};
/**
* @zh-CN 最小值
* @en-US Minimum value
*/
min: {
type: NumberConstructor;
};
/**
* @zh-CN 最大值
* @en-US Maximum value
*/
max: {
type: NumberConstructor;
};
/**
* @zh-CN 控制按钮位置
* @en-US Control button position
* @default 'both'
*/
controls: {
type: PropType<InputNumberControlT>;
default: string;
};
/**
* @zh-CN 是否可以清除
* @en-US Whether the value can be cleared
* @default false
*/
clearable: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh-CN 大小
* @en-US Size
*/
size: {
type: PropType<import('..').SizeT>;
};
/**
* @zh-CN 圆角值
* @en-US Round
*/
round: {
type: PropType<import('..').RoundT>;
};
/**
* @zh-CN 颜色类型
* @en-US Color type
* @default 'normal'
*/
color: {
type: PropType<import('..').Color2T>;
default: string;
};
/**
* @zh-CN 按钮类型
* @en-US Variant type
* @default 'outline'
*/
variant: {
type: PropType<import('..').VariantT>;
default: string;
};
/**
* @zh-CN 提示文本
* @en-US Prompt text
*/
placeholder: {
type: StringConstructor;
};
/**
* @zh-CN 是否禁用
* @en-US Whether to disable
*/
disabled: {
type: BooleanConstructor;
};
/**
* @zh-CN 是否只读
* @en-US Readonly
*/
readonly: {
type: BooleanConstructor;
};
/**
* @zh-CN 是否自动适配宽度
* @en-US Whether the width is automatically adapted
*/
autoWidth: {
type: BooleanConstructor;
};
/**
* @zh-CN 对值格式化,控制显示格式
* @en-US Format the value and control the display format
*/
format: {
type: PropType<(value: string) => string>;
};
/**
* @zh-CN 无效值判断
* @en-US Invalid value validation
*/
validate: {
type: PropType<(value: number) => boolean>;
};
/**
* @zh-CN input id, 用于label关联
* @en-US Input id, used for label association
*/
inputId: {
type: StringConstructor;
};
/**
* @zh-CN 当输入为空字符串时的默认值
* @en-US Default value when the input is empty
*/
clearValue: {
type: NumberConstructor;
};
};
export type InputNumberPropsT = ExtractPropTypes<typeof inputNumberProps>;