Merge branch 'glms/feature/1.4.2' of http://git.yiliantech.com/gitlab/otc-dev/zszq-trs into glms/feature/1.4.2
This commit is contained in:
@@ -432,6 +432,7 @@
|
||||
function __onInput() {
|
||||
if (_ctrlV) {
|
||||
_ctrlV = false;
|
||||
console.log('[numberInput paste] raw=', this.value, 'append=', _options.append, 'percent=', _options.percent);
|
||||
// 粘贴进来的是显示值(可能带 %/‱ 后缀),先按 __change 同款口径解析为模型值再回显,
|
||||
// 避免 setValue 把显示值再乘以 100/10000(#EQD-5914 债券价格粘贴 ×100)
|
||||
let f = '';
|
||||
@@ -440,6 +441,7 @@
|
||||
if (_options.append === '%' || _options.percent == true) f /= 100;
|
||||
else if (_options.append === '‱') f /= 10000;
|
||||
}
|
||||
console.log('[numberInput paste] parsed=', f);
|
||||
return setValue(f);
|
||||
}
|
||||
if (_chnInput >= 0) {
|
||||
@@ -462,6 +464,7 @@
|
||||
|
||||
//输入完成处理
|
||||
function __change() {
|
||||
console.log('[numberInput change] raw=', this.value, 'append=', _options.append, 'percent=', _options.percent);
|
||||
let f = '';
|
||||
if (this.value && this.value !== _options.append) {
|
||||
f = parseFloat(this.value.replaceAll(",", "")) || 0;
|
||||
@@ -469,6 +472,7 @@
|
||||
else if (_options.append === '‱') f /= 10000;
|
||||
|
||||
}
|
||||
console.log('[numberInput change] parsed=', f, 'value=', this.value);
|
||||
_options.onchange && _options.onchange(f, this.value);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user