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;