...mapState({
capsuleInfo: state => state.userState.capsuleInfo,
toRPxs: state => state.appData.toRPxs,
screenHeight: state => state.appData.height,
homePageData: state => state.userState.homePageData,
user_id: state => state.user.user_id,
userInfo: state => state.userState.userInfo,
})
其中...代表的三点运算符
1.对象的扩展运算符
let num = { a:1 , b:2}
let num2 = {...num} // let num2 = {a:1 , b:2}
2.数组的扩展运算符
function add(x, y) {
return x + y;
}
const numbers = [4, 38];
add(...numbers) // 42