{"id":1928,"date":"2018-10-31T00:24:57","date_gmt":"2018-10-30T15:24:57","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=1928"},"modified":"2018-10-31T00:24:57","modified_gmt":"2018-10-30T15:24:57","slug":"vue-component-%e3%81%a7%ef%bc%92%e6%9e%9a%e3%81%ae%e7%94%bb%e5%83%8f%e3%82%92%e5%88%87%e3%82%8a%e6%9b%bf%e3%81%88%e3%82%8b%e3%83%81%e3%82%a7%e3%83%83%e3%82%af%e3%83%9c%e3%83%83%e3%82%af%e3%82%b9","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=1928","title":{"rendered":"Vue Component \u3067\uff12\u679a\u306e\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u3064\u304f\u3063\u3066\u307f\u3088\u3046"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3044\u304b\u306b\u958b\u767a\u3092\u52b9\u7387\u7684\u306b\u3059\u308b\u304b\u306f\u7b2c\uff11\u306b\u300c\u3044\u304b\u306b\u518d\u5229\u7528\u3067\u304d\u308b\u90e8\u54c1\u3092\u4f5c\u3063\u3066\u304a\u304f\u304b\u300d\u304c\u5927\u304d\u304f\u95a2\u308f\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\uff08\u30d1\u30bd\u30b3\u30f3\uff09\u306e\u6700\u5927\u5f37\u307f\u306f\u300c\u30b3\u30d4\u30fc\u304c\u3067\u304d\u308b\u3053\u3068\u300d\u3067\u3059\u3002\u3064\u307e\u308a\u3001\u904e\u53bb\u306b\u4f5c\u3063\u305f\u30b3\u30fc\u30c9\u304c\u518d\u5229\u7528\u3067\u304d\u308b\u306a\u3089\u3001\uff08\u3082\u3061\u308d\u3093\u5951\u7d04\u3067\u3057\u3070\u3089\u308c\u306a\u3044\u9650\u308a\u3067\u3059\u304c\uff09\u3044\u3064\u3067\u3082\u305d\u306e\u4f5c\u696d\u3092\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001VueJS\u306e\u300cVue Component\u300d\u306f\u307e\u3055\u306b\u3053\u306e\u300c\u518d\u5229\u7528\u300d\u306b\u7126\u70b9\u3092\u3042\u3066\u305f\u6a5f\u80fd\u3067\u3001\u4e00\u5ea6\u4f5c\u3063\u3066\u304a\u3051\u3070\u3001\u3044\u3064\u3067\u3082HTML\u30bf\u30b0\u306e\u3088\u3046\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u4eca\u56de\u306e\u30c6\u30fc\u30de\u306f\u300c\uff12\u679a\u306e\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u3064\u304f\u308b\u300d\u3067\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u6b21\u306e\u3088\u3046\u306a\u5207\u308a\u66ff\u3048\u3067\u3059\u3002<\/p>\n<p style=\"text-align: right;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1929\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/ok_ng.png\" alt=\"\" width=\"1356\" height=\"738\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/ok_ng.png 1000w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/ok_ng-300x163.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/ok_ng-768x418.png 768w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/ok_ng-1024x557.png 1024w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><span style=\"font-size: 80%;\"><a href=\"https:\/\/www.irasutoya.com\/\" target=\"_blank\" rel=\"noopener\">\u3044\u3089\u3059\u3068\u3084<\/a>\u3055\u3093\u306e\u753b\u50cf\u3092\u4f7f\u308f\u305b\u3066\u3044\u305f\u3060\u3044\u3066\u307e\u3059\u3002\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059 ^^<\/span><\/p>\n<p>\u305c\u3072\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306b\u5f79\u7acb\u3066\u3066\u304f\u3060\u3055\u3044\u306d\u3002<br \/>\n\uff08\u6700\u5f8c\u306b\u6559\u6750\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-427 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/24.png\" alt=\"\" width=\"182\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/24.png 182w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/24-171x300.png 171w\" sizes=\"auto, (max-width: 182px) 100vw, 182px\" \/><\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u4f8b\u3048\u3070\u3001\u59cb\u3081\u306f\u6b21\u306e\u3088\u3046\u306a\u300c\u30d0\u30c4\u30de\u30fc\u30af\u300d\u306e\u753b\u50cf\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1930\" style=\"border: 1px solid #ccc;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/ng.png\" alt=\"\" width=\"200\" height=\"228\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u3082\u3057\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u5834\u5408\u306f\u3001OK\u306e\u753b\u50cf\u753b\u50cf\u306b\u5207\u308a\u66ff\u308f\u308a\u307e\u3059\u3002\u3082\u3046\u4e00\u5ea6\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3089\u3001\u307e\u305f\u5143\u306e\u30d0\u30c4\u30de\u30fc\u30af\u306b\u623b\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1931\" style=\"border: 1px solid #ccc;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/ok.png\" alt=\"\" width=\"200\" height=\"228\" \/><\/p>\n<p>\u3082\u3061\u308d\u3093\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3067\u3059\u304b\u3089\u3001\u5185\u90e8\u7684\u306b<code>true<\/code> or <code>false<\/code>\u306e\u30c7\u30fc\u30bf\u3092\u6301\u3063\u3066\u3044\u3066\u3001\u5909\u66f4\u3057\u305f\u3089\u304d\u3061\u3093\u3068\u547c\u3073\u51fa\u3057\u5074\u306b\u3082\u30a4\u30d9\u30f3\u30c8\u901a\u77e5\u3057\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001<strong>\u901a\u5e38\u306e\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306e\u753b\u50cf\u5207\u308a\u66ff\u3048\u30d0\u30fc\u30b8\u30e7\u30f3<\/strong>\u3067\u3059\u306d\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u4e0a\u306e\u4f8b\u306a\u3089\u300c\u898f\u7d04\u306b\u540c\u610f\u3059\u308b\u300d\u90e8\u5206\u306b\u4f7f\u3046\u3068\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u958b\u767a\u3092\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h1>Vue\u306e\u57fa\u672c\u5f62\u3092\u4f5c\u308b<\/h1>\n<p>\u307e\u305a\u306fVue\u304c\u4f7f\u3048\u308b\u74b0\u5883\u3092\u6574\u3048\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4eca\u56de\u306f<code>cdn<\/code>\u3092\u4f7f\u3063\u3066<code>Vue<\/code>\u672c\u4f53\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<pre>&lt;html&gt;\r\n&lt;body&gt;\r\n    &lt;div <strong>id=\"app\"<\/strong>&gt;\r\n\r\n    &lt;\/div&gt;\r\n    <strong>&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue@2.5.17\/dist\/vue.min.js\"&gt;&lt;\/script&gt;<\/strong>\r\n    &lt;script&gt;\r\n\r\n        <strong>new Vue({<\/strong>\r\n<strong>            el: '#app'<\/strong>\r\n<strong>        });<\/strong>\r\n\r\n    &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u305d\u3057\u3066\u3001\u3053\u3053\u306b\u3053\u308c\u304b\u3089\u3064\u304f\u308bVue Component\u306e<code>v-image-checkbox<\/code>\u30bf\u30b0\u3092\u8ffd\u52a0\u3002<code>accept<\/code>\u3068\u3044\u3046\u540d\u524d\u306e\u5909\u6570\u3092\u4f5c\u3063\u3066\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;div id=\"app\"&gt;\r\n    <strong>&lt;v-image-checkbox<\/strong>\r\n<strong>        true-image=\".\/images\/ok.png\"<\/strong>\r\n<strong>        false-image=\".\/images\/ng.png\"<\/strong>\r\n<strong>        v-model=\"accept\"&gt;<\/strong>\r\n<strong>    &lt;\/v-image-checkbox&gt;<\/strong>\r\n&lt;\/div&gt;<\/pre>\n<pre>&lt;script&gt;\r\n\r\n    new Vue({\r\n        el: '#app',\r\n        data: {\r\n            <strong>accept: false<\/strong>\r\n        }\r\n    });\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>\u3064\u307e\u308a\u4f55\u304c\u8d77\u304d\u308b\u304b\u3068\u3044\u3046\u3068\u3001<code>v-image-checkbox<\/code>\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u3066\u5207\u308a\u66ff\u308f\u308b\u3068\u3001\u305d\u306e<code>true<\/code> or <code>false<\/code> \u304c<code>accept<\/code>\u306b\u3082\u4f1d\u308f\u308b\u3068\u3044\u3046\u5185\u5bb9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001<code>true-image<\/code>\u3068<code>false-image<\/code>\u306f\u8868\u793a\u3059\u308b\uff12\u679a\u306e\u753b\u50cf\u3078\u306eURL\uff08URI\uff09\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u3053\u306e\u5834\u5408\u306f<code>images\/<\/code>\u306b\uff12\u679a\u306e\u753b\u50cf\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1932\" style=\"border: 1px solid #ccc;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/Screenshot-from-2018-10-30-17-19-49.png\" alt=\"\" width=\"250\" height=\"141\" \/><\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h1>Vue Component\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u304d\u308b\u3060\u3051\u518d\u5229\u7528\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u5c02\u7528\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u3064\u304f\u3063\u3066\u3001\u305d\u3053\u3078\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002\u307e\u305a<code>v-image-checkbox.js<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306b\u6b21\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre>Vue.component('v-image-checkbox', {\r\n    <strong>props: {<\/strong>\r\n<strong>        'true-image': {<\/strong>\r\n<strong>            type: String,<\/strong>\r\n<strong>            default: ''<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        'false-image': {<\/strong>\r\n<strong>            type: String,<\/strong>\r\n<strong>            default: ''<\/strong>\r\n<strong>        },<\/strong>\r\n<strong>        'value': {<\/strong>\r\n<strong>            type: Boolean,<\/strong>\r\n<strong>            default: false<\/strong>\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>,\r\n    template: '&lt;a href=\"#\" @click.prevent=\"onClick()\"&gt;&lt;img style=\"border:1px solid #ccc;border-radius:5px;\" :src=\"imageUrl\"&gt;&lt;\/a&gt;',\r\n    methods: {\r\n        <strong>onClick: function() {<\/strong>\r\n\r\n<strong>            this.value = !this.value;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n    },\r\n    computed: {\r\n        <strong>imageUrl: function() {<\/strong>\r\n\r\n<strong>            return (this.value) ? this.trueImage : this.falseImage<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n    },\r\n    watch: {\r\n        <strong>value: function(value) {<\/strong>\r\n\r\n<strong>            this.$emit('input', value);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n    }\r\n});<\/pre>\n<p>\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<h3>props<\/h3>\n<p><code>&lt;v-image-checkbox&gt;<\/code>\u30bf\u30b0\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001<code>true-image<\/code>\u3068<code>false-image<\/code>\u306f\u6587\u5b57\u5217\u3067\u521d\u671f\u5024\u306f\u7a7a\u767d\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001<code>value<\/code>\u306f\u5b9f\u969b\u306b\u306f\u6307\u5b9a\u3057\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u3053\u308c\u306f<code>v-model<\/code>\u3068\u9023\u643a\u3059\u308b\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u4eca\u56de\u306e\u4f8b\u3067\u306f\u3055\u3063\u304d\u6307\u5b9a\u3057\u305f<code>accept<\/code>\u306e\u4e2d\u8eab\u304c\u3053\u3053\u306b\u5165\u3063\u3066\u304f\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u521d\u671f\u5024\u306f<code>false<\/code>\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3>template<\/h3>\n<p><code>template<\/code>\u90e8\u5206\u306f\u5b9f\u969b\u306b\u8868\u793a\u3055\u308c\u308b\u5834\u6240\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u753b\u50cf\u3092&lt;a&gt;\u30bf\u30b0\u3067\u56f2\u3093\u3067<code>@click.prevent<\/code>\u3092\u4f7f\u3063\u3066\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001<code>&lt;img&gt;<\/code>\u30bf\u30b0\u306e<code>:src<\/code>\u306b\u306f<code>imageUrl<\/code>\u3068\u3044\u3046\u5909\u6570\u306b\u306f\u5b58\u5728\u3057\u306a\u3044\u3082\u306e\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306f<code>computed<\/code>\u304b\u3089\u547c\u3073\u51fa\u305b\u308b\u64ec\u4f3c\u7684\u306a\u5909\u6570\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>methods<\/h3>\n<p><strong>onClick()<\/strong>\u306f\u753b\u50cf\u30ea\u30f3\u30af\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3068\u304d\u306b\u5b9f\u884c\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<br \/>\n\u3053\u306e\u4e2d\u8eab\u3067\u306f\u3001\u30af\u30ea\u30c3\u30af\u3059\u308b\u3054\u3068\u306b\u5909\u6570<code>\"value\"<\/code>\u306e\u5024\u304c<code>true<\/code>\u3068<code>false<\/code>\u306b\u5207\u308a\u66ff\u308f\u308a\u307e\u3059\u3002\uff08\u3064\u307e\u308a\u3001\u6b21\u306ecomputed\u306eimageUrl\u3082\u81ea\u52d5\u7684\u306b\u5207\u308a\u66ff\u308f\u308a\u307e\u3059\uff09<\/p>\n<h3>computed<\/h3>\n<p>\u3053\u3053\u3067\u8a2d\u5b9a\u3057\u305f\u3082\u306e\u306f\u3001\u64ec\u4f3c\u7684\u306a\u5909\u6570\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\nimageURL\u5185\u3067\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u3001\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>value \u304c true\u3000\u30fb\u30fb\u30fb\u3000true-image \u306eURL\u3067\u753b\u50cf\u3092\u8868\u793a\u3059\u308b<\/li>\n<li>value \u304c false\u3000\u30fb\u30fb\u30fb\u3000false-image \u306eURL\u3067\u753b\u50cf\u3092\u8868\u793a\u3059\u308b<\/li>\n<\/ul>\n<h3>watch<\/h3>\n<p>\u3053\u3053\u3067\u306f\u5909\u6570<code>\"value\"<\/code>\u306e\u5024\u304c\u5909\u5316\u3057\u305f\u5834\u5408\u306b\u5b9f\u884c\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5b9f\u884c\u3059\u308b\u5185\u5bb9\u306f\u30a4\u30d9\u30f3\u30c8\u306e\u901a\u77e5\u3067\u3059\u3002\u3064\u307e\u308a\u3001\u3053\u306e\u90e8\u5206\u304c\u3042\u308b\u306e\u3067\u3001<code>true<\/code>\u00a0\u3001\u3082\u3057\u304f\u306f\u00a0<code>false<\/code>\u304c\u547c\u3073\u51fa\u3057\u5143\u306e<code>accept<\/code>\u306b\u4f1d\u308f\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3053\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8aad\u307f\u8fbc\u3093\u3067\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>&lt;script src=\".\/js\/v-image-checkbox.js\"&gt;&lt;\/script&gt;<\/strong><\/pre>\n<p>\u3061\u306a\u307f\u306b\u3001\u3088\u308a<code>true<\/code>\u3068<code>false<\/code>\u306e\u5207\u308a\u66ff\u3048\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u3001\u6b21\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c9\u5c11\u3057\u8db3\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre>\u898f\u7d04\u306b\u540c\u610f\u3059\u308b\uff1a&lt;br&gt;&lt;br&gt;\r\n&lt;v-image-checkbox\r\n    true-image=\"\/images\/ok.png\"\r\n    false-image=\"\/images\/ng.png\"\r\n    v-model=\"accept\"&gt;\r\n&lt;\/v-image-checkbox&gt;\r\n<strong>&lt;button type=\"button\" :disabled=\"!accept\"&gt;\u9001\u4fe1\u3059\u308b&lt;\/button&gt;<\/strong><\/pre>\n<p>\u3064\u307e\u308a\u3001<code>accept<\/code>\u306e\u4e2d\u8eab\u304c<code>true<\/code>\u306a\u3089\u30dc\u30bf\u30f3\u306f\u30af\u30ea\u30c3\u30af\u3067\u304d\u307e\u3059\u304c\u3001<code>false<\/code>\u306a\u3089\u30af\u30ea\u30c3\u30af\u306f\u3067\u304d\u306a\u3044\u3088\u3046<code>disabled<\/code>\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u30da\u30fc\u30b8\u3092\u8868\u793a\u3057\u305f\u521d\u671f\u72b6\u614b\u3067\u3059\u3002<br \/>\n\u30dc\u30bf\u30f3\u306f\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1933\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/v-image-checkbox_1.png\" alt=\"\" width=\"292\" height=\"287\" \/><\/p>\n<p>\u7d9a\u3044\u3066\u3001\u753b\u50cf\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1934\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/v-image-checkbox_2.png\" alt=\"\" width=\"293\" height=\"289\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/v-image-checkbox_2.png 293w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/10\/v-image-checkbox_2-100x100.png 100w\" sizes=\"auto, (max-width: 293px) 100vw, 293px\" \/><\/p>\n<p>\u753b\u50cf\u304c\u81ea\u52d5\u7684\u306b\u5207\u308a\u66ff\u308f\u308a\u3001\u30dc\u30bf\u30f3\u3082\u6709\u52b9\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h1>\u6559\u6750\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>\u4eca\u56de\u958b\u767a\u3057\u305f\u30b3\u30fc\u30c9\uff08\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u542b\u3080\uff09\u6559\u6750\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u518d\u914d\u5e03\u306f\u3067\u304d\u306a\u3044\u306e\u3067\u753b\u50cf\u306f\u5909\u66f4\u3057\u3066\u3042\u308a\u307e\u3059\u304c\u3001<code>cdn<\/code>\u3092\u4f7f\u3063\u3066<code>vue<\/code>\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u308b\u306e\u3067\u3059\u3050\u52d5\u4f5c\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=1935&amp;tmstv=1777540859\" rel=\"nofollow\" id=\"download-link-1935\" data-redirect=\"false\" >\n\t\uff12\u679a\u306e\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\uff1a \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/a>\n\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3044\u304b\u306b\u958b\u767a\u3092\u52b9\u7387\u7684\u306b\u3059\u308b\u304b\u306f\u7b2c\uff11\u306b\u300c\u3044\u304b\u306b\u518d\u5229\u7528\u3067\u304d\u308b\u90e8\u54c1\u3092\u4f5c\u3063\u3066\u304a\u304f\u304b\u300d\u304c\u5927\u304d\u304f\u95a2\u308f\u3063\u3066\u304d\u307e\u3059\u3002 \u30d7\u30ed\u30b0\u30e9\u30de\u30fc\uff08\u30d1\u30bd\u30b3\u30f3\uff09\u306e\u6700\u5927\u5f37\u307f\u306f\u300c\u30b3\u30d4\u30fc\u304c\u3067\u304d &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=1928\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Vue Component \u3067\uff12\u679a\u306e\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u3064\u304f\u3063\u3066\u307f\u3088\u3046&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":1941,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,12],"tags":[101,100],"class_list":["post-1928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-vue-js","tag-vue-component","tag-100"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1928","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=1928"}],"version-history":[{"count":3,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1928\/revisions"}],"predecessor-version":[{"id":1940,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1928\/revisions\/1940"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/1941"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}