{"id":10029,"date":"2020-04-12T09:04:32","date_gmt":"2020-04-12T00:04:32","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=10029"},"modified":"2023-05-27T23:59:45","modified_gmt":"2023-05-27T14:59:45","slug":"%e3%80%90vue-js%e3%80%91%e3%80%8c%e3%83%9f%e3%83%83%e3%82%af%e3%82%b9%e3%82%a4%e3%83%b3%e3%80%8d%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=10029","title":{"rendered":"\u3010Vue.js\u3011\u300c\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u300d\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h2>\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3068\u306f\uff1f<\/h2>\n<p>\u6a5f\u80fd\u3092\u518d\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u8907\u6570\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u9593\u3067\u5171\u6709\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002<\/p>\n<h2>\u7d99\u627f\u3068\u306e\u9055\u3044<\/h2>\n<p>\u7d99\u627f\u306f\u3001\u57fa\u5e95\u30af\u30e9\u30b9\u3092\u53d7\u3051\u7d99\u304e\u306a\u304c\u3089\u65b0\u3057\u3044\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u306e\u306b\u5bfe\u3057\u3066\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u306f\u7279\u306b\u89aa\u30af\u30e9\u30b9\u306a\u3069\u306a\u3057\u306b\u6a2a\u65ad\u7684\u306b\u6a5f\u80fd\u3092\u5171\u901a\u5316\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2>\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3092\u4f7f\u3046\u30dd\u30a4\u30f3\u30c8<\/h2>\n<p>\u8907\u6570\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u540c\u3058\u30b3\u30fc\u30c9\u3092\u7e70\u308a\u8fd4\u3057\u8a18\u8ff0\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u4ed8\u3044\u305f\u3089\u305d\u306e\u30b3\u30fc\u30c9\u3092\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3068\u3057\u3066\u629c\u304d\u51fa\u3057\u307e\u3059\u3002<\/p>\n<h2>\u69cb\u6587<\/h2>\n<p>mixins\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<span style=\"color: #ff0000;\"><strong>mixins\u306b\u6307\u5b9a\u3067\u304d\u308b\u306e\u306f\u914d\u5217\u306b\u306a\u3063\u3066\u3044\u3066\u8907\u6570\u306e\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3092\u633f\u5165\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">\/\/\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3068\u3057\u3066\u5b9a\u7fa9\u3059\u308b\u95a2\u6570\r\nconst \u30df\u30c3\u30af\u30b9\u30a4\u30f3\u95a2\u6570\u540d = {\r\n  \u51e6\u7406\u5185\u5bb9\r\n}\r\n\r\n\/\/\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3092\u633f\u5165\u3059\u308b\u5185\u5bb9\r\nconst \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c81 = {\r\n  mixins: [\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u95a2\u6570\u540d1,\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u95a2\u6570\u540d2],\r\n  template: '\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5185\u5bb9'\r\n}\r\n\r\n\/\/\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3092\u633f\u5165\u3059\u308b\u5185\u5bb9\r\nconst \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c82 = {\r\n  mixins: [\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u95a2\u6570\u540d],\r\n  template: '\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5185\u5bb9'\r\n}<\/pre>\n<h2>\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u306e\u6ce8\u610f\u70b9<\/h2>\n<h3>\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3068\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u91cd\u8907\u3057\u3066\u3044\u305f\u5834\u5408<\/h3>\n<p>\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3068\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u540c\u3058\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u304c\u4f7f\u308f\u308c\u3066\u3044\u305f\u5834\u5408\u306f<span style=\"color: #ff0000;\"><strong>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u65b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u512a\u5148\u3055\u308c\u3066\u63a1\u7528\u3055\u308c\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h4>\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30d5\u30c3\u30af\u306e\u5834\u5408\u306f\u4f8b\u5916<\/h4>\n<p>\u305f\u3060\u3057\u3001<span style=\"color: #ff0000;\"><strong>\u4f8b\u5916\u304c\u3042\u3063\u3066\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30d5\u30c3\u30af(created\u3001mounted)\u304c\u91cd\u8907\u3057\u3066\u3044\u305f\u5834\u5408\u306f\u4e21\u65b9\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/strong><\/span>\u5b9f\u884c\u9806\u5e8f\u3068\u3057\u3066\u306f\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u304c\u5b9f\u884c\u3055\u308c\u305f\u5f8c\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u65b9\u304c\u5b9f\u884c\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u306a\u304a\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u304c\u5225\u306b\u4f5c\u3089\u308c\u3066\u3044\u305f\u5834\u5408\u306f\u30b0\u30ed\u30fc\u30d0\u30eb\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30d5\u30c3\u30af\u304c\u6700\u512a\u5148\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>\u6a5f\u80fd\u306e\u8a70\u3081\u8fbc\u307f\u306b\u306f\u6ce8\u610f<\/h3>\n<p>\uff11\u3064\u306e\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u306b\u6a5f\u80fd\u3092\u8a70\u3081\u8fbc\u307f\u3059\u304e\u308b\u3068\u4e0d\u8981\u306a\u6a5f\u80fd\u3092\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u5b9f\u88c5\u3059\u308b\u3053\u3068\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<span style=\"color: #ff0000;\"><strong>\u53ef\u80fd\u306a\u9650\u308a\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306f\u5358\u4e00\u306e\u5c0f\u3055\u3044\u6a5f\u80fd\u306b\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/strong><\/span><\/p>\n<h2>\u30b0\u30ed\u30fc\u30d0\u30eb\u30df\u30c3\u30af\u30b9\u30a4\u30f3<\/h2>\n<p>\u5168\u4f53\uff08\u5168\u3066\u306eVue\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\uff09\u306b\u9069\u7528\u3067\u304d\u308b\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<span style=\"color: #ff0000;\"><strong>\u975e\u5e38\u306b\u5f71\u97ff\u7bc4\u56f2\u304c\u5e83\u3044\u306e\u3067\u3082\u3057\u63a1\u7528\u3059\u308b\u3068\u3057\u305f\u3089\u304b\u306a\u308a\u614e\u91cd\u306b\u306a\u3089\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<h3>\u7528\u9014<\/h3>\n<ul>\n<li>\u6a29\u9650\u304c\u5fc5\u8981\u306a\u30da\u30fc\u30b8\u306e\u5236\u5fa1\u3092\u3057\u305f\u3044\u5834\u5408<\/li>\n<\/ul>\n<h3>\u69cb\u6587<\/h3>\n<pre class=\"lang:default decode:true \">Vue.mixin({\r\n  \u51e6\u7406\u5185\u5bb9\r\n})<\/pre>\n<h2>\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u306e\u547d\u540d\u898f\u5247<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u300c~\u3067\u304d\u308b\u300d<\/strong><\/span>\u3068\u3059\u308b\u306e\u304c\u57fa\u672c\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u52d5\u8a5e + able<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u3068\u306f\uff1f \u6a5f\u80fd\u3092\u518d\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u8907\u6570\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u9593\u3067\u5171\u6709\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002 \u7d99\u627f\u3068\u306e\u9055\u3044 \u7d99\u627f\u306f\u3001\u57fa\u5e95\u30af\u30e9\u30b9\u3092\u53d7\u3051\u7d99\u304e\u306a\u304c\u3089\u65b0\u3057\u3044\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u306e\u306b\u5bfe\u3057 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[60],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10029"}],"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=10029"}],"version-history":[{"count":9,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10029\/revisions"}],"predecessor-version":[{"id":20628,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/10029\/revisions\/20628"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10029"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}