{"id":2547,"date":"2018-11-23T06:33:08","date_gmt":"2018-11-22T21:33:08","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=2547"},"modified":"2018-11-23T06:33:08","modified_gmt":"2018-11-22T21:33:08","slug":"%e9%81%b8%e6%8a%9e%e7%94%bb%e5%83%8f%e3%82%92%e3%83%97%e3%83%ac%e3%83%93%e3%83%a5%e3%83%bc%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8bvue%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%86%e3%82%a3%e3%83%96","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=2547","title":{"rendered":"\u9078\u629e\u753b\u50cf\u3092\u30d7\u30ec\u30d3\u30e5\u30fc\u8868\u793a\u3059\u308bVue\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u516c\u958b\u3057\u307e\u3057\u305f\uff01\uff08IE 11\u3082OK\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u308c\u307e\u3067\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u69d8\u3005\u306a\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u516c\u958b\u3057\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u306e\u4e2d\u3067\u3082\u7279\u306b\u3088\u304f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=1189\">\u305f\u3063\u305f2\u30b9\u30c6\u30c3\u30d7\uff01Vue.js \u3067\u9078\u629e\u753b\u50cf\u3092\u30d7\u30ec\u30d3\u30e5\u30fc\u3059\u308b\u65b9\u6cd5\uff08\u30b5\u30f3\u30d7\u30ebDL\u53ef\uff09<\/a>\u3067\u516c\u958b\u3057\u3066\u3044\u308b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u30d7\u30ec\u30d3\u30e5\u30fc\u8868\u793a\u306f\u610f\u5916\u3068\u9700\u8981\u304c\u591a\u3044\u3093\u3060\u306a\u3068\u611f\u3058\u305f\u306e\u3067\u3001\u3053\u306e\u6a5f\u80fd\u3092\u3088\u308a\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u308b\u72ec\u81ea\u306eVue\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6 &#8220;<strong>v-preview-input&#8221;\u00a0<\/strong>\u3092\u4f5c\u308a\u3001<a href=\"https:\/\/www.npmjs.com\/package\/v-preview-input\" target=\"_blank\" rel=\"noopener\">npm<\/a>\u3068<a href=\"https:\/\/github.com\/SUKOHI\/v-preview-input\" target=\"_blank\" rel=\"noopener\">GitHub<\/a>\u3067\u516c\u958b\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306f\u305d\u306e\u4f7f\u3044\u65b9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1575 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/22.png\" alt=\"\" width=\"310\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/22.png 310w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/22-291x300.png 291w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><\/p>\n<h1>\u30c7\u30e2\u30da\u30fc\u30b8<\/h1>\n<p><a href=\"https:\/\/demo-laravel52.capilano-fw.com\/vue_preview_input\" target=\"_blank\" rel=\"noopener\">v-preview-image\u306e\u30c7\u30e2\u30da\u30fc\u30b8<\/a>\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<br \/>\n\u305c\u3072\u4f53\u9a13\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<p><code>npm<\/code>\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u516c\u958b\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u4e00\u767a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>npm i v-preview-input<\/strong><\/pre>\n<p>\u307e\u305f\u3001<code>npm<\/code>\u3067\u306f\u306a\u304f<code>git<\/code>\u3092\u4f7f\u3046\u65b9\u6cd5\u3067\u3082OK\u3067\u3059\u3002<\/p>\n<pre><strong>git clone https:\/\/github.com\/SUKOHI\/v-preview-input.git<\/strong><\/pre>\n<h1>\u6e96\u5099<\/h1>\n<p>\u6b21\u306e\u3088\u3046\u306bVue\u672c\u4f53\u3068\u540c\u3058\u304f<code>v-preview-input.js<\/code>\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue@2.5.17\/dist\/vue.min.js\"&gt;&lt;\/script&gt;\r\n<strong>&lt;script src=\"\/******\/v-preview-input\/v-preview-input.js\"&gt;&lt;\/script&gt;<\/strong><\/pre>\n<h1>\u4f7f\u3044\u65b9<\/h1>\n<h2>\u9078\u629e\u3059\u308b\u753b\u50cf\u304c\uff11\u679a\u3060\u3051\u306e\u5834\u5408<\/h2>\n<p>\u307e\u305a<code>data<\/code>\u306b\u753b\u50cf\u30c7\u30fc\u30bf\u304c\u683c\u7d0d\u3055\u308c\u308b\u5909\u6570\uff08\u3053\u3053\u3067\u306f<code>profileImage<\/code>\uff09\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<pre>new Vue({\r\n    el: '#app',\r\n    data: {\r\n        <strong>profileImage: null<\/strong>\r\n    }\r\n})<\/pre>\n<p>\u305d\u3057\u3066\u3001<code>&lt;input type=\"file\"&gt;<\/code>\u30bf\u30b0\u306b<code>v-preview-input<\/code>\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u8ffd\u52a0\u3057\u3001\u3053\u3053\u3078\u3055\u3063\u304d\u8ffd\u52a0\u3057\u305f\u5909\u6570\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;input type=\"file\" accept=\"image\/*\" <strong>v-preview-input=\"profileImage\"<\/strong>&gt;<\/pre>\n<p>\u6b21\u306b\u5b9f\u969b\u306b\u30d7\u30ec\u30d3\u30e5\u30fc\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u308b\u90e8\u5206\u3067\u3059\u3002<\/p>\n<pre>&lt;img <strong>:src=\"profileImage\"<\/strong>&gt;<\/pre>\n<p><code>:src<\/code>\u306b\u5909\u6570\u3092\u6307\u5b9a\u3059\u308b\u3060\u3051\u3067OK\u3067\u3059\u3002<\/p>\n<h2>\u9078\u629e\u3059\u308b\u753b\u50cf\u304c\u8907\u6570\u306e\u5834\u5408<\/h2>\n<p>\u3053\u3061\u3089\u3082\u307e\u305a<code>data<\/code>\u306b\u5909\u6570\u3092\u4f5c\u308a\u307e\u3059\u304c\u3001\u3053\u3061\u3089\u306f\u914d\u5217\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>new Vue({\r\n    el: '#app',\r\n    data: {\r\n        <strong>profileImages: []<\/strong>\r\n    }\r\n})<\/pre>\n<p>\u305d\u3057\u3066\u3001<code>&lt;input&gt;<\/code>\u30bf\u30b0\u3082\uff11\u679a\u306e\u3068\u304d\u3068\u307b\u307c\u540c\u3058\u3067\u3059\u304c\u3001<code>multiple<\/code>\u3092\u3064\u3051\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;input type=\"file\" accept=\"image\/*\" <strong>v-preview-input=\"profileImages\"<\/strong> <strong>multiple<\/strong>&gt;<\/pre>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u753b\u50cf\u30d7\u30ec\u30d3\u30e5\u30fc\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u9078\u629e\u3055\u308c\u305f\u753b\u50cf\u30c7\u30fc\u30bf\u306f\u914d\u5217\u306b\u306a\u3063\u3066\u5909\u6570\u3078\u683c\u7d0d\u3055\u308c\u308b\u306e\u3067\u3001\u6b21\u306e\u3088\u3046\u306b<code>v-for<\/code>\u306a\u3069\u3092\u4f7f\u3063\u3066\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;img <strong>v-for=\"profileImage in profileImages\"<\/strong> :src=\"profileImage\"&gt;<\/pre>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u4eca\u56de\u306f\u516c\u958b\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7d39\u4ecb\u3092\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u5143\u3005\u306f\u5909\u6570\u3092\u6307\u5b9a\u3059\u308b\u5f62\u3067\u306f\u306a\u304f\u3001<code>v-preview-input<\/code>\u3068<code>v-preview-image<\/code>\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u5bfe\u306b\u3057\u3066\u5bfe\u5fdc\u3055\u305b\u308b\u3064\u3082\u308a\u3067\u3057\u305f\u304c\u3001\u3053\u3046\u3059\u308b\u3068\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u5408\u306b\u5bfe\u5fdc\u3067\u304d\u307e\u305b\u3093\u3002\uff08\u3082\u3057\u304b\u3057\u3066Vue\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u7684\u306b\u306b<code>v-for<\/code>\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\uff1f\uff09<\/p>\n<pre>&lt;input type=\"file\" <strong>v-preview-input=\"'profile'\"<\/strong>&gt;&lt;br&gt;\r\n&lt;img <strong>v-preview-image=\"'profile\"<\/strong>&gt;<\/pre>\n<p>\u307e\u305f\u3001\u72ec\u81ea\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f5c\u3063\u3066\u3082\u3088\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u3084\u30af\u30e9\u30b9\u3092\u8a2d\u5b9a\u3057\u306b\u304f\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u308a\u3001\u53ef\u8aad\u6027\u304c\u60aa\u304f\u306a\u308b\u305f\u3081\u3053\u3061\u3089\u3082\u65ad\u5ff5\u3002\u7d50\u5c40\u4eca\u56de\u306e\u5f62\u306b\u843d\u3061\u7740\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u5f8c\u3082\u3057\u4f55\u304b\u3044\u3044\u30a2\u30d7\u30ed\u30fc\u30c1\u304c\u601d\u3044\u3064\u3044\u305f\u3089\u66f4\u65b0\u3057\u3066\u3044\u304f\u3064\u3082\u308a\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1419 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/10.png\" alt=\"\" width=\"306\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/10.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/10-287x300.png 287w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u308c\u307e\u3067\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u69d8\u3005\u306a\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u516c\u958b\u3057\u3066\u304d\u307e\u3057\u305f\u3002 \u305d\u3057\u3066\u3001\u305d\u306e\u4e2d\u3067\u3082\u7279\u306b\u3088\u304f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u3001\u305f\u3063\u305f2\u30b9\u30c6\u30c3\u30d7\uff01V &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=2547\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u9078\u629e\u753b\u50cf\u3092\u30d7\u30ec\u30d3\u30e5\u30fc\u8868\u793a\u3059\u308bVue\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u516c\u958b\u3057\u307e\u3057\u305f\uff01\uff08IE 11\u3082OK\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":2553,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[83],"class_list":["post-2547","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vue-js","tag-83"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/2547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2547"}],"version-history":[{"count":5,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/2547\/revisions"}],"predecessor-version":[{"id":2554,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/2547\/revisions\/2554"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/2553"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}