js代码提示SyntaxError: Unexpected token '{' 怎么解决呢?
js代码内容:
({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) =>{
// // 在此编写代码
console.log(formData.HAO);
If (formData.HAO =='1') {
console.log(formData.HAO)
setFormData("JIAOHAO", "")
setDisabled('JIAOHAO', true)
setFormData("1919", "")
setDisabled('YIBAN', true)
setFormData("CHA", "")
setDisabled('CHA', true)
setFormData("QIQUAN", "")
setDisabled('QIQUAN', true)
}Else{
console.log("22")
setDisabled('JIAOHAO', false)
setDisabled('YIBAN', false)
setDisabled('CHA', false)
setDisabled('QIQUAN', false)
}
}
错误提示内容
SyntaxError: Unexpected token '{'
at a.getScriptFunc (app.d2de9eaf.js:1:76977)
at chunk-commons.c6e6c874.js:1:865793
at Array.forEach (<anonymous>)
at a.buildListeners (chunk-commons.c6e6c874.js:1:865735)
at a.colFormItem (chunk-commons.c6e6c874.js:1:858999)
at chunk-commons.c6e6c874.js:1:865343
at Array.map (<anonymous>)
at a.renderFormItem (chunk-commons.c6e6c874.js:1:865273)
at a.renderChildren (chunk-commons.c6e6c874.js:1:865506)
at chunk-commons.c6e6c874.js:1:861566