欢迎光临散文网 会员登陆 & 注册

前端winter、杨村长、然叔mini-vue手写实战

2023-03-22 20:09 作者:勾心斗角167  | 我要投稿
  • 每个 page 不是默认导出一个函数么?

  • 把 getStaticProps 声明在这个函数旁边即可

  • 栗子🌰:

export const getStaticProps: GetStaticProps = async () => {  const posts = await getPosts()  return {    props: {      posts,    }  }}

必须按照这个格式,不能变(命名和返回值{ props: {...} })


前端winter、杨村长、然叔mini-vue手写实战的评论 (共 条)

分享到微博请遵守国家法律