{"id":5742,"date":"2018-07-14T20:53:37","date_gmt":"2018-07-14T11:53:37","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=5742"},"modified":"2023-05-27T21:40:36","modified_gmt":"2023-05-27T12:40:36","slug":"%e3%80%90nuxt-js%e3%80%91%e3%80%8c%e3%83%ac%e3%82%a4%e3%82%a2%e3%82%a6%e3%83%88%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%80%8d%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=5742","title":{"rendered":"\u3010Nuxt.js\u3011\u300c\u30ec\u30a4\u30a2\u30a6\u30c8\u30d5\u30a1\u30a4\u30eb\u300d\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<h2>\u30c7\u30d5\u30a9\u30eb\u30c8\u30ec\u30a4\u30a2\u30a6\u30c8\u30da\u30fc\u30b8\uff08default.vue\uff09<\/h2>\n<pre class=\"lang:default decode:true\">&lt;template&gt;\r\n  &lt;div&gt;\r\n    &lt;nuxt\/&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/template&gt;<\/pre>\n<h3>&lt;nuxt \/&gt;<\/h3>\n<p>Nuxt.js\u3067\u5b9a\u7fa9\u3055\u308c\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u3001<span style=\"color: #ff0000;\"><strong>\u30ec\u30a4\u30a2\u30a6\u30c8\u30d5\u30a1\u30a4\u30eb\u5185\u3067\u306e\u307f\u30da\u30fc\u30b8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528<\/strong><\/span>\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\uff08error.vue\uff09<\/h2>\n<p>\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u3067\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300c&lt;nuxt \/&gt;\u300d\u3092\u542b\u3081\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u306e\u5b9f\u88c5\u4f8b<\/strong><\/span>\u3068\u3057\u3066\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">&lt;template&gt;\r\n&lt;div&gt;\r\n&lt;p v-if=\"error.statusCode === 404\"&gt;\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093&lt;\/p&gt;\r\n&lt;p v-else&gt; \u30a8\u30e9\u30fc\u3067\u3059\u3002&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;\/template&gt;\r\n\r\n&lt;script&gt;\r\nexport default{\r\nprops: ['error']\r\n}\r\n&lt;\/script&gt;<\/pre>\n<h3>props<\/h3>\n<p>error.vue\u3067\u306f\u3001<span style=\"color: #ff0000;\"><strong>props<\/strong><\/span>\u3068\u3057\u3066error\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<th>\u30d7\u30ed\u30d1\u30c6\u30a3<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>message<\/td>\n<td>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u5165\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>path<\/td>\n<td>\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u30d1\u30b9\u304c\u5165\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>statusCode<\/td>\n<td>\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u304c\u5165\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u30da\u30fc\u30b8\u3054\u3068\u306e\u30ec\u30a4\u30a2\u30a6\u30c8<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>layout\u30d7\u30ed\u30d1\u30c6\u30a3<\/strong><\/span>\u306b\u3066\u3001\u300cdefault.vue\u300d\u3068\u306f\u5225\u306b\u4f5c\u6210\u3057\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">&lt;template&gt;\r\n&lt;div&gt;\r\n&lt;p&gt;\u30c6\u30b9\u30c8\u3067\u3059\u3002&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;\/template&gt;\r\n\r\n&lt;script&gt;\r\nexport default{\r\nlayout: \"\u30ec\u30a4\u30a2\u30a6\u30c8\u30d5\u30a1\u30a4\u30eb\u540d\"(\u30ec\u30a4\u30a2\u30a6\u30c8\u30d5\u30a1\u30a4\u30eb\u540d.vue\u3068\u3044\u3046\u30ec\u30a4\u30a2\u30a6\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u305f\u306e\u3067\u3042\u308c\u3070\u3002)\r\n}\r\n&lt;\/script&gt;<\/pre>\n<h3>\u4f8b<\/h3>\n<p>layouts\/titile.vue\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">&lt;template&gt;\r\n  &lt;div&gt;\r\n    &lt;header&gt;\u30bf\u30a4\u30c8\u30eb&lt;\/header&gt;\r\n    &lt;Nuxt \/&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/template&gt;<\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u9069\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">&lt;template&gt;\r\n&lt;div&gt;\r\n&lt;p&gt;\u30c6\u30b9\u30c8\u3067\u3059\u3002&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;\/template&gt;\r\n\r\n&lt;script&gt;\r\n  export default{\r\n    layout: \"title\"\r\n  }\r\n&lt;\/script&gt;<\/pre>\n<h2>\u30ec\u30a4\u30a2\u30a6\u30c8\u30da\u30fc\u30b8\u8a2d\u8a08\u4f8b<\/h2>\n<p>\u57fa\u672c\u7684\u306b\u4e00\u822c\u7684\u306aWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30ec\u30a4\u30a2\u30a6\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u8907\u6570\u7528\u610f\u3059\u308b\u306e\u304c\u5f53\u305f\u308a\u524d\u3067\u3059\u3002\uff08\u753b\u9762\u306b\u3088\u3063\u3066\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u7570\u306a\u308b\u305f\u3081\uff09<\/p>\n<table>\n<tbody>\n<tr>\n<td>\u30d5\u30a1\u30a4\u30eb\u540d<\/td>\n<td>\u8a2d\u8a08<\/td>\n<\/tr>\n<tr>\n<td>login.vue<\/td>\n<td>\u30ed\u30b0\u30a4\u30f3\u524d\u306e\u30ec\u30a4\u30a2\u30a6\u30c8<\/td>\n<\/tr>\n<tr>\n<td>logout.vue<\/td>\n<td>\u30ed\u30b0\u30a2\u30a6\u30c8\u5f8c\u306e\u30ec\u30a4\u30a2\u30a6\u30c8<\/td>\n<\/tr>\n<tr>\n<td>default.vue<\/td>\n<td>\u30ed\u30b0\u30a4\u30f3\u5f8c\u306e\u30ec\u30a4\u30a2\u30a6\u30c8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e00\u4f8b\u3067\u3059\u304c\u3053\u306e\u3088\u3046\u306b\u5206\u3051\u3066\u3057\u307e\u3046\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002\u305f\u3060\u3001\u6628\u4eca\u306eSPA\u958b\u767a\u3067\u306f\u8a8d\u8a3c\u6a5f\u69cb\u3060\u3051\u306fAuth0\u306a\u3069\u306eSaas\u3092\u4f7f\u3046\u3053\u3068\u3082\u4e00\u822c\u7684\u306b\u306a\u3063\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u30ed\u30b0\u30a4\u30f3\u5f8c\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3060\u3051\u3092\u8003\u3048\u308c\u3070\u826f\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u30c7\u30d5\u30a9\u30eb\u30c8\u30ec\u30a4\u30a2\u30a6\u30c8\u30da\u30fc\u30b8\uff08default.vue\uff09 &lt;template&gt; &lt;div&gt; &lt;nuxt\/&gt; &lt;\/div&gt; &lt;\/template&gt; &lt;nuxt  [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[61],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5742"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5742"}],"version-history":[{"count":9,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5742\/revisions"}],"predecessor-version":[{"id":20383,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5742\/revisions\/20383"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5742"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}