{ data ({ to }) { return store.fetchItem(to.params.id).then(item => { document.title = item.title + ' | Vue.js HN Clone' return { item, // the final resolved data can further contain Promises comments: store.fetchItems(item.kids), pollOptions: item.type === 'poll' ? store.fetchItems(item.parts) : null } }) } } 那个to是什么意思?去掉大括号不行吗?
回复 (3)
参与回复
登录后即可参与回复。登录