{"id":2735,"date":"2018-12-04T04:42:34","date_gmt":"2018-12-03T19:42:34","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=2735"},"modified":"2018-12-04T04:42:34","modified_gmt":"2018-12-03T19:42:34","slug":"%e5%85%a5%e5%8a%9b%e3%81%97%e3%81%9f%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%82%92%e7%a2%ba%e8%aa%8d%e3%81%a7%e3%81%8d%e3%82%8bvue%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%86%e3%82%a3","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=2735","title":{"rendered":"\u5165\u529b\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u78ba\u8a8d\u3067\u304d\u308bVue\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\uff08IE\u3082OK\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u6700\u8fd1\u79c1\u306e\u500b\u4eba\u7684\u306aVue\u958b\u767a\u3067\u306f\u30b2\u30fc\u30e0\u3001\u72ec\u81ea\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3001\u305d\u3057\u3066\u72ec\u81ea\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306e\uff13\u3064\u304c\u30e1\u30a4\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306f\u4f7f\u3044\u56de\u3057\u304c\u3057\u3084\u3059\u3044\u306e\u3067\u3001\u4f5c\u308c\u3070\u4f5c\u308b\u307b\u3069\u5f8c\u306e\u4f5c\u696d\u304c\u697d\u306b\u306a\u308b\u3053\u3068\u3092\u5b9f\u611f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u3093\u306a\u95a2\u4fc2\u304b\u3089\u4eca\u56de\u306f\u958b\u767a\u3059\u308b\u306e\u306f\u3001\u6b21\u306e\u6a5f\u80fd\u3092\u3082\u3063\u305fVue\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3067\u3059\u3002<\/p>\n<p><strong>\u300c\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u4e2d\u8eab\u304c\u78ba\u8a8d\u3067\u304d\u308b\u5165\u529b\u30dc\u30c3\u30af\u30b9\u300d<\/strong><\/p>\n<p>\u307f\u306a\u3055\u3093\u306f\u3001\u3053\u308c\u307e\u3067\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3067\u3001\u6b21\u306e\u3088\u3046\u306a\u300c\u5165\u529b\u5185\u5bb9\u3092\u78ba\u8a8d\u3067\u304d\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u30dc\u30c3\u30af\u30b9\u300d\u3092\u898b\u305f\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2736\" style=\"border: 1px solid #ccc;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/show_password_input_1.png\" alt=\"\" width=\"346\" height=\"121\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/show_password_input_1.png 346w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/show_password_input_1-300x105.png 300w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/p>\n<p>\u3053\u306e\u5165\u529b\u30dc\u30c3\u30af\u30b9\u304c\u3042\u308c\u3070\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\uff12\u5ea6\u540c\u3058\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u5fc5\u8981\u6027\u306f\u5c11\u306a\u304f\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u30e6\u30fc\u30b6\u30d3\u30ea\u30c6\u30a3\u306f\u5411\u4e0a\u3059\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3068\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u3053\u306e\u6a5f\u80fd\u3092\u72ec\u81eaVue\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3067\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2596 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/14-2.png\" alt=\"\" width=\"370\" height=\"350\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/14-2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/14-2-300x284.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<p>\u203b \u958b\u767a\u74b0\u5883\uff1a Vue 2.5<\/p>\n<h1>\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306e\u6982\u8981<\/h1>\n<p>\u307e\u305a\u4f7f\u3044\u65b9\u306f\u7c21\u5358\u3067\u3001<code>v-show-password-input<\/code>\u3092\u3064\u3051\u308b\u3060\u3051\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u78ba\u8a8d\u6a5f\u80fd\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;input type=\"password\" <strong>v-show-password-input<\/strong>&gt;<\/pre>\n<p>\u203b \u5f53\u521d\u306f\u3001Vue\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u5b9f\u73fe\u3057\u3088\u3046\u3068\u8003\u3048\u307e\u3057\u305f\u304c\u3001\u305d\u3046\u306a\u308b\u3068CSS\u3092\u8a2d\u5b9a\u3057\u306b\u304f\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306b\u843d\u3061\u7740\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u3053\u306e\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u624b\u9806\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u901a\u5e38\u306e\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3092\u3064\u304f\u308b\uff08\u3053\u308c\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u304c\u5207\u308a\u66ff\u308f\u308b\uff09<\/li>\n<li>\u8868\u793a\u5207\u308a\u66ff\u3048\u3092\u3059\u308b\u30ea\u30f3\u30af\uff08\u76ee\u306e\u30de\u30fc\u30af\u279c\ud83d\udc41\uff09\u3092\u3064\u304f\u308b<\/li>\n<li>\u30ea\u30f3\u30af\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3089\u30ce\u30fc\u30de\u30eb\u5165\u529b\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3092\u5207\u308a\u66ff\u3048\u3001\u3055\u3089\u306b\u76ee\u306e\u30de\u30fc\u30af\u3082\u300c\ud83d\udc41\u300d\u3068\u300c\ud83d\udd76\u300d\u3092\u5207\u308a\u66ff\u3048\u308b<\/li>\n<\/ul>\n<p>\u3061\u306a\u307f\u306b\u76ee\u306e\u30de\u30fc\u30af\u3068\u30b5\u30f3\u30b0\u30e9\u30b9\u306e\u30de\u30fc\u30af\u306f\u7d75\u6587\u5b57\u306a\u306e\u3067\u3001HTML\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u30b3\u30fc\u30c9\u3060\u3051\u3067\u5b9f\u73fe\u3057\u307e\u3059\u3002\uff08\u3064\u307e\u308a\u3001\u753b\u50cf\u3084\u30d5\u30a9\u30f3\u30c8\u30fb\u30a2\u30a4\u30b3\u30f3\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\uff09<\/p>\n<p>\u307e\u305f\u3001\u6c4e\u7528\u7684\u306b\u4f7f\u3044\u305f\u3044\u306e\u3067<code>IE 11<\/code>\u3001<code>edge<\/code>\u306b\u3082\u5bfe\u5fdc\u3055\u305b\u307e\u3059\u3002<\/p>\n<h1>\u30c7\u30e2\u3092\u7528\u610f\u3057\u307e\u3057\u305f<\/h1>\n<p><a href=\"https:\/\/demo-laravel52.capilano-fw.com\/vue_show_password_input\" target=\"_blank\" rel=\"noopener\">\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>\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u5b9f\u969b\u306b\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306e\u57fa\u672c\u5f62\u3092\u3064\u304f\u308b<\/h2>\n<p>\u307e\u305a\u306f<code>v-show-password-input<\/code>\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre>Vue.directive(<strong>'show-password-input'<\/strong>, {\r\n    inserted: function(el) {\r\n\r\n        \/\/ \u3053\u3053\u306b\u30b3\u30fc\u30c9\r\n\r\n    }\r\n});<\/pre>\n<p>\u4eca\u56de\u306f\u65b0\u3057\u3044\u8981\u7d20\u3092\u8ffd\u52a0\u3059\u308b\u306e\u3067<code>inserted<\/code>\u5185\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u203b \u306a\u304a\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306e\u5b9a\u7fa9\u306e\u5834\u5408\u306f<code>v-<\/code>\u306f\u4e0d\u8981\u306a\u306e\u3067\u6c17\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u308c\u3067<code>v-show-password-input<\/code>\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u304c\u6709\u52b9\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h2>\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e\u30af\u30ed\u30fc\u30f3\u3092\u3064\u304f\u308b<\/h2>\n<p>\u3067\u306f\u3001\u78ba\u8a8d\u7528\u306e\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3001<code>&lt;input type=\"password\"&gt;<\/code>\u3092\u30af\u30ed\u30fc\u30f3\u3057\u3066\u3001\u3059\u3050\u3068\u306a\u308a\u306b\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n<pre>inserted: function(el) {\r\n\r\n<strong>    var clone = el.cloneNode();<\/strong>\r\n<strong>    clone.id = '';<\/strong>\r\n<strong>    clone.type = 'text';<\/strong>\r\n<strong>    clone.style.display = 'none';<\/strong>\r\n<strong>    clone.addEventListener('input', function(e) {<\/strong>\r\n\r\n<strong>        var inputEvent = document.createEvent('Event');<\/strong>\r\n<strong>        inputEvent.initEvent('input', true, false);<\/strong>\r\n<strong>        el.value = e.target.value;<\/strong>\r\n<strong>        el.dispatchEvent(inputEvent);<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n<strong>    el.parentNode.insertBefore(clone, el);<\/strong>\r\n\r\n}<\/pre>\n<p>\u624b\u9806\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>cloneNode() \u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3068\u540c\u3058\u3082\u306e\u3092\u7528\u610f\u3059\u308b<\/li>\n<li>id\u306f\u4e0d\u8981\u306a\u306e\u3067\u7a7a\u767d\u306b\u3059\u308b<\/li>\n<li>\u5165\u529b\u30bf\u30a4\u30d7\u3092\u901a\u5e38\u306e text \u3078\u5909\u66f4<\/li>\n<li>\u5207\u66ff\u3057\u305f\u3068\u304d\u3060\u3051\u8868\u793a\u3059\u308b\u306e\u3067 display \u306f none \u3092\u8a2d\u5b9a\u3059\u308b<\/li>\n<li>\u5165\u529b\u304c\u3042\u3063\u305f\u3089\u3001\u30d1\u30b9\u30ef\u30fc\u30c9&lt;input&gt;\u3068\u540c\u671f\u3057\u3001 input \u30a4\u30d9\u30f3\u30c8\u3092\u9001\u51fa \u203b<\/li>\n<li>\u6700\u5f8c\u306b\u30af\u30ed\u30fc\u30f3\u3057\u305f\u78ba\u8a8d\u7528\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3092HTML\u306b\u8ffd\u52a0<\/li>\n<\/ol>\n<p>\u203b\uff11\u3000\u30fb\u30fb\u30fb\u3000<code>v-model<\/code>\u306b\u5909\u66f4\u3092\u4f1d\u3048\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u307e\u3059<\/p>\n<h2>\u8868\u793a\u5207\u308a\u66ff\u3048\u3059\u308b\u30ea\u30f3\u30af\u3092\u3064\u304f\u308b<\/h2>\n<p>\u3067\u306f\u3001\u8868\u793a\u5207\u308a\u66ff\u3048\u3092\u3059\u308b\u305f\u3081\u306e\u6b21\u306e\u3088\u3046\u306a\u76ee\u30de\u30fc\u30af\u306e\u30ea\u30f3\u30af\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2737\" style=\"border: 1px solid #ccc;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/show_password_input_2.png\" alt=\"\" width=\"334\" height=\"85\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/show_password_input_2.png 334w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/show_password_input_2-300x76.png 300w\" sizes=\"auto, (max-width: 334px) 100vw, 334px\" \/><\/p>\n<pre>inserted: function(el) {\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>var icons = {\r\n        show: '&amp;#x1F441;',\r\n        hide: '&amp;#x1F576;'\r\n    };\r\n    var a = document.createElement('a');\r\n    a.style.position = 'absolute';\r\n    a.style.cursor = 'pointer';\r\n    a.style.fontSize = clone.style.fontSize;\r\n    a.style.color = clone.style.color;\r\n    a.textDecoration = 'none';\r\n    a.innerHTML = icons.show;\r\n    a.addEventListener('click', function(e) {\r\n\r\n        if(clone.style.display === 'none') {\r\n\r\n            e.target.innerHTML = icons.hide;\r\n            el.style.display = 'none';\r\n            clone.style.display = '';\r\n            clone.value = el.value;\r\n            clone.focus();\r\n\r\n        } else {\r\n\r\n            e.target.innerHTML = icons.show;\r\n            clone.style.display = 'none';\r\n            el.style.display = '';\r\n            el.value = clone.value;\r\n            el.focus();\r\n\r\n        }\r\n\r\n        e.preventDefault();\r\n\r\n    });\r\n    document.body.appendChild(a);<\/strong>\r\n\r\n}<\/pre>\n<p>\u624b\u9806\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>\u300c\ud83d\udc41\u300d\u3068\u300c\ud83d\udd76\u300d\u306e\u7d75\u6587\u5b57\u3092HTML\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3067\u5b9a\u7fa9\u3059\u308b<\/li>\n<li>&lt;a&gt;\u30bf\u30b0\u3092\u4f5c\u6210<\/li>\n<li>\u4f4d\u7f6e\u306f\u7d76\u5bfe\u6307\u5b9a\u3059\u308b\u306e\u3067 absolute<\/li>\n<li>&lt;a&gt;\u306b href \u3092\u3064\u3051\u306a\u3044\u3068\u30ab\u30fc\u30bd\u30eb\u304c\u5207\u308a\u66ff\u308f\u3089\u306a\u3044\u306e\u3067\u30ab\u30fc\u30bd\u30eb\u3092\u6307\u5b9a<\/li>\n<li>\u8272\u306f\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3068\u540c\u3058\u8272\u306b\u3057\u3001\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc\u7b49\u3092\u975e\u8868\u793a\u306b\u3059\u308b<\/li>\n<li>\u521d\u671f\u72b6\u614b\u306f\u76ee\u306e\u30de\u30fc\u30af\u3092\u8868\u793a<\/li>\n<li>\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3089\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u30ce\u30fc\u30de\u30eb\u5165\u529b\u3001\u305d\u3057\u3066\u76ee\u3068\u30b5\u30f3\u30b0\u30e9\u30b9\u306e\u8868\u793a\u5207\u308a\u66ff\u3048\u3092\u3057\u3001\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3078\u79fb\u3059<\/li>\n<li>\u6700\u5f8c\u306bHTML\u306b\u30ea\u30f3\u30af\u3092\u633f\u5165\u3059\u308b<\/li>\n<\/ol>\n<h2>\u8868\u793a\u5207\u308a\u66ff\u3048\u3059\u308b\u30ea\u30f3\u30af\u306e\u4f4d\u7f6e\u3092\u4fee\u6b63\u3059\u308b<\/h2>\n<p>\u8868\u793a\u5207\u308a\u66ff\u3048\u30ea\u30f3\u30af\u306e<code>position<\/code>\u306f<code>absolute<\/code>\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5b9f\u969b\u306e\u4f4d\u7f6e\u306f\u307e\u3060\u6307\u5b9a\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u8a08\u7b97\u3057\u3066\u79fb\u52d5\u3055\u305b\u307e\u3059\u3002<\/p>\n<pre>inserted: function(el) {\r\n\r\n    <strong>function alignElement(target) {<\/strong>\r\n\r\n<strong>        var rect = el.getBoundingClientRect();<\/strong>\r\n<strong>        const clientWidth = target.clientWidth;<\/strong>\r\n<strong>        const clientHeight = target.clientHeight;<\/strong>\r\n<strong>        const left = rect.right - Math.round(clientWidth) - 10;<\/strong>\r\n<strong>        const top = rect.top + Math.round(rect.height * 0.5) - Math.round(clientHeight * 0.5);<\/strong>\r\n<strong>        target.style.left = window.pageXOffset + left +'px';<\/strong>\r\n<strong>        target.style.top = window.pageYOffset + top +'px';<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n    \r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>alignElement(a);<\/strong>\r\n\r\n<strong>    window.addEventListener('resize', function() {<\/strong>\r\n\r\n<strong>        alignElement(a);<\/strong>\r\n\r\n<strong>    })<\/strong><\/pre>\n<p>\u307e\u305a\u3001\u4f4d\u7f6e\u3092\u79fb\u52d5\u3055\u305b\u308b<code>alignElement()<\/code>\u3092\u95a2\u6570\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u305f\u3060\u304f\u3068\u5206\u304b\u308b\u3068\u304a\u308a\u3001\u4f5c\u6210\u6642\u3068\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30ea\u30b5\u30a4\u30ba\u6642\u306e\uff12\u30f6\u6240\u3067\u5229\u7528\u3059\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<p><code>alignElement()<\/code>\u306e\u4e2d\u8eab\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>getBoundingClientRect() \u3067\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e\u4f4d\u7f6e\u3092\u53d6\u5f97<\/li>\n<li>\u30ea\u30f3\u30af\u306e\u30b5\u30a4\u30ba\u3084\u30b9\u30af\u30ed\u30fc\u30eb\u4f4d\u7f6e\u4f7f\u3063\u3066 top \u3068 left \u3092\u8a08\u7b97<\/li>\n<li>\u8a08\u7b97\u3057\u305f\u4f4d\u7f6e\u3078\u79fb\u52d5<\/li>\n<\/ol>\n<p>\u3053\u308c\u3067\u3001\u3082\u3057\u30b9\u30af\u30ed\u30fc\u30eb\u4f4d\u7f6e\u304c\u305a\u308c\u3066\u3044\u3066\u3082\u304d\u3061\u3093\u3068\u3057\u305f\u4f4d\u7f6e\u306b\u79fb\u52d5\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h1>\u3061\u306a\u307f\u306b\uff08IE\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306b\uff09<\/h1>\n<p>\u3061\u306a\u307f\u306b\u4eca\u56de\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f<code>IE 11<\/code>\u3084<code>edge<\/code>\u3067\u3082\u52d5\u304f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5b9f\u306f\u3053\u308c\u3089\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u306f\u6a19\u6e96\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8868\u793a\u3059\u308b\u6a5f\u80fd\u304c\u3064\u3044\u3066\u3044\u308b\u306e\u3067\u3001\u3082\u3057<code>v-show-password-input.js<\/code>\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306eCSS\u3092\u8ffd\u52a0\u3057\u3066\u30d1\u30b9\u30ef\u30fc\u30c9\u8868\u793a\u6a5f\u80fd\u3092\u7121\u52b9\u306b\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;style&gt;\r\n\r\n<strong>    ::-ms-clear { display: none; }<\/strong>\r\n<strong>    ::-ms-reveal { display: none; }<\/strong>\r\n\r\n&lt;\/style&gt;<\/pre>\n<h1>npm\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u7528\u610f\u3057\u307e\u3057\u305f<\/h1>\n<p>\u4eca\u56de\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u3088\u3046\u306b<code>npm<\/code>\u3078\u767b\u9332\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u3002<br \/>\n\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>npm i v-show-password-input --save<\/strong><\/pre>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u4eca\u56de\u306f\u72ec\u81eaVue\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u78ba\u8a8d\u3067\u304d\u308b\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u5c11\u3057\u4eca\u56de\u306e\u30c6\u30fc\u30de\u3068\u306f\u305a\u308c\u307e\u3059\u304c\u3001\u958b\u767a\u3057\u3066\u3044\u308b\u4e2d\u3067\u300c\u7d75\u6587\u5b57\u3063\u3066\u4fbf\u5229\uff01\u300d\u3092\u75db\u611f\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001\u4e00\u6614\u524d\u307e\u3067\u3060\u3068<code>font-awesome<\/code>\u306a\u3069\u306e\u30d5\u30a9\u30f3\u30c8\u30a2\u30a4\u30b3\u30f3\u3092\u4f7f\u3046\u306e\u304c\u4e3b\u6d41\u3067\u3057\u305f\u304c\u6700\u8fd1\u306f\u5c11\u3057\u30c7\u30b6\u30a4\u30f3\u306f\u9055\u3046\u3068\u306f\u3044\u3048\u3001Chrome\u3001FireFox\u3001Safari\u3001IE\u3001Edge\u306a\u3069\u4e3b\u8981\u306a\u30d6\u30e9\u30a6\u30b6\u3067\u307b\u307c\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3057\u3001\u30c7\u30b6\u30a4\u30f3\u3082<a href=\"https:\/\/emojipedia.org\/\" target=\"_blank\" rel=\"noopener\">emojipedia<\/a>\u306a\u3069\u3067\u78ba\u8a8d\u3067\u304d\u3066\u3068\u3066\u3082\u4f7f\u3044\u52dd\u624b\u304c\u3044\u3044\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3082\u4f7f\u3044\u65b9\u306f\u3001\uff19\u6587\u5b57\u306eHTML\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3002<\/p>\n<p><span style=\"font-size: 1rem;\">\u3053\u308c\u304b\u3089\u306e\u958b\u767a\u3067\u3082\u305c\u3072\u6d3b\u7528\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3057\u305f\u3002<br \/>\n<\/span>\u3053\u3061\u3089\u3082\u307f\u306a\u3055\u3093\u306e\u53c2\u8003\u306b\u306a\u308c\u3070\u5149\u6804\u3067\u3059\uff01<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-428 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/30.png\" alt=\"\" width=\"205\" height=\"350\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/30.png 205w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/30-176x300.png 176w\" sizes=\"auto, (max-width: 205px) 100vw, 205px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u6700\u8fd1\u79c1\u306e\u500b\u4eba\u7684\u306aVue\u958b\u767a\u3067\u306f\u30b2\u30fc\u30e0\u3001\u72ec\u81ea\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3001\u305d\u3057\u3066\u72ec\u81ea\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306e\uff13\u3064\u304c\u30e1\u30a4\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u30c7\u30a3\u30ec\u30af\u30c6 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=2735\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u5165\u529b\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u78ba\u8a8d\u3067\u304d\u308bVue\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\uff08IE\u3082OK\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":2741,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[69,125],"class_list":["post-2735","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vue-js","tag-69","tag-125"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/2735","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=2735"}],"version-history":[{"count":3,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/2735\/revisions"}],"predecessor-version":[{"id":2740,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/2735\/revisions\/2740"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/2741"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}