微信小程序页面迁移校验之前 P5任务处理之前
This commit is contained in:
9
apps/miniprogram - 副本/miniprogram/utils/format.wxs
Normal file
9
apps/miniprogram - 副本/miniprogram/utils/format.wxs
Normal file
@@ -0,0 +1,9 @@
|
||||
// WXS 格式化工具 — WXML 中不能调用 JS 方法,需通过 WXS 桥接
|
||||
function toFixed(num, digits) {
|
||||
if (num === undefined || num === null) return '--'
|
||||
return num.toFixed(digits)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
toFixed: toFixed,
|
||||
}
|
||||
Reference in New Issue
Block a user