Files
WAI_Project_UNIX/uni_modules/cool-ui/components/cl-input/props.ts
haibiao_gu 60d46f82ef feat(cl-input): 添加数字输入精度控制功能
- 新增 precision 属性用于控制数字类型输入框的小数位数
- 实现输入值的精度校验与格式化逻辑
- 添加超出精度限制时的样式提示
- 支持深色模式下的精度超限颜色适配
- 在 demo 页面中增加精度控制示例
2025-11-07 14:36:37 +08:00

34 lines
806 B
TypeScript

import type { ClInputType, PassThroughProps } from "../../types";
import type { ClIconProps } from "../cl-icon/props";
export type ClInputPassThrough = {
className?: string;
inner?: PassThroughProps;
prefixIcon?: ClIconProps;
suffixIcon?: ClIconProps;
};
export type ClInputProps = {
className?: string;
pt?: ClInputPassThrough;
modelValue?: string;
type?: ClInputType;
prefixIcon?: string;
suffixIcon?: string;
password?: boolean;
autofocus?: boolean;
disabled?: boolean;
readonly?: boolean;
placeholder?: string;
placeholderClass?: string;
border?: boolean;
clearable?: boolean;
cursorSpacing?: number;
confirmHold?: boolean;
confirmType?: "done" | "go" | "next" | "search" | "send";
adjustPosition?: boolean;
maxlength?: number;
holdKeyboard?: boolean;
precision?: number;
};