From 4ca78f8b045f7c649a8c150d59e4bf3309eac38c Mon Sep 17 00:00:00 2001 From: Ryan Su Date: Sun, 27 Oct 2024 09:00:28 +0800 Subject: [PATCH] fix(frontedn/statetpl): simplify checked codes --- frontend/vben/staterender.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/vben/staterender.tpl b/frontend/vben/staterender.tpl index 485440f..8b85d8d 100644 --- a/frontend/vben/staterender.tpl +++ b/frontend/vben/staterender.tpl @@ -14,7 +14,7 @@ loading: record.pendingStatus, onChange(checked, _) { record.pendingStatus = true; - const newState = checked ? true : false; + const newState = !!checked; update{{.modelName}}({ id: record.id, state: newState }) .then(() => { record.state = newState;