Skip to content

Commit 8ea43f3

Browse files
committed
fix: 雪花id导致int精度丢失
1 parent abdaf2e commit 8ea43f3

File tree

1 file changed

+5
-1
lines changed
  • src/components/bpmnProcessDesigner/package/penal/task/task-components

1 file changed

+5
-1
lines changed

src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ const resetTaskForm = () => {
175175
// 特殊:流程表达式,只有一个 input 输入框
176176
userTaskForm.value.candidateParam = [candidateParamStr]
177177
} else {
178-
userTaskForm.value.candidateParam = candidateParamStr.split(',').map((item) => item)
178+
userTaskForm.value.candidateParam = candidateParamStr.split(',').map((item) => {
179+
// 如果数字超出了最大安全整数范围,则将其作为字符串处理
180+
let num = Number(item)
181+
return num > Number.MAX_SAFE_INTEGER || num < -Number.MAX_SAFE_INTEGER ? item : num
182+
})
179183
}
180184
} else {
181185
userTaskForm.value.candidateParam = []

0 commit comments

Comments
 (0)