vue ...扩展符报错,求救~~

build [== ] 10%> Starting dev server...
Build completed in 16.045s

ERROR Failed to compile with 10 errors 18:08:13

error in ./src/App.vue

Syntax Error: Unexpected token (18:4)

16 | name: 'app',
17 | computed: {

18 | ...mapState({
| ^
19 | route: state => state.route,
20 | path: state => state.route.path,
21 | deviceready: state => state.app.deviceready,

@ ./src/App.vue 7:2-145
@ ./src/main.js
@ multi ./build/dev-client ./src/main.js

1个回答

你的mapState辅助函数写错了,
computed: mapState({
_pageSize: state => state.pageSize,
_pageSizes: state => state.pageSizes,
kctype: state => state.kctype,
userinfo: state => state.userinfo,
options: state => state.jiafenlei.list,
headersImage: function() {
return {
"User-Token": this.$store.state.userinfo.userinfo.token
}
}
})

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐