# nuxt_xuexi **Repository Path**: js-class/nuxt_xuexi ## Basic Information - **Project Name**: nuxt_xuexi - **Description**: wfewfewewfewfwefwef - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-03-16 - **Last Updated**: 2023-03-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## nuxt.js 框架 1. 理解 nuxt.js:vue 是 spa,也就是单页应用程序,它的缺点不利于 SEO,所以,如果想解决这个问题,可以用 ssr,ssr 框架就是 nuxt.js,比如掘金网 2. 创建项目 yarn create nuxt-app 项目名字 3. pages 中写的是页面,路由不用配,路由访问和文件名一一对应 4. 路由跳转 路由模式 abstract 抽象模式 因为 ssr 没有浏览器 没办法使用 onhashchange,history.pushState,所以它用的是 abstract 模式 5. 之前在 vue 中钩子叫 created,但是在 nuxt 中在 asyncData 中拿数据 数据拿回来只要 return 出来就可以使用 6. nuxt.js 中也是可以用 vuex 的