Skip to main content

readInputNumber 读取输入框数值

readInputNumber

类型: MethodDeclaration

所属类: TextBoxElement

定义位置: ui.ts

描述

读取输入框数值

参数 offset: 数值偏差

返回值:处理后的数值

参数

参数名类型描述默认值
offsetnumber-n0

返回值

类型: number

处理后的数值

源代码

位置: 第 3094 行

private readInputNumber(offset: number = 0): number {
const {input, min, max, decimals} = this
const value = parseFloat(input.value) + offset || 0
return Math.roundTo(Math.clamp(value, min, max), decimals)
}

文档生成时间:2025/7/7 12:07:07