|
|
@ -233,3 +233,13 @@ export const yuanToFen = (amount: string | number): number => { |
|
|
|
export const fenToYuan = (amount: string | number): number => { |
|
|
|
return Number((Number(amount) / 100).toFixed(2)) |
|
|
|
} |
|
|
|
|
|
|
|
// el-button 点击后强制失去焦点(颜色不恢复问题处理) 调用位置:绑定在el-button的点击事件
|
|
|
|
export function clearButtonBlurHandle (e:any) { |
|
|
|
if(!e || JSON.stringify(e) == '{}' || !e.target)return |
|
|
|
let target = e.target; |
|
|
|
if(target.nodeName == 'SPAN' || target.nodeName == 'I'){ |
|
|
|
target = e.target.parentNode; |
|
|
|
} |
|
|
|
target.blur(); |
|
|
|
} |