{"id":10801,"date":"2022-08-08T07:00:08","date_gmt":"2022-08-07T22:00:08","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10801"},"modified":"2023-08-25T02:13:13","modified_gmt":"2023-08-24T17:13:13","slug":"%e3%80%90vue-3%e3%80%91%e8%a4%87%e6%95%b0%e7%94%bb%e5%83%8f%e3%82%92%ef%bc%91%e6%9e%9a%e3%81%ab%e3%81%be%e3%81%a8%e3%82%81%e3%82%8b%e6%a9%9f%e8%83%bd%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8b%ef%bc%88dl","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10801","title":{"rendered":"\u3010Vue 3\u3011\u8907\u6570\u753b\u50cf\u3092\uff11\u679a\u306b\u307e\u3068\u3081\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b\uff08DL\u3082\u53ef\uff01\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u3082\u958b\u767a\u8005\u306e\u3072\u3068\u308a\u3068\u3057\u3066\u512a\u79c0\u306a\u30d7\u30ed\u30b0\u30e9\u30de\u3055\u3093\u304c\u591a\u6570\u3044\u3089\u3063\u3057\u3083\u308b<code>Twitter<\/code>\u306f\u304b\u304b\u3055\u305a\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u306e\u5f71\u97ff\u3067\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306e\u5199\u771f\u3082\u305f\u307e\u306b\u30c4\u30a4\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u9593\u300c<strong>\u3042\u308b\u3053\u3068<\/strong>\u300d\u306b\u6c17\u304c\u3064\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u753b\u50cf\u304c\uff14\u679a\u307e\u3067\u3057\u304b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u306a\u3044\ud83d\ude2b<\/strong><\/p>\n<p>\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u500b\u4eba\u7684\u306b\u65c5\u884c\u306a\u3069\u306b\u884c\u304f\u3068\u305f\u304f\u3055\u3093\u5199\u771f\u3092\u3068\u308b\u306e\u3067\u3001\u305c\u3072\u3082\u3063\u3068\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u3044\u6c17\u6301\u3061\u306f\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u5236\u9650\u304c\u3042\u3063\u3066\u306f\u3069\u3046\u3057\u3088\u3046\u3082\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u3075\u3068\u601d\u3044\u3064\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><strong style=\"font-size: 35px;\">\u3060\u3063\u305f\u3089\u3001\u753b\u50cf\u3092\uff11\u679a\u306b\u307e\u3068\u3081\u308c\u3070\u3044\u3044\u3058\u3083\u306a\u3044\u304b\uff01\u00a0<\/strong><\/p>\n<p>\u3068\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u3001<code>Vue 3<\/code>\u3092\u4f7f\u3063\u3066\u8907\u6570\u753b\u50cf\u3092\u3072\u3068\u307e\u3068\u3081\u306b\u3059\u308b\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2023.8.25\u3011<\/strong>\u3053\u306e\u30da\u30fc\u30b8\u306e\u30b3\u30fc\u30c9\u3092\u5143\u306b\u3057\u3066\u6539\u826f\u3057\u305f\u3082\u306e\u3092\u79c1\u304c\u904b\u55b6\u3059\u308b\u300c\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u300d\u3067\u30c4\u30fc\u30eb\u3068\u3057\u3066\u516c\u958b\u3057\u3066\u3044\u307e\u3059\u3002\u3082\u3057\u3088\u308d\u3057\u3051\u308c\u3070\u305d\u3061\u3089\u3082\u305c\u3072\uff01<\/p>\n<p>\ud83d\udcdd\u00a0<a href=\"https:\/\/machi-collection.com\/merge_photo\" target=\"_blank\" rel=\"noopener\">\u3072\u3068\u307e\u3068\u3081\u753b\u50cf\u30c4\u30fc\u30eb<\/a><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6071 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_8.png\" alt=\"\" width=\"216\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_8.png 216w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_8-203x300.png 203w\" sizes=\"auto, (max-width: 216px) 100vw, 216px\" \/>\u300c\u30ea\u30a2\u30eb\u30fb\u5929\u7a7a\u306e\u57ce\u30e9\u30d4\u30e5\u30bf\u3001<br \/>\n\u6700\u9ad8\u3067\u3057\u305f\u2757\u300d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-10808 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_5.png\" alt=\"\" width=\"300\" height=\"225\" \/><\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Vue 3<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u4eca\u56de\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\uff11\u3064\u306e\u753b\u50cf\u306e\u9577\u3055\u304c\u5909\u66f4\u3067\u304d\u308b<\/li>\n<li>\u4f55\u5217\u306b\u914d\u7f6e\u3059\u308b\u304b\u5909\u66f4\u3067\u304d\u308b<\/li>\n<li>\u4f5c\u6210\u3057\u305f\u753b\u50cf\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b<\/li>\n<\/ul>\n<p>\u306a\u304a\u3001\u5199\u771f\u306f\u7e26\u9577\uff06\u6a2a\u9577\u304c\u3042\u308b\u306e\u3067\u3001\u4eca\u56de\u306f\u4e2d\u5fc3\u90e8\u5206\u3092\u5207\u308a\u629c\u3044\u3066\u6b63\u65b9\u5f62\u306b\u3057\u3001\u305d\u308c\u3089\u3092\u4e26\u3079\u3066\uff11\u679a\u306e\u753b\u50cf\u306b\u307e\u3068\u3081\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u5b9f\u969b\u306b\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>\u5b9f\u969b\u306e\u30b3\u30fc\u30c9<\/h1>\n<p>\u2026\u3068\u306f\u8a00\u3063\u3066\u3082\u3001\u4eca\u56de\u306f<code>Vue 3<\/code>\u306e\u307f\u3067\u5b8c\u7d50\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u3044\u304d\u306a\u308a\u30b3\u30fc\u30c9\u306e\u3054\u7d39\u4ecb\u3067\u3059\uff08\u7b11\uff09<\/p>\n<p><strong>merge_image.html<\/strong><\/p>\n<pre><strong>&lt;html&gt;<\/strong>\r\n<strong>&lt;head&gt;<\/strong>\r\n<strong>    &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;<\/strong>\r\n<strong>&lt;\/head&gt;<\/strong>\r\n<strong>&lt;body&gt;<\/strong>\r\n<strong>&lt;div id=\"app\" class=\"p-5\"&gt;<\/strong>\r\n<strong>    &lt;h1&gt;\u8907\u6570\u753b\u50cf\u3092\uff11\u3064\u306b\u307e\u3068\u3081\u308b\u30b5\u30f3\u30d7\u30eb&lt;\/h1&gt;<\/strong>\r\n<strong>    &lt;div class=\"p-3\"&gt;<\/strong>\r\n<strong>        &lt;label&gt;\uff11\u3064\u306e\u753b\u50cf\u306e\u9577\u3055\uff08px\uff09&lt;\/label&gt;<\/strong>\r\n<strong>        &lt;input type=\"text\" class=\"form-control w-50\" v-model=\"blockImageLength\"&gt;<\/strong>\r\n<strong>    &lt;\/div&gt;<\/strong>\r\n<strong>    &lt;div class=\"p-3\"&gt;<\/strong>\r\n<strong>        &lt;label&gt;\u4f55\u5217\uff1f&lt;\/label&gt;<\/strong>\r\n<strong>        &lt;input type=\"text\" class=\"form-control w-50\" v-model=\"columnCount\"&gt;<\/strong>\r\n<strong>    &lt;\/div&gt;<\/strong>\r\n<strong>    &lt;div class=\"p-3\"&gt;<\/strong>\r\n<strong>        &lt;label&gt;<\/strong>\r\n<strong>            \u753b\u50cf<\/strong>\r\n<strong>            &lt;span v-if=\"showDownloadLink\"&gt;<\/strong>\r\n<strong>                \uff08&lt;a href=\"#\" @click.prevent=\"downloadImage\"&gt;\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b&lt;\/a&gt;\uff09<\/strong>\r\n<strong>            &lt;\/span&gt;<\/strong>\r\n<strong>        &lt;\/label&gt;&lt;br&gt;<\/strong>\r\n<strong>        &lt;label class=\"btn btn-primary mt-2\"&gt;<\/strong>\r\n<strong>            \u753b\u50cf\u3092\u9078\u629e\u3059\u308b<\/strong>\r\n<strong>            &lt;input type=\"file\" multiple accept=\"image\/jpeg,image\/png\" class=\"d-none\" @change=\"onFileChange\"&gt;<\/strong>\r\n<strong>        &lt;\/label&gt;<\/strong>\r\n<strong>    &lt;\/div&gt;<\/strong>\r\n\r\n<strong>    &lt;!-- \u5199\u771f\u3092\u307e\u3068\u3081\u308b\u30ad\u30e3\u30f3\u30d0\u30b9 --&gt;<\/strong>\r\n<strong>    &lt;canvas id=\"canvas\"&gt;&lt;\/canvas&gt;<\/strong>\r\n\r\n<strong>    &lt;!--\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u7528\u30ea\u30f3\u30af--&gt;<\/strong>\r\n<strong>    &lt;a id=\"download_link\"&gt;&lt;\/a&gt;<\/strong>\r\n    \r\n<strong>&lt;\/div&gt;<\/strong>\r\n<strong>&lt;script src=\"https:\/\/unpkg.com\/vue@3.2.31\/dist\/vue.global.prod.js\"&gt;&lt;\/script&gt;<\/strong>\r\n<strong>&lt;script&gt;<\/strong>\r\n\r\n<strong>    const { createApp, ref, computed } = Vue;<\/strong>\r\n\r\n<strong>    createApp({<\/strong>\r\n<strong>        setup() {<\/strong>\r\n\r\n<strong>            \/\/ Data<\/strong>\r\n<strong>            const blockImageLength = ref(200); \/\/ \u3072\u3068\u3064\u306e\u753b\u50cf\u306e\u9577\u3055\uff08px\uff09<\/strong>\r\n<strong>            const columnCount = ref(3); \/\/ \u4f55\u5217\uff1f<\/strong>\r\n<strong>            const showDownloadLink = ref(false); \/\/ \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30ea\u30f3\u30af\u3092\u8868\u793a\u3059\u308b\u304b\u3069\u3046\u304b<\/strong>\r\n\r\n<strong>            \/\/ Canvas<\/strong>\r\n<strong>            const getSourceConfig = img =&gt; { \/\/ \u9078\u629e\u753b\u50cf\u306e\u8a2d\u5b9a\u3092\u53d6\u5f97\u3059\u308b<\/strong>\r\n\r\n<strong>                const width = img.width;<\/strong>\r\n<strong>                const height = img.height;<\/strong>\r\n<strong>                let sourceImageX = 0;<\/strong>\r\n<strong>                let sourceImageY = 0;<\/strong>\r\n<strong>                let sourceLength = 0;<\/strong>\r\n\r\n<strong>                if(width &gt; height) { \/\/ \u6a2a\u9577\u306e\u5834\u5408<\/strong>\r\n\r\n<strong>                    sourceImageX = width \/ 2 - height \/ 2;<\/strong>\r\n<strong>                    sourceLength = height;<\/strong>\r\n\r\n<strong>                } else if(width &lt; height) { \/\/ \u7e26\u9577\u306e\u5834\u5408<\/strong>\r\n\r\n<strong>                    sourceImageY = height \/ 2 - width \/ 2;<\/strong>\r\n<strong>                    sourceLength = width;<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>                return {<\/strong>\r\n<strong>                    sourceImageX,<\/strong>\r\n<strong>                    sourceImageY,<\/strong>\r\n<strong>                    sourceLength<\/strong>\r\n<strong>                };<\/strong>\r\n\r\n<strong>            };<\/strong>\r\n<strong>            const getDestinationConfig = index =&gt; { \/\/ \u30ad\u30e3\u30f3\u30d0\u30b9\u306e\u8a2d\u5b9a\u3092\u53d6\u5f97\u3059\u308b<\/strong>\r\n\r\n<strong>                const destinationLength = blockImageLength.value;<\/strong>\r\n<strong>                const columns = columnCount.value;<\/strong>\r\n<strong>                const destinationX = index % columns * destinationLength; \/\/ X\u5ea7\u6a19\u304c\uff11\u56de\u305a\u3064\u305a\u308c\u3066\u3044\u304f<\/strong>\r\n<strong>                const destinationY = Math.floor(index \/ columns) * destinationLength; \/\/ Y\u5ea7\u6a19\u304c\uff11\u56de\u305a\u3064\u305a\u308c\u3066\u3044\u304f<\/strong>\r\n\r\n<strong>                return {<\/strong>\r\n<strong>                    destinationX,<\/strong>\r\n<strong>                    destinationY,<\/strong>\r\n<strong>                    destinationLength<\/strong>\r\n<strong>                };<\/strong>\r\n\r\n<strong>            };<\/strong>\r\n\r\n<strong>            \/\/ File<\/strong>\r\n<strong>            const onFileChange = e =&gt; {<\/strong>\r\n\r\n<strong>                const files = e.target.files;<\/strong>\r\n<strong>                const fileLength = files.length;<\/strong>\r\n\r\n<strong>                if(fileLength &gt; 0) {<\/strong>\r\n\r\n<strong>                    const canvas = document.getElementById('canvas');<\/strong>\r\n<strong>                    const ctx = canvas.getContext('2d');<\/strong>\r\n\r\n<strong>                    \/\/ \u30ad\u30e3\u30f3\u30d0\u30b9\u306e\u521d\u671f\u5316<\/strong>\r\n<strong>                    canvas.width = blockImageLength.value * columnCount.value;<\/strong>\r\n<strong>                    canvas.height = blockImageLength.value * Math.ceil(fileLength \/ columnCount.value);<\/strong>\r\n<strong>                    ctx.fillStyle = '#000';<\/strong>\r\n<strong>                    ctx.fillRect(0, 0, canvas.width, canvas.height);<\/strong>\r\n\r\n<strong>                    for(let i = 0; i &lt; fileLength; i++) {<\/strong>\r\n\r\n<strong>                        const file = files[i];<\/strong>\r\n<strong>                        let reader = new FileReader();  \/\/ \u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080<\/strong>\r\n<strong>                        reader.readAsDataURL(file);<\/strong>\r\n<strong>                        reader.onload = e =&gt; {<\/strong>\r\n\r\n<strong>                            let img = new Image(); \/\/ \u753b\u50cf\u3092\u8aad\u307f\u8fbc\u3080<\/strong>\r\n<strong>                            img.onload = () =&gt; {<\/strong>\r\n\r\n<strong>                                \/\/ \u5404\u7a2e\u8a2d\u5b9a\u3092\u53d6\u5f97\u3059\u308b<\/strong>\r\n<strong>                                const { sourceImageX, sourceImageY, sourceLength } = getSourceConfig(img);<\/strong>\r\n<strong>                                const { destinationX, destinationY, destinationLength } = getDestinationConfig(i);<\/strong>\r\n\r\n<strong>                                ctx.drawImage( \/\/ \u30ad\u30e3\u30f3\u30d0\u30b9\u3078\u63cf\u753b<\/strong>\r\n<strong>                                    img,<\/strong>\r\n<strong>                                    sourceImageX,<\/strong>\r\n<strong>                                    sourceImageY,<\/strong>\r\n<strong>                                    sourceLength,<\/strong>\r\n<strong>                                    sourceLength,<\/strong>\r\n<strong>                                    destinationX,<\/strong>\r\n<strong>                                    destinationY,<\/strong>\r\n<strong>                                    destinationLength,<\/strong>\r\n<strong>                                    destinationLength,<\/strong>\r\n<strong>                                );<\/strong>\r\n\r\n<strong>                            };<\/strong>\r\n<strong>                            img.src = e.target.result;<\/strong>\r\n\r\n<strong>                        }<\/strong>\r\n\r\n<strong>                        if(i === fileLength - 1) { \/\/ \u6700\u5f8c\u306e\u63cf\u753b\u3092\u3059\u308b\u3068\u304d\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30ea\u30f3\u30af\u3092\u6709\u52b9\u5316<\/strong>\r\n\r\n<strong>                            showDownloadLink.value = true;<\/strong>\r\n\r\n<strong>                        }<\/strong>\r\n\r\n<strong>                    }<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>            };<\/strong>\r\n\r\n<strong>            \/\/ Download<\/strong>\r\n<strong>            const downloadImage = () =&gt; { \/\/ \u30ad\u30e3\u30f3\u30d0\u30b9\u306e\u5185\u5bb9\u3092 JPEG \u3068\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/strong>\r\n\r\n<strong>                const link = document.getElementById('download_link');<\/strong>\r\n<strong>                link.href = canvas.toDataURL('image\/jpeg');<\/strong>\r\n<strong>                link.download = 'merge_image_'+ new Date().getTime() +'.jpg';<\/strong>\r\n<strong>                link.click();<\/strong>\r\n\r\n<strong>            };<\/strong>\r\n\r\n<strong>            return {<\/strong>\r\n<strong>                blockImageLength,<\/strong>\r\n<strong>                columnCount,<\/strong>\r\n<strong>                showDownloadLink,<\/strong>\r\n<strong>                onFileChange,<\/strong>\r\n<strong>                downloadImage<\/strong>\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }).mount('#app');<\/strong>\r\n\r\n<strong>&lt;\/script&gt;<\/strong>\r\n<strong>&lt;\/body&gt;<\/strong>\r\n<strong>&lt;\/html&gt;<\/strong><\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u4e00\u756a\u91cd\u8981\u306a\u306e\u304c\u3001\u9078\u629e\u3055\u308c\u305f\u753b\u50cf\u3092\u30ad\u30e3\u30f3\u30d0\u30b9\u306b\u63cf\u753b\u3059\u308b<code>ctx.drawImage()<\/code>\u306e\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u305d\u308c\u305e\u308c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>drawImage(\r\n    image, \/\/ \u63cf\u753b\u3059\u308b\u753b\u50cf\u30c7\u30fc\u30bf\r\n    sx, \/\/ \u753b\u50cf\u30c7\u30fc\u30bf\u306e\u5207\u308a\u629c\u304f\u4f4d\u7f6e\uff08X\u5ea7\u6a19\uff09\r\n    sy, \/\/ \u753b\u50cf\u30c7\u30fc\u30bf\u306e\u5207\u308a\u629c\u304f\u4f4d\u7f6e\uff08Y\u5ea7\u6a19\uff09\r\n    sWidth, \/\/ \u753b\u50cf\u30c7\u30fc\u30bf\u306e\u5207\u308a\u629c\u304f\u6a2a\u306e\u9577\u3055\r\n    sHeight, \/\/ \u753b\u50cf\u30c7\u30fc\u30bf\u306e\u5207\u308a\u629c\u304f\u7e26\u306e\u9577\u3055\r\n    dx, \/\/ \u5207\u308a\u629c\u3044\u305f\u753b\u50cf\u30c7\u30fc\u30bf\u3092\u63cf\u753b\u3059\u308b\u30ad\u30e3\u30f3\u30d0\u30b9\u306e\u4f4d\u7f6e\uff08X\u5ea7\u6a19\uff09\r\n    dy, \/\/ \u5207\u308a\u629c\u3044\u305f\u753b\u50cf\u30c7\u30fc\u30bf\u3092\u63cf\u753b\u3059\u308b\u30ad\u30e3\u30f3\u30d0\u30b9\u306e\u4f4d\u7f6e\uff08Y\u5ea7\u6a19\uff09\r\n    dWidth, \/\/ \u5207\u308a\u629c\u3044\u305f\u753b\u50cf\u30c7\u30fc\u30bf\u3092\u63cf\u753b\u3059\u308b\u6a2a\u306e\u9577\u3055\r\n    dHeight \/\/ \u5207\u308a\u629c\u3044\u305f\u753b\u50cf\u30c7\u30fc\u30bf\u3092\u63cf\u753b\u3059\u308b\u7e26\u306e\u9577\u3055\r\n)<\/pre>\n<p>\u3064\u307e\u308a\u3001\u4f4d\u7f6e\u3068\u9577\u3055\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u81ea\u52d5\u7684\u306b\u7e2e\u5c0f\uff0f\u62e1\u5927\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u8a73\u3057\u304f\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\uff08\u8aac\u660e\u753b\u50cf\u304c\u308f\u304b\u308a\u3084\u3059\u304b\u3063\u305f\u3067\u3059\ud83d\udc4d\uff09<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong> <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/CanvasRenderingContext2D\/drawImage\" target=\"_blank\" rel=\"noopener\">CanvasRenderingContext2D.drawImage()<\/a><\/p>\n<p>\u307e\u305f\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u90e8\u5206\u306f\u4ee5\u524d\u306b\u516c\u958b\u3057\u305f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=247\">\u305f\u3063\u305f\uff18\u884c\uff01\u30ad\u30e3\u30f3\u30d0\u30b9\u3092\u30ef\u30f3\u30af\u30ea\u30c3\u30af\u3067\u4fdd\u5b58\u3055\u305b\u308bJavaScript\u30b3\u30fc\u30c9\uff08IE\u3082\u5927\u4e08\u592b\uff09<\/a><\/p>\n<p>\u203b \u4eca\u56deIE\u306f\u3082\u3046\u5bfe\u5fdc\u3057\u3066\u307e\u305b\u3093\u3002\u3042\u3057\u304b\u3089\u305a m(_ _)m<\/p>\n<p>\u4eca\u56de\u306f\u901f\u3044\u3067\u3059\u304c\u3001\u3053\u308c\u3067\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\u2757<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u4eca\u56de\u30c6\u30b9\u30c8\u3067\u4f7f\u3046\u306e\u306f\u3001\u3053\u306e\u9593\u3064\u3044\u306b\u884c\u304f\u3053\u3068\u304c\u3067\u304d\u305f\u300c<strong>\u30ea\u30a2\u30eb\u30fb\u5929\u7a7a\u306e\u57ce\u30e9\u30d4\u30e5\u30bf<\/strong>\u300d\u3068\u547c\u3070\u308c\u308b <a href=\"https:\/\/goo.gl\/maps\/LTsZsbDqFvMVppuu9\" target=\"_blank\" rel=\"noopener\">\u548c\u6b4c\u5c71\u770c\u30fb\u53cb\u30f6\u5cf6<\/a> \u306e\u5199\u771f\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u307e\u305a\u30d6\u30e9\u30a6\u30b6\u3067\u300c<strong>https:\/\/******\/merge_image<\/strong>\u300d\u3078\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u8a2d\u5b9a\u306f\u305d\u306e\u307e\u307e\u300c<strong>\u753b\u50cf\u3092\u9078\u629e\u3059\u308b<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10802\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_1.png\" alt=\"\" width=\"640\" height=\"337\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_1.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_1-300x158.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u753b\u50cf\u3092\u9078\u629e\u3059\u308b\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u300c<strong>\u30ea\u30a2\u30eb\u30fb\u5929\u7a7a\u306e\u57ce\u30e9\u30d4\u30e5\u30bf<\/strong>\u300d\u306e\u5199\u771f\u3092\u3044\u304f\u3064\u304b\u9078\u629e\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10804\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_2.png\" alt=\"\" width=\"634\" height=\"709\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_2.png 634w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_2-268x300.png 268w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\uff11\u679a\u306b\u307e\u3068\u307e\u3063\u305f\u753b\u50cf\u304c\u4f5c\u6210\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u300c<strong>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/strong>\u300d\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u3067\u304d\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u3069\u3046\u306a\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f\uff1f\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10806\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_3.png\" alt=\"\" width=\"333\" height=\"213\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_3.png 333w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_3-300x192.png 300w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u5b9f\u969b\u306e\u753b\u50cf\u306f\u3053\u3061\u3089\u3067\u3059\u3002<br \/>\n\u2193\u3000\u2193\u3000\u2193<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10807\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_4.jpg\" alt=\"\" width=\"600\" height=\"600\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_4.jpg 600w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_4-300x300.jpg 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_4-150x150.jpg 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/vue_3_merge_image_4-100x100.jpg 100w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude0a\ud83d\udc4d<\/p>\n<h1>\u30c7\u30e2\u30da\u30fc\u30b8\u3092\u7528\u610f\u3057\u307e\u3057\u305f<\/h1>\n<p>\u305b\u3063\u304b\u304f\u306a\u306e\u3067\u3001\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u305f\u30c7\u30e2\u30da\u30fc\u30b8\u3092\u3054\u7528\u610f\u3057\u307e\u3057\u305f\u3002<br \/>\n\u305c\u3072\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\ud83d\udcdd <a href=\"https:\/\/demo-laravel9x.capilano-fw.com\/merge_image\" target=\"_blank\" rel=\"noopener\">\u30c7\u30e2\u30da\u30fc\u30b8<\/a><\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u6700\u8fd1\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u306f\uff08\u3061\u3087\u3063\u3068\u3057\u305f\u6570\u5b66\u77e5\u8b58\u306f\u5fc5\u8981\u3067\u3059\u304c\uff09\u753b\u50cf\u52a0\u5de5\u3092\u3059\u308b\u3053\u3068\u3082\u7c21\u5358\u306b\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u3082\u3057\u30b7\u30b9\u30c6\u30e0\u4e0a\u3067\u753b\u50cf\u3092\u64cd\u4f5c\u3057\u305f\u3044\u5834\u5408\u306f\u305c\u3072\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude0a\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>Vue 3<\/code>\u3067\u8907\u6570\u5199\u771f\u3092\u3072\u3068\u307e\u3068\u3081\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u7d50\u69cb\u5b9f\u7528\u6027\u304c\u3042\u308b\u3068\u601d\u3046\u306e\u3067\u3001\u305c\u3072\u30c7\u30e2\u30da\u30fc\u30b8\u3082\u5229\u7528\u3057\u3066\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u3082\u3057\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u5b9f\u969b\u306b\u904b\u7528\u3059\u308b\u3068\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6a5f\u80fd\u304c\u3042\u3063\u305f\u307b\u3046\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<ul>\n<li>\u753b\u50cf\u306e\u9806\u756a\u3092\u5909\u66f4\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/li>\n<li>\u6570\u304c\u5408\u3063\u3066\u3044\u306a\u3044\u3068\u9ed2\u3044\u80cc\u666f\u306b\u306a\u308b\u306e\u3067\u3001\u6700\u5f8c\u306e\u753b\u50cf\u306f\u5927\u304d\u304f\u3059\u308b\u306a\u3069\u3057\u3066\u57cb\u3081\u308b<\/li>\n<li>\u753b\u50cf\u3092\u3044\u3064\u3067\u3082\u8ffd\u52a0\u30fb\u524a\u9664\u3067\u304d\u308b<\/li>\n<\/ul>\n<p>\u7686\u3055\u3093\u306f\u3069\u3093\u306a\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u3066\u307f\u305f\u3044\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\n\u305c\u3072\u3084\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9470 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png\" alt=\"\" width=\"294\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png 294w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13-276x300.png 276w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/>\u300c\u548c\u6b4c\u5c71\u306e\u30af\u30e9\u30d5\u30c8\u30d3\u30fc\u30eb\u3082<br \/>\n\u3046\u307e\u304b\u3063\u305f\ud83c\udf7a\u2728\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u3082\u958b\u767a\u8005\u306e\u3072\u3068\u308a\u3068\u3057\u3066\u512a\u79c0\u306a\u30d7\u30ed\u30b0\u30e9\u30de\u3055\u3093\u304c\u591a\u6570\u3044\u3089\u3063\u3057\u3083\u308bTwitter\u306f\u304b\u304b\u3055\u305a\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002 \u305d\u3057\u3066\u3001\u305d\u306e\u5f71\u97ff\u3067\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306e &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10801\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Vue 3\u3011\u8907\u6570\u753b\u50cf\u3092\uff11\u679a\u306b\u307e\u3068\u3081\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b\uff08DL\u3082\u53ef\uff01\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":10811,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-10801","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vue-js"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10801","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=10801"}],"version-history":[{"count":8,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10801\/revisions"}],"predecessor-version":[{"id":11948,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10801\/revisions\/11948"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10811"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}