error: Expected identifier but found "=>" #1382
Unanswered
pengcheng933
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
state:() => { return { sideType: true, }; },
Steps to reproduce the bug
莫名出现 error: Expected identifier but found "=>",检查规范无误
Expected behavior
可以拿到pinia中保存的数据
Actual behavior
编译通过,运行就报错
Additional information
解决办法state:() => {
return {
sideType: true,
};
},
state定义是要有一个空格 state: () => { // 这里
return {
sideType: true,
};
},
Beta Was this translation helpful? Give feedback.
All reactions