{"_id":"vue-puzzle-vcode","_rev":"38-4b27092ed9c917f11758970b9dd4bf01","name":"vue-puzzle-vcode","dist-tags":{"latest":"1.1.10","beta":"1.1.2-beta4"},"versions":{"1.0.0":{"name":"vue-puzzle-vcode","version":"1.0.0","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.5.21"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-proposal-object-rest-spread":"^7.2.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/polyfill":"^7.0.0","@babel/runtime":"^7.2.0","autoprefixer":"^9.4.3","babel-loader":"^8.0.4","babel-plugin-import":"^1.11.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^1.0.0","css-loader":"^2.0.1","file-loader":"^2.0.0","less":"^3.9.0","less-loader":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.2","vue-loader":"^15.4.2","vue-template-compiler":"^2.5.21","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.10"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"76795b5e47e1c5cf7f928f312bdc9ec2767e7f40","_id":"vue-puzzle-vcode@1.0.0","_npmVersion":"6.4.0","_nodeVersion":"10.8.0","_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"dist":{"integrity":"sha512-Vs3xETjCzyLy+ZQLQnkaX2kQfjoALcB/ebaxqG3c6d83PJoJX6soWJeHSEksxDMNqvZs/wao8wmKJleupVB9Zw==","shasum":"400081d94773b8d9a9cb92df920c22d0c38ea5f9","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.0.tgz","fileCount":18,"unpackedSize":555710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGzGKCRA9TVsSAnZWagAARzgP/icbr33/qNhPlMpYIUoi\nc3wPLxBzh9LqqEEmWumexbP7cyRiQVYjqXOBLLRR5o48pXJ3Lr+zbxkr73Lb\nOtTdoE2uwbbKpOszj7lv+XCssozs8n+jbFMh50Hp64Fa16PV6lA14n3y0e6Z\nNdhYC30ABjOhMXxPplIoHbYFj/BoOsIRKMKxmugo7Vwnnm8X2TqdWRcfOVCa\n6nzW67UrH1GcAHps5YHTwB1w0eBd7eX+nwkNX8mSFfhihdl8uf+dWCYJRp1/\nZsXcFu7i/afD/spbWnOGu6a9sdV2nta7M5PuE9KXW37saQ2MQWZq1jzvOdEi\nvEIOX9x5BKovwgTZOOtsRxezHFaTHJ7T+Pgsf8Dx7ezKKqCfTf6hvnyU5vhF\npYmXQx104tSi2N7PCTwgCmA3LlURFbjxa6dFt5cZNMyhb7ewesp/IJ78WEgw\nbWVzGgM0sSOlW5cFOuPbsbxulATHY6DM/d5yClibEtjNjKR0AYHGOdlx0hz3\n6D5OCWT1vUm6ZXBhlMYRRTYh89oUq2h8u3b63RLE2+EMvFD0b6K9WCTmWKOo\nKeqHsOErOLu0zEnQb5OH0VoUobDB7pFLzkm2EbENusGQ0sVXVFYVypJ49qm0\nx7hVJjx3kohA9Im5f1nGZX7t+NnPhpZ60Nv02lxiLiVPjsr0/Pxff+Hl85dK\nE62b\r\n=bYyd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmXj0m1KhlZ14obkE03xDasphn9ioO4r8WYzOk37GEjQIgdgG6+MlEq0fkHmodpq1Fln1mNgRFr1KIgfFP0KoH9I4="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.0_1545286026153_0.3638829803637178"},"_hasShrinkwrap":false},"1.0.1":{"name":"vue-puzzle-vcode","version":"1.0.1","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.5.21"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-proposal-object-rest-spread":"^7.2.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/polyfill":"^7.0.0","@babel/runtime":"^7.2.0","autoprefixer":"^9.4.3","babel-loader":"^8.0.4","babel-plugin-import":"^1.11.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^1.0.0","css-loader":"^2.0.1","file-loader":"^2.0.0","less":"^3.9.0","less-loader":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.2","vue-loader":"^15.4.2","vue-template-compiler":"^2.5.21","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.10"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"d47381dfe2b4ab012141ebcbb3e1960a3183810d","_id":"vue-puzzle-vcode@1.0.1","_npmVersion":"6.4.0","_nodeVersion":"10.8.0","_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"dist":{"integrity":"sha512-XTKOip8HWFdpXtGjBeYYjyHj5WguOoWjTqwJVl8vaeIgzRX5SXesjDYW1ftoiDqCBZc4T6F0BJFhM2uuTrwzoQ==","shasum":"d1de9e43376b87e408bf8ce386982cb9101f0719","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.1.tgz","fileCount":18,"unpackedSize":4544931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHGDwCRA9TVsSAnZWagAAAPIP/0T1BpV8+oIcMk/l0t/P\nN4DRDAZBa2usY6LX0GBJPdNGqMdmNn3vqcMk7koH6fVofDL9Eq/6Xm7A8Kuc\n6vQyGM+tqXmw8O+UOBbos4fxzrlVSWZkP1FQfszwrGKOAmQZFtVFh5+/hOzJ\nw4SZXmBQYobOuyXq4DafmeY/dxgyIxV+M9uSVya8yXBgUvXr6WP4eUc6kXqZ\ndShdHklsKOQrS9z3fNY8/2zWsijTaSH3m1oeQYXZDsuXvw8P2ytcmAsWNiBE\nU1yBbfDBEFcPfHjmShSwL9FOfkMJCt33p732WgU5qvgGO6A59J99d+yP9LXn\nd/rfX0nK4TZoS7v24HU9F579Yw2li/ABhzAdyRLbzaNF4KDwspuSI/qXfJTd\nQOsozXPJ01rzt74wXMlvwPK88tmvYK+lLQVlEjdyyEJl/kdkAULgZcA10+60\now+i/SIK8E/yhud9UJ9y7LHT+RgcWvgdPxWvm0TQv0vXtyvxHge+fpy9yxcy\n7vsJzEyU7i5QFPyJxOL3xv4fBHJUQQeZdkz4+Gfen3vvD8hwPtiVlhet5CEH\nq6ZH/ry7tR9UE2ridgvsiUDWwxPxnPPSorT2Eb+komZdEeeP7txQcxhlF/Bm\nsZgKiveNXWAqo9BjdaKkX22savehBGBLcowW531S3S67bvggf+I+hb6JWWy3\nOtQ4\r\n=RDP5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwoWfNt0FyjdvtCCiEK72bGG5EIsSpRQsU4MJinxoNQAiEAxZFaeBta39j5sbjrd8qz2ZmpOmiS36s3spMBBoIYMO4="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.1_1545363695412_0.4969047211242772"},"_hasShrinkwrap":false},"0.1.0":{"name":"vue-puzzle-vcode","version":"0.1.0","description":"react flip 动画实现","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/react-flip.git"},"keywords":["react","flip"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/react-flip/issues"},"homepage":"https://github.com/javaLuo/react-flip#readme","dependencies":{"react":"^16.8.1","react-dom":"^16.8.1"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-decorators":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/polyfill":"^7.2.5","@babel/preset-env":"^7.3.1","@babel/preset-react":"^7.0.0","@babel/runtime":"^7.3.1","autoprefixer":"^9.4.7","babel-loader":"^8.0.5","babel-plugin-import":"^1.11.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^1.0.1","css-loader":"^2.1.0","file-loader":"^3.0.1","less":"^3.9.0","less-loader":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","terser-webpack-plugin":"^1.2.2","url-loader":"^1.1.2","webpack":"^4.29.3","webpack-cli":"^3.2.3","webpack-dev-server":"^3.1.14"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"4a72b65f30fbab8c5dd7d33965caf7b29ca2f76e","_id":"vue-puzzle-vcode@0.1.0","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"dist":{"integrity":"sha512-cdlTJhwki4AeNLEXCSzNBzj1C6s88bcxCR1IshUPBizBOqmFXe6CoaC5Ndhvfz9eoWY9oozQCXdrvTmNbGWLdQ==","shasum":"41fd0125df7018cf051c5133a059e2e2b8a84f0b","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-0.1.0.tgz","fileCount":13,"unpackedSize":315187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZNO4CRA9TVsSAnZWagAA+xQP/iI2aFkPu8l43yZtsO8d\ni7Qr4R/taeOCb63IKACU3pHQ76hccSKgOeoSAztJy+dCj9sxCNQYpTnthpSm\nZBjUE71jcnz+ySgopXop6sFCItvvGyYL5cV0JQw5PB/7fK5/jgoCAac2i5co\nJTfkIGO8W6HvawMh7qbwZj7XR8UkCr0iwk8tt7DQlfur7nGe+Pn0e3NSFWpW\n9HS3fbsLYrVJFBIjRrm+9yVXVodzoDnwXPZL8QjbM/koH6Ag63rPs2KgA9w5\nUUQrWxF4BK9KeYeVVljHowg7WzZZCXygg1aRc6+CVxidRd0iHgcQUByzC1TA\n/UCZzQX15w6pqe/c+jYs1RhI3uAaOeeMnYOCxHnXQEachvoU1pLdFCDsum2O\nHlT1Eb7SND5PWt6wiVndq+w/ThF5smjvDO+IfMFLeIQZ2AQlam4XLwHWAUdo\nGuiGJx8GPRJCmyzdKu0c/uNwl98+lbigFOpRL2N8B6/rWV8mNTjucdZbTfvt\nXeMrIkKCdmX+/VU1C+ord5JxwMDFSXX7ipOWQWz/h+MdkWEK/Mz16GnVHYeD\n7OnVc/zPOPStQmZcc/FmmVqSXjBT/beGhH4Rns8PBKmtQFeRMa/e3NYF6/yC\nK/HLvZh03NlambgIy67cU8ipSrdKQUDcoQkW1L9y82dAPt/kd798JJSRZWrh\ntU8V\r\n=C14W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICoSKw+DC9HfqBsVugZe1zEm7uT2TXxOv40vFDNpJIhNAiEAyy4nKjrO0MAJepl8rKCcI5DybjP2B+ooLEh0/0SBVSI="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_0.1.0_1550111671826_0.314120457855241"},"_hasShrinkwrap":false},"1.0.2":{"name":"vue-puzzle-vcode","version":"1.0.2","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.5.21"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-proposal-object-rest-spread":"^7.2.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/polyfill":"^7.0.0","@babel/runtime":"^7.2.0","autoprefixer":"^9.4.3","babel-loader":"^8.0.4","babel-plugin-import":"^1.11.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^1.0.0","css-loader":"^2.0.1","file-loader":"^2.0.0","less":"^3.9.0","less-loader":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.2","vue-loader":"^15.4.2","vue-template-compiler":"^2.5.21","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.10"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"a3ffe198f58b56bf3a9b300c2b6d76443a6b1a59","_id":"vue-puzzle-vcode@1.0.2","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"dist":{"integrity":"sha512-kv4rgPoBKbrKxszBChL8TUdoKD700+ygFP8opgCPF+GNbanlSBJzIuKnknKYbobD45AAMk/YeB4RO08cstQDPw==","shasum":"f0b2f3f127e2b2d3c652970f3e988879bb8650f0","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.2.tgz","fileCount":18,"unpackedSize":684637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZNVNCRA9TVsSAnZWagAA6sEP/2ROMK/MAfg+C6YQri0P\ncraanTUm0SotJN9LzSZeqyPC6VmnqvFjcIJzG97FylakLrId2Td1UigVljve\n+J/f8JkwkIu81BeGR7L+Grlh/3tH/Z1skBUn1iWIsMjjTjh+TYhTb6k6TkpU\nOVUa1QTMUSX1RjbKvQhhlioVrj06JTtHGvWyPgL/yWfbkOGhZ5Pk4l1Cmxcm\nrEfnhUtt5Pvh+df9Fh9ic1qqWn6I+GwxrEm8B9OWdXzfhTBSenfqTPYYo39b\n4RfYu21UyphCVu+WChqzThZXl/0y2UHQJZZfLr163aynSX7jKnZp7a6BwFHA\njIp+MCf3ZP135P1iOU74bDzndXuAEnbqRdE9zaClObVoQkWd3EIT/gKm1SRo\nsG2qtx0mbY6+levnx8Dh0Myu94lzvZau/bV3IDCCeZwcRg1Lll5xrDmIIp2K\njrzWR1c58aptQQxxvPMVJtwEUrKkuPk72RsaUgzp/VjtBb1RJWFO9NNYr3kF\nIl6uqYE97mgyvnWdn1K6lzHZV/rPuIggwIB0ybIjB23DbflUer1jZqboMwol\npR41Ev+Y24pmPmrVJf0RIZNWbsXQW+3qqF2WDhVIlVInSkAdYjV53TlQ3w8F\nlg4x4OXnUQq5cBZ5Op/+tJ/+jC5W40v32jtkyj2l2bUD9oTKb86Mg4cCFEO4\ntKSn\r\n=rinA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAO2H3d7YEz/BpB9gvzSG+KpFRFueWDdKTa5/9jZICAuAiEA90wJON4oP4gQuKn51tZmCzKOul1WuOZJ+72+7KEnzds="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.2_1550112076606_0.8416821723879158"},"_hasShrinkwrap":false},"1.0.3":{"name":"vue-puzzle-vcode","version":"1.0.3","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.5.21"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-proposal-object-rest-spread":"^7.2.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/polyfill":"^7.0.0","@babel/runtime":"^7.2.0","autoprefixer":"^9.4.3","babel-loader":"^8.0.4","babel-plugin-import":"^1.11.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^1.0.0","css-loader":"^2.0.1","file-loader":"^2.0.0","less":"^3.9.0","less-loader":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.2","vue-loader":"^15.4.2","vue-template-compiler":"^2.5.21","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.10"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"444109476ba483970002b45344e94cee463ad4e3","_id":"vue-puzzle-vcode@1.0.3","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"dist":{"integrity":"sha512-Kui0+J3VSf59sYXQnEgPQtWClO8xJAnXU/Gp/IOu0JXHCyYrpSQWqthagds2YhJTSL3k8VxF5SzLG0QeJG9KHA==","shasum":"e1fb1046a3af3b5c8e5384a5b8998c6fa7776b05","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.3.tgz","fileCount":18,"unpackedSize":684638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZOwzCRA9TVsSAnZWagAAgUQP/j7fB9nY20U/9dTSpI8i\nQmxZ75XpKhSEnmR2DlTUSwiy/G/8cFBvFQuPrpUw5Q6s2T3NOPAzHuEANl08\n4rxZpo/1cRmgG+7uBEQz7PhyJ9PDCLbUWo+mv+iN3NXDx6pAKU/s7wU4WzvF\nGlRYOH1Zj3eJAE08zqKD/+TkXugZK2MnPvfJu6BHfCZhAYc31bEwmTkadBWk\n9MeuXkUKEEB7+FaZ2Gbi5haJyk9UNV94JeyPo9DMR32EiWrHxw1Haw/Zlt0g\nvXj6FdCodHSxfvQDP+VbwzgCb+WJG3c2H2FE1aPWPB8gSGt5ujwMTaOPSb+Q\njeTrkAGe0rf5JC2hNkGtEIzh5T1ddviLUWpT0bBJT1Y1LQybCyru9kNf26ia\nktErOFb2LXXP1RbX6XncK6QWxJZuQGojCHtaFb4DXrx7tveMNchBlAb/jdwK\nN0+ZybfnOfonNFPVAQYPqmz6j1ZUzcUku9UyJRdXme+Ot0sFiPraWd90TLzF\nzclU1lzgqFaYBWvdUq3s3nXljMXD8IcXwfYvnkfU+Eww3HHKDMvZfBpt/Ru6\ntDFsinGrJ2lr8qAaPW9/w7fzoGWGwe4Gx/WQCEGUbFXOIK8HlmF/hHXOxJ46\n9CyeLZZXVFrStArfcN7tdgyhG+NfVK74nHxbkYRwwso0xGi895idrcfU4bIN\nMc+0\r\n=8rFi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7OFnLZFqL5NIiTqKnJLxRE0ZCD1NxN+h0SOkmkJLgGAiALb7lDDx4FY2wO1CvHkXOdobJSrixhLISQri3dFOivfQ=="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.3_1550117938929_0.9467264931030903"},"_hasShrinkwrap":false},"1.0.4":{"name":"vue-puzzle-vcode","version":"1.0.4","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.5.21"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-proposal-object-rest-spread":"^7.2.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/polyfill":"^7.0.0","@babel/runtime":"^7.2.0","autoprefixer":"^9.4.3","babel-loader":"^8.0.4","babel-plugin-import":"^1.11.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^1.0.0","css-loader":"^2.0.1","file-loader":"^2.0.0","less":"^3.9.0","less-loader":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.2","vue-loader":"^15.4.2","vue-template-compiler":"^2.5.21","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.10"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"9c34897c61529ed8b28fe95c6a3e9a34f35d4ecc","_id":"vue-puzzle-vcode@1.0.4","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"dist":{"integrity":"sha512-T9dYxUT33SeEtRMg/ZbWW9TbeykEwIzK3fVZ2AUjM37K12GDZGxSjLl3fBlfDPlGBQeDKdKEM44MIgNM2gmXNQ==","shasum":"600aa3b590dc98b6b1075c9caa223843895a0bb2","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.4.tgz","fileCount":18,"unpackedSize":685582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJccBfJCRA9TVsSAnZWagAA/r8P/R7kfFd3k/vSs1f+ctxx\n2dyNb6aZDP15yl6aeDp2fc1SO54uO3y+oNpC+MRUxPJY9CcxGFyuqIyzADGb\nQd6VjSAoOynvPp4LssyoTRNc/B76QKiomTIAQnA7WWqsLggDR8EQApvkGy/y\n7M5nfx6tmuAXMNiYJ8olllekG62eBsqe1S6zff2ZxpddwgwQVAajYHiuTaHj\nJ3VtMQ1atzrYurXU11XbNOYFSPFUYaMDP/IUiA4IRb6A5wMgiqvVJtCX3Hn+\niFFsJtO/Ft3gJgzLmWYF1JxA5hfoxrrsbzlD3Kh32AnayAJep7oSlRBO31TR\nRhZoleD8CkI5ABkm7UjEe/uqfVkBOd4gYTsRhV0sa39gvo7bR7jq+A5gLvMm\n3idVEqqZqY39aMiBHCyjcYIKWYOcaE5+0SSePp8phV/ErN/3yFnSztBEZjd3\nwOfXjEqF8Fdpi03BqdQyYPQqddSGamOOrDUT299ZJ/p63E75RrQrPDC0+F/C\nvUCSa8RO95xK8USZVQkmQYdxYlGDOUqgrqBw2/7Obp8UENbfXUObRWOT6FjC\n8yd7Y711jEBtzGPLMNjvkk4OHaVmGAgr7LgyAXh5rF/I38vl11Sun2WRtui+\n21Yp/xBhreUssZMbIry0e374CdHfbpzjTWW71R8Q/yHAfsI1UMqW4Ubws/nt\npQbo\r\n=lJD6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD84gbVnljlcORMDqmYRPjPnwLzaZnHY80lLq159hocBwIgLWD4Pu7pJID8qRDKQ7AjJPTdRMHRtNT6GgivabCPZFU="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.4_1550849992570_0.754543352355517"},"_hasShrinkwrap":false},"1.0.5":{"name":"vue-puzzle-vcode","version":"1.0.5","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.5.21"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-proposal-object-rest-spread":"^7.2.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/polyfill":"^7.0.0","@babel/runtime":"^7.2.0","autoprefixer":"^9.4.3","babel-loader":"^8.0.4","babel-plugin-import":"^1.11.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^1.0.0","css-loader":"^2.0.1","file-loader":"^2.0.0","less":"^3.9.0","less-loader":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.2","vue-loader":"^15.4.2","vue-template-compiler":"^2.5.21","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.10"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"04a1e2b63d1e511b07af12efd2f8fe4244a13a90","_id":"vue-puzzle-vcode@1.0.5","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"dist":{"integrity":"sha512-x/2/a3KMeTdIl7RPq1DsCKomlYYJqVAWKQ1Uwq34NU4Rrb7HcQaH0EfyhIikxCTn1p5dBUeyBC3PiD2ykTZrmg==","shasum":"ca067c88feb79f93cfc17e17681e6c25f270957a","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.5.tgz","fileCount":18,"unpackedSize":685594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdK71CRA9TVsSAnZWagAAV6YP/1rT2VMxg0z7gEALCe/7\n4MYTL9PXWc7nZgul7HOwAdTgoLIk8cmcRU8x1GVbx30Mr6VUbWQ133gINnwv\ndtQcffSstVRDEI/SKFlqY4ti4hU7LMp/FL0dMoqUq0MRHQ4SA4347aGlyfIL\nI2+wfDb8iqvCID/+/+yXBHt7g4cAExhfZOg3DEUCd0T8rpzcweHGONQSsVrj\nCbBh88/bIm7PebydKgRteC08DiyJXqaYWy6EnwWxKTZAB7N186lBlLczAI13\nv/kbKbKaVTldAWULjZ2frScGmHF++z1rLxfsv1wtbaB43N2GT8+YVhD0P/vp\nzjHZfdwZGpxUneYVfM1y+hewL4U+g7VWCtlpiYCzBX8eNjObcwKBmQkzatwn\ntFIAVKZ+aN0ALzxxNUAnCEG4XXpGduztYVykBg9zLrp718k0igMn/ksvW3GW\nC+c0Nmt9gpfNDjGSzUsDWoQ7lrF8EUwKp4RSbeovcw6QNoImtCvMmpl55TTC\nr3qZHTkV4NUDwxsg/BktZE4C4k8Q60qbGTMJ4XSMd5Dx6HnFO6SEaPqrp7Gu\nqrdcVuGQ9CxeCk8OG6gJQ7lThRNiGnrfQAl56aP/EcEYw3yaJZHJPaU+R3yU\ntiMXJ+B8O5Km2xcm/20SKD3Wsl+zHLpx7RXo548Bu9uuNqftLU1F/F9XabRM\nTb6y\r\n=+fHq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDK2qqADPq4lfGBysrz8HSmzvh6opYAn1onFj8qENPi/QIgOJ7H4CfLjLnGgma+O0uk/PM8dexIqBqmfIQa4XcQ4xk="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.5_1551150837008_0.6216869003574317"},"_hasShrinkwrap":false},"1.0.6":{"name":"vue-puzzle-vcode","version":"1.0.6","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.5.21"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-proposal-object-rest-spread":"^7.2.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/polyfill":"^7.0.0","@babel/runtime":"^7.2.0","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0-beta.3","@vue/babel-preset-jsx":"^1.0.0-beta.3","autoprefixer":"^9.4.3","babel-loader":"^8.0.4","babel-plugin-import":"^1.11.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^1.0.0","css-loader":"^2.0.1","file-loader":"^2.0.0","less":"^3.9.0","less-loader":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.2","vue-loader":"^15.4.2","vue-template-compiler":"^2.5.21","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.10"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"730eab3b8058b1d836aa4581787a27719d18a2dd","_id":"vue-puzzle-vcode@1.0.6","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"dist":{"integrity":"sha512-KSV1lr3sz2JGKaRQuix+9nepbC79Ubq4DIedWbsm/kZz+Pdr3MZwEkmPEyLSiRZfLwZvXRzk5YzeSB0xcQ4Wqw==","shasum":"2d8141f7371962dd14b295fc618c57b5fe2b4299","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.6.tgz","fileCount":19,"unpackedSize":509215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpbBRCRA9TVsSAnZWagAAsmUP/2JxlwLJ8/uVoTpksJYH\nu20xnOiTOoP6QTjgTm7WPvVXobV1BH9+Qp2KlhFuH5rJWTg8+Rra9qC848oV\nCgHjTWUVKSc7a4GIIug9/uG2W9zE5KbAsOOMvw9gx7sdyiCGK1rFdgaZRarf\n29XAVTQ+CntFXuwPGxZWVA5vhX9NfU+Seds1/LUhbF1e+GE9aJMX9++LqvlY\nY/ZupAKfwk8Rxbxvm7iw/noPD4Ic65QJ8ejROy6HhOUn+q68/5NIhlLS8gW7\nDgF4CrBbbmxTMm/hlQZ1UPaesT4CsGeZwVr2z72efT1oaPYsR0JymFxHULUW\nEKnFHfehw/rZ+Uz16rGX/suJG8pCo99hJyD2lOfYuF7wXGUJiLAACqcJkuBq\ni9JV6qFoyKah97qiaw9mEmKyAHfExpkVK1qwPmdwqodBCGd5quYr/Qx96crQ\nNSVM9lF9O8Vu1cywWg44Cm7oPwmoXCs4j8lXFZukIa6X20mJx/Vsgb6OMmg+\n5oHdeAs2MHqRgtc1OtwgHHeEqmKxDeq2O5ccxHZaR4uO0D5h9oi2t5tglY3d\nRDOszg3xJ+yF3NLpWGN2WiOiLXfj+0QwDFD0u+wF09Z2/jhdMYkemWQcul+0\nX2RkJzuWJjdgmKmBn/DVCClunm0UBjarviCfNpg2Zhqc80F2zJC77uR+oLAJ\nOnFe\r\n=UDp2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBus6RBFUZiBePkUdKOvr1N9RNlnlpGRATkovmJDNE0CAiBjEaqnPhpg3zuHbVa+zoHBKaMNK6t3rrSkIvSw0AdP0w=="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.6_1554362448440_0.5899256219400821"},"_hasShrinkwrap":false},"1.0.7-beta":{"name":"vue-puzzle-vcode","version":"1.0.7-beta","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <Vcode\n    :show=\"isShow\"\n    @onSuccess=\"onSuccess\"\n    @onClose=\"onClose\"\n  />\n  <button @click=\"onSubmit\">登录</button>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"39e166d637ae3829975e77a67df5ec49c4f977d5","_id":"vue-puzzle-vcode@1.0.7-beta","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-iEEKT943SEAr7dD8nWfUnoL8faJV4f5pAEeJ9hOjt2KWRjwHPb1LcULhYctVhElTRckW5U/ZglXQwTlNMOiavg==","shasum":"8faf71fdb691e47c522da85c25d6b5face85e6a2","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.7-beta.tgz","fileCount":20,"unpackedSize":288287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiFmiCRA9TVsSAnZWagAAmFEP/0omRVimGhVXTvWag71W\nwGqChBcs0N0Uo3qo/d+dhQIZb2RNhVI/uUrR48mQpj9n5SjkEka9plZxnwfr\n59wGmyfWS7CEgScK0h6xaSxCahnFRXIbeMvigs73jZNjBFe+oGZkYVZXDOPr\nCCUL93mKCyPW/t2453SVdlKtE6zQzeojc9Rl4zwv4xf3MnthkcacATvwLHX1\n//HwPDAiOg5oS61nr0fqQ3xPcTKvLrKNECnaAjkgKuW2uJyr1NEQIkggbtUz\nXgT7M/rc17GLdUmuSf7J8t3cgQi+CUAo88PxOALPRIoyBbdFEsWkwqoxQmJ2\n0Njs+RTkFQZc8MMvH8bGpUkM5yjOZjvYDtzr0WPN3uyOQP5Zsyl1g2maOy4+\n88++XDr57nxsPHqpu93cPOrWHx/OYRMCIFsRHuNFXjdZpHHAAmyiQvC8GvlR\nZ0tffj5+BgL1ItEV7sp8MzFcWftF1WNrbZxdRdKFntVGhg1iH2LPEWhPfSzy\nZDOYs8NYQtqJRPyfelV3mxxXpFKOejRkfgmDNYfXJSkESdrkfVhRuy0OV7JT\nWO1pOtwXsSq28Mb/dRMxedJhsh+bh+4wnkp8bWtKIn2kb6CezRIgCGJjD8Tc\nT5+gMWPkpEQ+l4uqURKzyKIqaSehbGMU0lm4NowqTtB0wHvo5Y4zVVZ4p77r\nhj5c\r\n=53aI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWlvPp7QQFK4iSS+V6031ou1ePt3s2iB0WJuVoRdsEaAiEA4XvblM07H4hraYWN+GWuAQDgHI0P/qWUhJNAL2EjrbQ="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.7-beta_1569216929764_0.5300431069612603"},"_hasShrinkwrap":false},"1.0.7-beta1":{"name":"vue-puzzle-vcode","version":"1.0.7-beta1","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <Vcode\n    :show=\"isShow\"\n    @onSuccess=\"onSuccess\"\n    @onClose=\"onClose\"\n  />\n  <button @click=\"onSubmit\">登录</button>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"778c900e123ac8b9763513d9864541407117e0a1","_id":"vue-puzzle-vcode@1.0.7-beta1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-GVvUWpkjPnb4glkL1ScdKvY5+9l5XAGPMr097hBh0BEA/s37CrvACLLLkGC82r1o7J/DIqnuJ8okqkMfjrm3UA==","shasum":"92a15f5e9ac7d16dae185a3b54e4f9e974e0d51c","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.7-beta1.tgz","fileCount":20,"unpackedSize":288284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiG8mCRA9TVsSAnZWagAAK8AP/0Wu+w5soEJhPy9Jh6hf\n64youdMVSahTMhRIU9mKJrsUiDcVgJB4eTuriO6jc8hTgx/pG2GmEflcTxFc\nEEMX4dwXe4Y9a3OhxqJQIcG9Zta+yGHK3ucuQYTtFKjtCdaRKCQGfjYk1jED\nol/7AB591G+rzTcV44TZzhtWFo3ZsoJnJipQqDL+S2fKT9qh0ic0aqgF1WBx\n3Yp+Tm47mmzWovYGaj9LSNG2MyDaIeBkx1VrpWanSL0xk3FKNfP345+2+xul\n8RR8/eBclgd+j02r84aNZ9j3G5qPJ0capT5I5rWINUIgZmRd/rJeckOFaARK\nC79hui1vI4jmxi9HZLu4Oe6/OwHQoJc/iN0JS+UKbpRPbkEAv66VwUguTfO6\ngWWtKIDzgMJ83cL5rzdcWdWKIckyHrM5st/h0WIue1TeCNAr0bRHDFpYc9MA\ntwziXflhu2HLWwXWIhX79n9DpzER3kF+odwPO4Wft0ih53c5pjsX08OESIKu\n6UYFTE6WwClH0LFWLWmXJ6AvCxLJ2JFUHd4c6gtkNZNdhulOhyuLJnrhIVcK\n2mTCRPgN9BSWgeLrgPw8/mY5luhms1nJBP5ezuu8AyEEmugLMPb8USZDLcSw\nsFn9T4buTMTybxDtx4rJYOztKkaTj9VJw0e/GpM1BlSWCu4JSjkfcXLyJGnv\nF46x\r\n=rkdk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGCMPUYStkck62keIMqDmSHz6O2c1DhuwNi54koXU1nQIgOuBMQ2xW24lhemnZBT0G7rGlksYzTcAdmHFYXFfm5YY="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.7-beta1_1569222437977_0.7826880172739716"},"_hasShrinkwrap":false},"1.0.7-beta2":{"name":"vue-puzzle-vcode","version":"1.0.7-beta2","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <Vcode\n    :show=\"isShow\"\n    @onSuccess=\"onSuccess\"\n    @onClose=\"onClose\"\n  />\n  <button @click=\"onSubmit\">登录</button>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"778c900e123ac8b9763513d9864541407117e0a1","_id":"vue-puzzle-vcode@1.0.7-beta2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-6Ct6i1O3JQcLN953ItrM0WnyfP5RjSeAAbB9icdujVFnIpJV63psNi0lTQ3ijGxjOBD3i+dFSHzLp/v8KmJ9/Q==","shasum":"8efb2cd01899b9ef86a312b3a890fd5eaaa1b0ac","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.7-beta2.tgz","fileCount":20,"unpackedSize":288183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiHJxCRA9TVsSAnZWagAAenQQAJPkfYcU6592Coh110wb\nwVMoOnin7Q8PTbgUxueUV5C1hbGztZ8OJBCnINUhgI/bYXGNSehxz1RhU6Ba\nkWg0ECrmJssNSDnjsfTMt7yuJ6f5UeNZKDXo6tmMLsUU1Yynl3QXD1QsXieY\nYqX0V8BUmofhJYvKFGAVabRL22yNwJWE3qyB5c+kYbGfSJxoUdyDZ3aUL85U\nWl6EiPJh6bYt1moI9ADr0oq9NZDWm01slbz13gpuIXAWbJo72poBoDcfpGdj\nOuQiHka185VScxh0dTHLrLH0S6pfMNl5KfYp+PI22S0/gBNcRX79l1q1eG6N\nfPoiv0D3RAyxW/dILmUjmV61FKaEjzwHlXAT4YCsCP4X54pzSJd1KtK6ss25\n5M8mVn6c/5QbHwNW6q0DIxZRa4c6bC/roEd3m3w6XpUpdpe4mq+1gBDawRib\nh5z5LwW6Qgw0DVc0rjU8xvBX6S93mC+StE8GIZVCxuSYR3BZ+NJXYqPk5dkH\nbRdgu9Ve3dXdJ9lFAUVbNtc9NsDUI3Tm9JZX15yoa3C5bD5OmWI5sDZufWpQ\n5jHolM898McgXkQTyKoIGAKvzC1OBjJ59dvzszWQHoOC4YIIgJjeAFGFVqhE\n77yL6M88+HV8Wt/0d6KFWHodRYf6RlPWnVltHO8yHJNQmmt+j1QifSRJHgjp\nRSQq\r\n=OJj7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzoQL9dEPqvkP1g1oVEnZ7RykhC6KltBclrq8vI81dnQIgUN+YyWY4Ld5ZhJA26c4yfel5jQomuWWT4qzJ40S1u1I="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.7-beta2_1569223280524_0.7235335585045137"},"_hasShrinkwrap":false},"1.0.7-beta3":{"name":"vue-puzzle-vcode","version":"1.0.7-beta3","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <Vcode\n    :show=\"isShow\"\n    @onSuccess=\"onSuccess\"\n    @onClose=\"onClose\"\n  />\n  <button @click=\"onSubmit\">登录</button>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"778c900e123ac8b9763513d9864541407117e0a1","_id":"vue-puzzle-vcode@1.0.7-beta3","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-G7kafI1UNNP9Ytm97MUl1N8ZJbvuSut72f9qt/CgVzb3zDt04+yJakTLmczcAT/SveL4RVOULEXC0bQGqwcQiQ==","shasum":"173b58c19f0887e917b4d943c29a387d0b836b91","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.7-beta3.tgz","fileCount":20,"unpackedSize":288183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiHUSCRA9TVsSAnZWagAAdQUP/3Cwc5b12qrgnvzMIKGF\nP/2OXONuRzWQ1qYSKvBl7dpO+nED9YBUzARZkAzzV3ew8zZY0KdDM9r3vsKV\nITDxekbfdWyoh8/pKREevTlsG/5/vWnXywavx7djNhljSNzM38l+Lwu20Aps\nDwYU1RXhkBYeHRdaI5Z/y/s9wv+VQD56oytX5CsKxP7QHTLQ+Kn9149LA7EH\nJYgQa/nqVJCPxnVFI0ihFcyeNHx1DVQMAmNkRM6SftI1pvIY/MUW5eGw0u3c\ntp+THsyPOwMA8eWeaDYZsAGemmeirxkpmNfFzHzeFshQlBsNfPQOhjMH10mC\nC+ZOVezAquF4xAdgFzKqsDPx11YkgbLhkjLnWrDIAoxMLrepMboC7I51CgDY\nm5mfFP0wpAj9AHhawJ219jY8QW8mksTGQw21YToRXv1DZe96m/jFz5mVlMdB\nn9gEGhIsBiGhWvzgd3peKbZ2APq1K8GkkY7cCWFkceTUfgemWOIC/Y3oKiTW\nEJRPbRR7blwRkQra2JrUemkt7ZkXu2vu4qchjxf/okoGmdHT/EFYo8qBxfEu\nm6xBUuZNEKe270QGISS7Z6y/2O4NYZDAVa2DeAAFjfTml7h+QwWtWUkKath1\nNyh+43q9oQKIJfaku+FDG5/5O+KznAg0SfKAKLDAMNuEIYc/1/ND+HKP6WCS\nLAeD\r\n=7udt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEQ1NamYCGT0qpkrqRARkETybknkxUreK9UkYaSCGcsRAiEAhTrbUfCaT1XEpQ6akJ0MJYa87GyctOtgCBr81bhc17o="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.7-beta3_1569223953314_0.6978134765352779"},"_hasShrinkwrap":false},"1.0.7":{"name":"vue-puzzle-vcode","version":"1.0.7","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"778c900e123ac8b9763513d9864541407117e0a1","_id":"vue-puzzle-vcode@1.0.7","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-BbDS+eT8XNXmIrxDvxoPqudE+XTScypF1hQ8SXL2qZI7a192mkZ5XbzZrKK4AL/PcfvHXH2oVhS1vYnAh+iI4A==","shasum":"3f7f561fc6c8fb1d81f5bbddbee9f4f8e73ab03a","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.7.tgz","fileCount":20,"unpackedSize":288179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiHcUCRA9TVsSAnZWagAAAH0QAIjIKgOOo38P8ZQFRxqT\n/ZT7i7PIafS3YxnH1NOJ4nKjuI1jVEbG5W23KA+vghAcOU8f70vvTS8Dnq5y\nJbxJCj+3+8CeiM5xoMs8zSjvU/UkPCFLZYTywFLsVtnoiCk5MVYZZAN/YJiE\nO4iph5pTLyK1lisRdD0b47g/pFb2TAaUuG9QnEr6Qq1G7I9VxANsuDiV4OkL\nmhNoziR0et+glDfWb8lNn5Isf6NRQAlkxWWrn4LcJGAufq2rDNj21WTYxbrw\nc+oF3j3paT8wH6yzXIww7As9cAqRKBUZ4gvkQ6zyGpE4Bh2wDOcIEykYzZ78\ns/bEUfBrFrzUAfLniSILUh0rYuLPocjo9ekj3nBTmVpGJNoV5chCyGudT6bh\n7T7LpPzkM3bm4rsHZmq/ehsMoz7DLkEtr5WZsHcev37ry3CWv2yFe4raQiID\nQSBCVDTtoRO2vM0foxIpGA7ETAeRJD2Lp/mMfSzJ8StKTivFdGEyITeVMbKs\n3o3nLZXNVfAKgxdev5ZhH2mqjBKHVpbIq/ecI9/2Wpyi6ihU9tf20f6dx3rh\nkDQv1JPIVlnZoACYlP3Sv/3iNRMOa/Z+3fGSoM3zgRZqAFSimgKcS97A3BVr\nc/xMZx0pwixjx8z8fkUbyxo2eoPvldZk8JVHJ4bRoi9At3xJtmTn5hDseIgE\nWnAT\r\n=sXUN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtbaqc6O/l5cVdjN086U/rRa5Xg2M7ILq4YxL4WbQltAIgMLhIVF+Y2HHHpvaWqZuSWrmpU/aJqIP6sA8xwYQPoHU="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.7_1569224467319_0.9241035915733127"},"_hasShrinkwrap":false},"1.0.8-beta":{"name":"vue-puzzle-vcode","version":"1.0.8-beta","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @onSuccess=\"onSuccess\"\n      @onClose=\"onClose\"\n    />\n    <button @click=\"onSubmit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.8-beta","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-tOUT+xfXsBtVsb9P3TaECVnddxowBd/Xjmq9qSxuyvu31P7z8mB4RNBY0Y/Ru04yb+/K+xeHkEuSvYYlgaByaQ==","shasum":"7cdbc187d0c348a8ad00236378b8fa5c992d2284","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.8-beta.tgz","fileCount":18,"unpackedSize":275923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb2nSCRA9TVsSAnZWagAA+5AP+gN5A8ZObaRVPn/PLqMs\nanm4OXmibVE+PvIlQGZRgbZmwPkRYmDYK8zmYmdNriiBnGlX/dctO4u52x/C\nYy5UVvglizhpRP1MuipgW6eo5W4Pi78xUhmO6Oce/+bZPWSszelmmcXemNTx\nmNs3kBE1JSPKWHjTp9AzpJBpUBw76zVxTdcj/0wWNvJ6nWejVu58A9RfIN4D\nUIg20KfgnHSNwhQ9UhW99hYtstmNPhW2Kaun57mBr3WSfaijaDmQworxQdWf\nETlzf9o2oPz8iUvKnFvwlut69TeAOBAnxLo/OTCJgwvU9JWbxy2PUQGagByB\nc+zKLwkZvBiY6mdwEr+w7ma9lwCpDU94VNg9NLqsnr1B8OX82EKdrNaBf8dz\nBU2U/8pYFzU1ANckKyPFLDcmWDFvombhkVWzToEe/Y7tEqXs0piviCqZFnwU\n77LjZUEgcGPge/gzSDkQJ/sv4L31clG11+ForkPjQeYkmuYZJw6sVZShwfXm\nQMdY79OkGWW/DSsNpiPElkliQPaFZrZchwj8qP7FDakBeBT6KLOMWIpfKMPk\n5ee7D7KwofT5Zz8PPguQ0C3PvNgUWk4tGd3azUqPsHWp8eufri2ovHe703xE\nfFZ3wAAauyxYfwMneILJnwD2dkdeCYtP4n5AutFbJ4TQ8ts5lxANAN7AfmKR\ndN1/\r\n=LUs+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGH0rkdS5KMrqvW/jFnDxmAhtzWDAEDHDuRfLuVaAQeTAiBuBl8YCic5CcHgy9bqMTPj3PLzQEMK/DjYGzD7w/o2bg=="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.8-beta_1584359889805_0.4493814154323481"},"_hasShrinkwrap":false},"1.0.8-beta2":{"name":"vue-puzzle-vcode","version":"1.0.8-beta2","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @onSuccess=\"onSuccess\"\n      @onClose=\"onClose\"\n    />\n    <button @click=\"onSubmit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.8-beta2","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-XRs2VjkvM/v+cCH/d1wFEvXhUbZv/oahgW3JOTncs2ora1iT3PBedHLYw8ZOg2sR0uj/iktzECKd5zUtDACmzg==","shasum":"2f33c851adda0428d4244996f73718dbee7a3ece","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.8-beta2.tgz","fileCount":18,"unpackedSize":275486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb2uYCRA9TVsSAnZWagAAGcIP/3J01QYT8II+yctzbwcX\nAmDaDo2szhhoJ4SCNWz4yYv54X075D5atUm9u8+rLkTPztLp8GnAaXJd7aHZ\n2IS/UWtwrl+ye6KzLd9Ba9WP03/XfgTVwQzuc/gj6tWIZqSIl1niCLCoiv4D\ns7I6gzYOHq+L1zePfbbgo3jvygv7Eu5x3NsRidrVjVmIJNIpPUkzU1dVbcGw\nbBfJTSgvbyniJipxxpHBC4g2CTMIR5SxBu2kV5XTn9bjo61fGlkswZ/wiQSW\nhu0/arKR+4+ZsG1SqBCXOVQyDSaFxsxmlQxREZOWp+xjohRmPwcrCL8rn3CS\nAjUGDsXxh24PZR7CAtn1P99GKC+ntyk+avqQwwQUQFIvbdYPAC4wvIN+fhv2\nN1WvFUU3G3BPsOxzuuY5DmVNjNQ7YiaTY8mNRbg0/g/6J6qn9hDo1Frfl79m\nSnSnm5MVPTPh3ggcdjktxfjN/Mw94pOLEIx3WEU4wifDZhrTopMCVXEyb72m\nNA7kfs5nRxedlO9Orl6sglGoWwuJBrtTbuS5vKfRTKnsMw93fsQ0uVcdye89\nBDY+rTn98AZwfGixPyMM83TTw7PYX38xt981a6o5VnDBo1Jof70h48bzfLZn\nlxGGkOE/d9Da6S5vr+hgsS1u2fQgAmQtz9IiJ1zxD9J5XnE7POAHI+IaZ44I\nFs4f\r\n=L7sA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0EC16UrjxKqxioRkIXLXtcPMQHoFmTtLU9NGbDsBVkQIhAMaeeZhUeuDkeXpTVnfwnucpYVJe9i0pMYR2Y5pD70xc"}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.8-beta2_1584360343530_0.021392030264206996"},"_hasShrinkwrap":false},"1.0.9":{"name":"vue-puzzle-vcode","version":"1.0.9","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.9","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-sZZdx6a5E7B5EPUlCHPcsMsqoqlUQysxCO+xL6Cgt3MRyVGA7JrYqw7gvlikUQkRKh1lGp8Acd8O9//XfUUstQ==","shasum":"6912e3960d91a4411789f82f69d33133e60e2040","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.9.tgz","fileCount":18,"unpackedSize":275480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb2w0CRA9TVsSAnZWagAAjc4QAJbeU2wnGE/dtXbBNqTM\n9EclO1dSy7b4N71H+/gGNjaf3RCEuLqatONB/OifQnTyDjysBfJYhUhLyKY8\njyYhI+HX+YJfmD17ynmEelsjLzUkoneD3ebo6s77FKiZMEYesnZd4wPXnPCj\nVtbfgyP3fQES7n0fTXTtKWtQL86JWBv79UshDvXmPtGaiNsvOiiQZwIlyfrm\nHN5V6MurwdqAH7zWuijklR8aj05/Mf9HfBLtPpL4cD3RnMMgEdRunhCt7rNZ\nGkowvRIwJMfbPYscFSIKIye/IJgUiDSuTtdTA6R68n5IJ9PORTwCg9KJUMUk\niY/2+gRb8q63qfQVuO0mojaHsYiIpxB3opYZhbsTwP0IeUvoRHaDl3YTEMWD\nEm8C0ZjAOwnGQDjyTqb08AqlJ9Q11mD0u+DoSv4g0ATyv0s3KSP/HQkgrTGT\nUNKbWTWMb2NbP0YBrdI9m4lS4huZVP5QrzYFHspjY2V5M8z/KsN09349Sdc5\nSl/Mq+bzZq15Jt4sINis7Vvb8RqRhfPsNOSVoIQGs/ezM8oWMhs1PESDbxEp\ntYUxEx1yP5qo90nE4B02o3B/wgNzvsCTDcAKKtosj9EKnqYYKkAfejTaTSyK\nkECyg5bGsa89MFhtX0wETDG4aGyDcWxa4TskDpWiNqY8/Nj6N997S55DMa4P\njAxz\r\n=PlOG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1SOdH9/mW93/wZDMAT2CLV8gjm2lcfseKivx5epAHVgIgMNvilqB7mYX4CloyCd89ilXoUV3FxnT0J7Vys1AeYFk="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.9_1584360499995_0.8812792548387387"},"_hasShrinkwrap":false},"1.0.9-beta":{"name":"vue-puzzle-vcode","version":"1.0.9-beta","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @onSuccess=\"onSuccess\"\n      @onClose=\"onClose\"\n    />\n    <button @click=\"onSubmit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.9-beta","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-y3RqUD8RGpQNez2fDQnlsHbC4TKVpujG9OkKViazPQkUGZHIjh8yPVckSLePgX0loUXg/VF9a8AKJFi/37/Kag==","shasum":"ff79d4012234c52e2c43aadbb6a324adfda36439","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.9-beta.tgz","fileCount":18,"unpackedSize":275488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb224CRA9TVsSAnZWagAAvEYQAJMFT6yOP/sFNfXqwsun\niqcio0dJhxxo5tLYywXkoB/1PBOn+vrOfI9wWPAsrNzajSb2Dyy3MQ/lc80I\nxWvqeb2hOsu3iU9gtE8OqODqip8gy9lYMvXGgAh8EALzeOZC8hpYhKKVk+Z3\nqsR9TguIcyogAn08uXGmko/bN/ucSUFDbFIGO2Z6xTzCVP/nEcBn+geunq9g\n1s9An79DIzTWFpK602reN2VKJSlemkq4UP5+fRD5a690qmSqAcQCZ2YnEkVF\n9Kq9MtHRqnNjUtWAGhZvFlE0qUXZnXzz7ZkU/GyH+sV3cQyca6s6/Ak6mAMJ\nk9KiF3SCFHeXEC7zR7DG+rQOu5cgcUjLttJRymydRacpCQomevvpxmTLpUZH\nNFjRxQ8ANs5ULl8Xb3gexp1bFXkKqRz5LFO1SGsVeblmGvsQE8MtRG7ZPRqL\n1r01fZlPGKZvljbcYlPrJKy48HyjX6Z2quTq2VoT2dTX59fE6lZhRPj5akU7\nEF1UJGADtsVNK1JY9A8vxTdqOf7ac+sXbO9PAAj81kDvSAxVducD9iDiEMu2\n+zKtBgajbNzx8HX9yqMaOXqJ//x+PaTSMgx6UjI2PG05CcXjkh1bXZRH4q8l\nVefIQPlDeXDwhdu+tOXkWSEPXGJpk/BRm9aOg382DNOYcdfENYf5vxP9qYTH\ndVFv\r\n=tvPh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/n7gbLVaXPpJXCpcZiGCoqsY64c+lNvoHnkIlfWY4PAiEAp1tpgO7sjhkbzmVE/WFfJuIwTrlKns7WdPH0OqN9OF4="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.9-beta_1584360887864_0.22072451711403152"},"_hasShrinkwrap":false},"1.0.9-beta2":{"name":"vue-puzzle-vcode","version":"1.0.9-beta2","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @onSuccess=\"onSuccess\"\n      @onClose=\"onClose\"\n    />\n    <button @click=\"onSubmit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.9-beta2","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-2zZDX15q6qJ2R3ftSlx7bwb+JtcxBepysfHsREreDYHivIUOWIqBJUa6gvt9rJjdwbpwuNlthjXMF6Q8FQu/Ew==","shasum":"bf1a2607bcb2aefd5dda9df4f9db21c0032bb6c5","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.9-beta2.tgz","fileCount":18,"unpackedSize":275647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb29tCRA9TVsSAnZWagAAHakP/i6IgyyFRmI23gKajPSU\nr+e8PzsGMx27F4Bbl1ylrabIBzgKlPYxNNu9c9fuVTiRtXb7P+C/IBGTSitU\n/jfsyCJXKNN6GRDAO+KeDl39mkWt8JImBiOEpJ7UzmZhCkZONpMyHJhTkH6K\nmp3oxocl7GxrwNehiV7H6vm75CsMLwXgA2zwbMJ2iIjClPC+ncYr3oHGxLGS\no5NpyeDso6f1uqtiB0GdBYOyVrArNzqBQeNUxh08Ac+IROwURjOelKQzm+t1\nFnMi6/N+uUhwMmMOm1pkemWw7jd5QSAAXf+o64y7XmxoWjPIz68QtO+324/n\n7SAOlbGcOK0mp56nCm3LzN0NzO6n2NyLW7tBW7p9wcasJ3ZBwATenSwMwGQY\nFIHCROPDyKuZU2TuVaZKJK2fM07U/CgWEK7EYyMhN8oWAjmcciAyoaIJzvp1\nsVmtQrM9Zxli0U8PsUmK7wTj+mYvwuGlOpiMfpsvb+aZSi4wu7a2a/JoPjyL\nla0mHSB54iyVI3oazCj2ZYT5KbwZtYy50aNdfBnFn6X3VsRLlIbrZpq/wPg3\nR8wY7W+wR6ODCVbCshrw6j4tiVJGXnb4q9kLye/h2WOyhi10NKV5RxYmV6n0\nbtO9L9xy8AplRKZkoTfkQ6i1E+2OXZFjijGfQ4c5ZG6e2b3i1CbmE3Iwoa76\ngvAE\r\n=qhnf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLQT7F5OqFdCJ4Tzq9/s0/pPxgA7/Do7hDtkyKHISOuAiEA1H3NmE44+oRKmouzTGV8j/NYIU7FCE58DFGsKG95WPE="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.9-beta2_1584361325297_0.28955546264565357"},"_hasShrinkwrap":false},"1.0.9-beta3":{"name":"vue-puzzle-vcode","version":"1.0.9-beta3","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @onSuccess=\"onSuccess\"\n      @onClose=\"onClose\"\n    />\n    <button @click=\"onSubmit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.9-beta3","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-EwiH16CTuST20PAZWzBfOzSxDE9FpyL84wwP97+vpukwHYy8vZyfHTW8BEfkHcan39l67uIwboyDchR3yMLxMw==","shasum":"9e10b37f02dc5f83dc40e958a04248bd4bdade0a","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.9-beta3.tgz","fileCount":18,"unpackedSize":275474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb2/0CRA9TVsSAnZWagAA/SsP/0BsNoD9cmeODiU/g/em\nXCz6my/N7BOWnuk58SrUxWSKs/BS1DkWotEdrWcPP6oMl3TfI07KjFfNEcIZ\n3i+kVyKyTVqbwIH8rpyzql3EmDdDGeQqQfXl1wx7+cQxS4eEc9TwZNPmeR9h\nEr5fDMNxJNzSWdWsEGtzllg3eaHqIlWx700XHk8vE9xzd6uQTQhAqB3+Lo5v\nC5r6/jEjIfoE7tSbHZug50fbZTKQGmGQnZl3EsmpI8ER8wRv13tU4f8IgoSv\nImhpLQCh0qcfbj8vMcHzLLKLPS+Aqdg3xAgs43FNu5BC6tx6ISK7dXAm8qNN\nsTlOUhOym5v4NIZGe5AEkCBSX99i/ns9x9WEF8wSM437kHtJXg06w5G7VKXr\nsJc0t+zSmAn7gnWiSdelM2RAf7UqPgv9r3OrvBZ5cOOMKVWmCHagXcO4MarA\n33OY9NDeqtcy9E+BX5zL3Hd3qWlZmvuv3lXG/fyrQ8dDQDgDDD0vVJtjJddr\nhBJ3rHGq6uSJjvwbtOo58TU+DMkazrVaERWiWkvOWM7quopEUpITCN0Q+69J\nJ7eTJiodSKnkiNbg9HYzKmIo5xTLAruLMVmWq+rAA1Soke+jm/0CfanO4+98\nkprcq83hbMbwWVCn4mHxFteRm6oqvZO6wGrSwrhUqG8u/CRH7YCZwsEm+C9+\nXHKb\r\n=cm2X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUfLt6h8+hmiTQ3Yds9sdVKwnks/bdKHjEjNyBdxoojQIgf1Zv34z74yxOmRQLjHm4jGu+or1EkkQt2H5Qkvn1BJs="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.9-beta3_1584361459737_0.25562836562524915"},"_hasShrinkwrap":false},"1.0.9-beta4":{"name":"vue-puzzle-vcode","version":"1.0.9-beta4","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @onSuccess=\"onSuccess\"\n      @onClose=\"onClose\"\n    />\n    <button @click=\"onSubmit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.9-beta4","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-dJpUNPDAXQn1hk+iDxF7ct0pEDxGZ5n/EpKoF6wIc4/MwhBKWMhSdLnAW7UD/5UsgHUB7UHZNfuAomsQn/NQBQ==","shasum":"442d249855213aaf0643df7e284f672077553a6c","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.9-beta4.tgz","fileCount":18,"unpackedSize":275476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb3JCCRA9TVsSAnZWagAA/nsQAIxxmPxMvUeG09wmwgGi\n8NYcUDb1O3uvsR/x4wteF6mtbd6QPby6FAsAv6KjwznNLec/VzobW4BLr4IN\n7FNtUEDU3f0rMm/bw3AfbZy4ggkTqK1LpAZgulTG8xQCo3x5l396dUkBC8HA\nqpYtpd45u9kpWPrPQJ6kxYdfX9QJIDq1iOq20sw+21A88/PDaSXi1cuvEGN0\nAa5K1rzW5OsVT8lTfsem8qaTTL+adXW28dIvtydSipkbjhd97rB0+e4bYffF\n+FxdSwTd1O8VZy4YF5tDlPakS1hkgKFPgez0xMivz8OoWbpA1oRbAfUb0LcX\nud1BE0kZfiQrBcyIQ54GRJ/8IdvXLpypgkMzbkm5L71pjrWmROIWl6l7CGoq\nm/VZkA1CV8H+mJc6BwHL4y5qFHMLl/gm45TSklPyd7DkCeT7rwXbZPkTAIqK\nrWStxoYBNZc5pm0GXdsH8fMKR34Lw3gQ2swVJsclg/bmaeYbY8ADxUhxwpiU\n7uKT/0qh6S/Pkoybap3Bc51oEaSlMeNMuIlqJUNqtLsxfuRVRaQ58t6LeSxc\njIwspprt1V1j6PGqZnDrEDl5TjpXfdL6uIWZckmPOM2uI4DY2emn71y+fvfX\nvNSmkRu3Bk/fIt9BFfXiyWV5LlqySdI9GfYh/BCDBohTmj2ezQ60vHG4rYnI\nnuwV\r\n=FhDp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUVjI59cZeN0NpQrM1NoX42uvOqfaAyvRhF2vbBP8eGAIgOdDNrkIqVfj4PBerhSAy6VSVJsva3uke1K0WnsUanKE="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.9-beta4_1584362049513_0.0017622530267888958"},"_hasShrinkwrap":false},"1.0.9-beta5":{"name":"vue-puzzle-vcode","version":"1.0.9-beta5","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @onSuccess=\"onSuccess\"\n      @onClose=\"onClose\"\n    />\n    <button @click=\"onSubmit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.9-beta5","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-3PR/tSnEj/ws189FdpZoVf64zjOzNXa0MIKIZTocPhBwsh4iHaPsMjSTlljA9ahnR18wAMquztrJ/5S3AP0vaw==","shasum":"dd3d80cbe342fbc4f7198d0ad8e8dd25fc4ba371","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.9-beta5.tgz","fileCount":18,"unpackedSize":275936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb3ujCRA9TVsSAnZWagAAjRAQAItJyKq4WeXkyi2w8k+Z\nVIa9JTHFxEhA+UuL3T9G1K2ehzCkq4rhNjNPppNAQRyXunohZtnu1gfZPyTh\ns8t4mPpdBk6Qz9FL5EwN4oOdmfzISQuxMmjXBbiSXC9l0w8uegNjXJhA3/ml\nueLp7eYNpSm6OdtcVDh5UUO54SZxaSVIFafLoWLsC21v4LpoqXFPUTIJa24Q\nKL5B04RjXyHrphC1cIQiRgKJjkZlzVVRqLtc39SV0o7SiIPSTkhhZV8o3ln8\nT9Q7w3kPOSLXrliGTRIYsli/WZXLLy212Dj7wcecS3lnHu/wjuj3bIIbHQEq\nWfBpIm9ifX5qGjUpirDFRJzuo6/d/nRdGogdFsFnwPk1oGG6SZns3+BCy/kc\nqPz/OdWG65E9+5nFhhucKN0xgDswNS7ZuKWs4Mr/bUn5YTA8gLz6iwg8CBvu\nL0TwP2DG/oVw2ea3dMd4j/hztidixk42zTj/tIvMj6mJbz6YLj8cDhoyGBcs\n7bFQnAmFX8cK78iks4icDVIKTWfPyxjxJH8pUblzbYSboLYF8BbwiMUxY3VT\neiN6ZI5vx2j0G7N2Y8qnC5gEgvdTScdnCRFVS0nN3bVX/aKcmdr7Tk7gdfRG\nLEybgyhHk5LKe13uBVZPxra3jACikvG4gDGP+vy0TE6woUAaWXHD6lebkojK\nh4DI\r\n=hlTD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEVpna11o/FcryzdzgrdqiP6VPPDAsAEdu0aYrM7m42gIhAJN+3CHkG/bcRmW4bNotVTn9t/vWeW4ram1DQIIHamYq"}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.9-beta5_1584364450954_0.4453823072355223"},"_hasShrinkwrap":false},"1.0.9-beta6":{"name":"vue-puzzle-vcode","version":"1.0.9-beta6","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @onSuccess=\"onSuccess\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE里会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @onSuccess=\"onSuccess\"\n      @onClose=\"onClose\"\n    />\n    <button @click=\"onSubmit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      onSubmit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      onSuccess(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      onClose(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| onSuccess | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| onFail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| onClose   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.0.9-beta6","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-9QWmEWlBQqlGec/jbYiILXUukBne2m4ZCCEvJuoq7arUckpdz9ek52d/nfefhicl2VpJ5dpzrv76mzEvD4pGcA==","shasum":"1a183106c0e4c0006ae0b680186342e314fa8d1f","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.0.9-beta6.tgz","fileCount":18,"unpackedSize":275472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb3y/CRA9TVsSAnZWagAAA0UP/jbqhApjRqdX6BhKsi3w\nbyJFSkPzweakvCXZp17MIUDds4FHDr8x2lfVqSWB1w1uNlJ1JJjd7PWC+JaX\nA6rFPkDJauvp5rDxnDOUwTb25MeiioLNiPSyALDRl3LOKGeMUv/35yN8RYE/\nONz1R6B/rlIQIcp8AuA0kZB34GUiAaQwNvRe8U0GVnVaVH3W70ilA6Co1y/E\n7HSRDGpeR4AEnMoKHwdCVLuvX9BB+/mGS4a7s1g9vqEtAvZEbxVHUSnNi9Vj\njBwknec8HzD4gLPwS76NrV/D7DRixlAB6ItGov0IgMwCmb1qw9QNBGDtC1W+\nahvfGUUWOsgZRV6mENt8YtIBJZkews17eHueuv8q+0uOH1wsQlVVwEk8I1MH\nISTHsulrCg5CoBFmY8BSCBK7XD9N4SrEANG+hu595comoqHqKnCSBFPfkScW\n5gkLYUKfiQn6iT9Z6FtGl5WhP/xj60oZPz66Z6gSKkFvEFk+KEQaJqEW06Sk\nooNmDVYPB4FowYNE3+DEMhpHM1YKwNcN/veoMsA47NdkDDdrvH8J4hMzJBLk\na25X3OcM857Xp4NEMjcGB3pKo2J7FSZ/LBL083B3r6PMphA7cZIXVPtUiTT0\nHp9c7an5FCHYVwiMZrf31NsVEch40+u6TF1pAmZnDXNrnh8I8BKtJwymg0rS\n91Ja\r\n=1X6N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDS24ilLLSzFTH6lD22PiYvU6DAzhBzEkL2BdvnaxKZCwIgQTXjbacc/3QLT1CXa8IMhMEXrqJxiuU4nrLsYoL6RDA="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.0.9-beta6_1584364734986_0.3125051562799819"},"_hasShrinkwrap":false},"1.1.0":{"name":"vue-puzzle-vcode","version":"1.1.0","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.10"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/polyfill":"^7.4.4","@babel/runtime":"^7.5.4","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.0.0","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","babel-plugin-import":"^1.12.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.0.0","file-loader":"^4.0.0","less":"^3.9.0","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^0.23.1","uglifyjs-webpack-plugin":"^2.1.3","url-loader":"^2.0.1","vue-loader":"^15.7.0","vue-template-compiler":"^2.6.10","webpack":"^4.35.3","webpack-cli":"^3.3.5","webpack-dev-server":"3.7.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"62ff5be447e7c98ff76145694ce1ba62d0582899","_id":"vue-puzzle-vcode@1.1.0","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-F1gQejbgd9atkTAFHDA3Q8KhaVBDVQ+cE6rtgojcKoZaWHbJdqyNhf1WnFWxdZwmoK6n1CDmxS2luHAuVjWWhA==","shasum":"c12f4e9f45b24ba5a3d2f71e5628f70e8352f131","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.0.tgz","fileCount":18,"unpackedSize":275466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb31BCRA9TVsSAnZWagAAVsYP+wQSiyRlIXC0Ts5Y+WiH\nzYDQihPu2OK4Gqj6yuIKLYYQDacrtmEAUS/TMLYgbkzkbxzd4xgTJ2iOQJQM\nCypwPsWPoFAynpHVAJdibSPnJSSwGhj68WAuK2CU77TBuxAJwLfx4bmQTMXY\nFNz3feShRx8Mwe+VmyK7hyaMDLgd4d/9Bs461gH2BJGJP67SFh9IDGLCoooh\ngUdzZX3bKDS4jebCZx6Qnyd7K3jKQP9FPHoG5Gb3IrY8ysqSK0hKa/npBdYj\nPDi6MdcCEgTWoBl/CEnifL1UiI1Zoh++f50cm1sI7ZagHGdDRHO0GqoQzT7J\nVF7Sa19e7ehsJCl4Mil1+CCGh4SpdfXlciOCYjh7sAAwm4FQl61s3QAtir3s\n4+MtxidcRyZQuWdrFaAo8cByrN/0zIs7p953LfbYEkOI1+pk/0EU1IKXpfzi\nBLATdi9GyikxltMIUwZl7c8EKvivNqEDrQeHZIuc96yczzPtPhYqh82fC+ci\nTJfqL0xpulCrUd5SoWIRt3jiaQUxb0yesKWmTQTZ5JR1vbR1i2B9xRwyWni7\nW0sHtNXoJbjQG+F/lEJx47qNkcAQY+J9V/nNxp6f7dxjasa1KgcCJJtatz4z\nz9tIxSXVhkbmnR2w2dR0Qh03lThNFGuJcv98/r8+SGiP01wJF5OGcFV7eJjA\naAp1\r\n=rQY9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOiwtSTF48mkbFXI7ntIEZ1a7pvkaJtaOdA/uzR68RNAiBPPr2qfzJISROg16D4N/WYLQPPFNPskkpSRoSihhIXNQ=="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.0_1584364864954_0.3639777802834383"},"_hasShrinkwrap":false},"1.1.1":{"name":"vue-puzzle-vcode","version":"1.1.1","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.11"},"devDependencies":{"@babel/core":"^7.8.7","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/polyfill":"^7.8.7","@babel/runtime":"^7.8.7","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.7.4","babel-loader":"^8.0.6","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.4.2","file-loader":"^6.0.0","less":"^3.11.1","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^1.1.3","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.0.0","vue-loader":"^15.9.1","vue-template-compiler":"^2.6.11","webpack":"^4.42.0","webpack-cli":"^3.3.11","webpack-dev-server":"3.10.3"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"858d2bf67c3adb06733c4fa3831c32fe43f82c12","_id":"vue-puzzle-vcode@1.1.1","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-PsaP5lKWwEANYqOHgWA8jSTrCWjw6COpQvHQXHiUCsnOSLrQaOfH8i6V/fo+TDao43PMehr1zOzIcGjGkqwkvg==","shasum":"a62afb491f8bfd7fb9293c97aff8e535311334cd","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.1.tgz","fileCount":18,"unpackedSize":275134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedEKECRA9TVsSAnZWagAAthcP/2EO7YRKU15pKlpINcwT\n12fOQerJH6ND28xd6LO3donL85NimHKt0rFzI1UG31tWDCKhStNKglQCDz95\nBNgulLt/0jinT+Kp0p7T9ij5Pmgb/B1ACFTsy1cErmgkU9j14xH920jzfsYp\nh2HHVkv4paG6YFQm+Z/9Y1R0OXD6/gTaghHnf7dGU9AgXzqruzuwdCKTF6l6\nwKefCHVwjBV4PbqeRe37SSSV4q5qKFiJv8wJ1Uq9W+0EbhARFir8yjKQQ8wk\nLi66ySmWpnRB1w1THlV78whtqIINJrHZktV+5g0+hODzEVcp5PSR8/jMhUn2\n+8Bvt94PZQ2Gu9xhYk1xCiwOv7LsY//q/Mi2+UysaGZHxahzPku0q6nbbLzM\n4IBoYYlKrL+OzswGvjBkGs0WELRxFG1ADoI7MG1MMHbXIv3BuMDuYygcgxHJ\n5qbFK9hk4PTCyVdF+33r2zmBQyPRsn02oJ0rXTVTVsQkUD9znJ2y3B0dWdM7\nzWtRlvSG0E3dzsOB4bi7DKJlhX8PEAeW5yuPopXT9Jwcc+RC9L4IMP50CR1D\naxQXty7SOmKZ20wLQqyXQP6K9BrOYRimJT0FvxnRoaNI6NKPGDvsYcJoA9bl\np+gEf05NmmbYs8vmEdDntb8YBTDHSUNwUm+9tgcHrv7cK4XQBQu7CoSE+n43\nZCAp\r\n=5ptH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBMuJpNnES8dMpwLwADqoM8mJdPDGffvJQxYdKqM4u+9AiBFLQTKgsVmMPigFqbQ0R1JVNMG+CEyfuZy9NweYWGjXg=="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.1_1584677507660_0.194473780728184"},"_hasShrinkwrap":false},"1.1.1-beta":{"name":"vue-puzzle-vcode","version":"1.1.1-beta","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.11"},"devDependencies":{"@babel/core":"^7.9.0","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.0","@babel/polyfill":"^7.8.7","@babel/runtime":"^7.9.2","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.7.4","babel-loader":"^8.1.0","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.4.2","file-loader":"^6.0.0","less":"^3.11.1","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^1.1.3","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.0.0","vue-loader":"^15.9.1","vue-template-compiler":"^2.6.11","webpack":"^4.42.0","webpack-cli":"^3.3.11","webpack-dev-server":"3.10.3"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n![img](public/demo.gif)\n\n\n## 重要更新\n\n2020/03/16 v1.1.0 **事件名改变** <br/>\n```\n@onSuccess -> @success\n@onClose -> @close\n@onFail -> @fail\n```\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @success=\"success\"\n  @close=\"close\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE10以下会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @success=\"success\"\n      @close=\"close\"\n    />\n    <button @click=\"submit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      submit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      success(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      close(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| success | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| fail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| close   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"6038d66ca746b80f9e6f378a91dcf0749e7f0441","_id":"vue-puzzle-vcode@1.1.1-beta","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-3Xce5GxM3U8Jbg9ocYO2OSXZfLYwdKXfU0Zt/ZntaycMeU0NXszNSrD0cjNUY0ZZzbYXdvCM9PrL2KUEQvuaeQ==","shasum":"b46d49f61aa238e848a33185b1cb4c3e981c1b08","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.1-beta.tgz","fileCount":18,"unpackedSize":275240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeEMECRA9TVsSAnZWagAA5hkP/23k2yZF83s/kXmIfLZa\nFqJZ1AxU6N6eZLfhNMaEXr9X7pcNnBVCptlVGSAp1Jj1LYT8/fQ4fh06sRvH\n6x2R3Tpr+wRutSv/lwiNLghWiQB9hDuRRbGKfijTSfnzIMaJjy6GskTNVCjK\nLPB9woAvqolFVbgqCWbui+6es/NSIFEvh4Z7WZmRr8KuNNJa6jb0wtnQdRii\nvAo+ZpyrS0fDOzVGBMht8KPW74tTCbI8aShDOEJUvTLgcXGkQx9+UyMJ51OG\nNznLgsnuXkmAo2e9xfv2G1ztvxb10EBJJI5okVmGVS+YsM0D77kCIkpoyZqQ\na9zQw/FGEuBPkJuHDwqifCzW1BIWtMc62Hk7GNz5CPxx0b9p0hl7iF+85s8m\nwgkTFL+mcc773Jxg2Ot8SQIli8WRYJSQiDDZToBaPLUmDvep/4B3GiTg0ZyD\n6vUWIwo689DVsKT9YaSLCqNUGufSxChhD/cZLXaduXH8OPLmx31GwZJZb7Lc\n4h3xorh4y/xE64KXJytZmQ6nBEJfpO5kr83ZPe4iftnSDBSUlSdeDvTmQjzl\nxADpNBJJ1xAYD2KtgLF+YWdS4dmZ8ZZmebzhuDaMwTGYeoPIRyykBIiyHIlU\nzgIWAKakACmjkn8lU++LiaPtBR6ypJLmtjN67sqwY4zykPN2dY03V61b2b2D\nZR/e\r\n=dc6k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1x5PwK+y0hozcQ70kZ0/bATjBTBOaSVK+1x4vhrf/xQIgZHqhKM4nkexGooevb8+nzkEiSBucoOX4t0pLnJABL7Y="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.1-beta_1584939779646_0.7155781442331692"},"_hasShrinkwrap":false},"1.1.2":{"name":"vue-puzzle-vcode","version":"1.1.2","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.11"},"devDependencies":{"@babel/core":"^7.9.0","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.0","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.0","@babel/polyfill":"^7.8.7","@babel/runtime":"^7.9.2","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.7.4","babel-loader":"^8.1.0","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.4.2","file-loader":"^6.0.0","less":"^3.11.1","less-loader":"^5.0.0","postcss-loader":"^3.0.0","style-loader":"^1.1.3","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.0.0","vue-loader":"^15.9.1","vue-template-compiler":"^2.6.11","webpack":"^4.42.0","webpack-cli":"^3.3.11","webpack-dev-server":"3.10.3"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"6038d66ca746b80f9e6f378a91dcf0749e7f0441","_id":"vue-puzzle-vcode@1.1.2","_nodeVersion":"10.16.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-7ueF2TemmVIKRqK1aM+3It5IC28OGeP9FQQ2K/qnaqwjM3kRrnV0ycMOGRGVjMYQVm8aT17oEsfjNTkNLTBH7A==","shasum":"bfb70fdac6880c904f59506395e719c583b5279b","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.2.tgz","fileCount":18,"unpackedSize":275235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeEPyCRA9TVsSAnZWagAA+WcP/RF/AKLBxXNJdDDut6ht\nZtq1z7CPGr7teug1L+w3vVhSOMSM3hZ4niWmyJ5t518qjpzdcdC2E25vwk0b\no36DxMHFL1zlIeDQKsAhpgb75i7IVxbfism2plBF+ckBlnPAlRi1kbHmXDHS\nIwz9qdBLQnNJmg2Aq3h1Rjy44fzOtDJfdrFcQ3+HOkOifmmT6mR6uBn3T2iR\nIDSpksNgJtPhGnbN3S10Q/QdAMjBsi8ZMSR6azutQLj4NxM5QnDkJEJJ82vP\nxX4QB+vWPyE1qHBWK/V44bjAd3Z6SExO1O5wpeIN+Ds2tAGjCNZnBmy/VRnf\nAXtIq78Py7STxE9yCltDUZLtTV439cUbZFEPFwr3Mf50zqQEaT16dk3wrxjR\nea5+rJPj8uFdrhPwhnWff4QsPq7hFYyJERX3TPlCdzP0QUk7MbFDQFoov6rQ\nio+obi8mHpmQWEi0q4lgvjD4rrLEDFNgrYbv38OXharEfscciVLiE6qkDt4z\nmqhS3AjwlGe81rq/hVItyGkAm8Rl2my+4DEf4ovOGNnpP4aqUFAr2N2RZoT6\nrmlTqVPPNNPhNjTCsv2OP5dLiIOU0fHUljk44LjlR0LQScfYxMzJmFhmSkcM\nrVMCV3ghSahVjkFOEJ7w/FH5uIuvQmxXrlsOwzylWhjaYAVGg+q3g+ayM/sL\nxuWM\r\n=IKjM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7DBhbNqmNKG0n/zdv5JStcV1+JzvCJKWstyqdsnde+AiEA3j/cNVTQZATFeBZkCz7cwTD+Yb5fLQusGvwHfdDiNZc="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.2_1584940018127_0.38212459212488503"},"_hasShrinkwrap":false},"1.1.2-beta":{"name":"vue-puzzle-vcode","version":"1.1.2-beta","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.11"},"devDependencies":{"@babel/core":"^7.9.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.6","@babel/polyfill":"^7.8.7","@babel/runtime":"^7.9.6","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.7.6","babel-loader":"^8.1.0","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.5.3","file-loader":"^6.0.0","less":"^3.11.1","less-loader":"^6.0.0","postcss-loader":"^3.0.0","style-loader":"^1.2.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-template-compiler":"^2.6.11","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-dev-server":"3.10.3"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n**DEMO**: https://isluo.com/work/vue-puzzle-vcode/\n\n![img](public/demo.gif)\n\n\n## 重要更新\n\n2020/03/16 v1.1.0 **事件名改变** <br/>\n```\n@onSuccess -> @success\n@onClose -> @close\n@onFail -> @fail\n```\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @success=\"success\"\n  @close=\"close\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE10以下会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @success=\"success\"\n      @close=\"close\"\n    />\n    <button @click=\"submit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      submit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      success(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      close(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| success | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| fail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| close   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题，因为canvas api无法调用跨域的图片\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"3843c425df65aa1b6e61ff5f4aa1065ff0b0c076","_id":"vue-puzzle-vcode@1.1.2-beta","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-sBIFpKBV4VSh/UfBnKQLPAwgXUqcjly93sCuV3FkEzLZvuijaATskh6mgwpRL0F1q4kM1cNnDiaccDsJ9aynrg==","shasum":"9934725fd382a3f91c4986f5f00371d51fff1676","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.2-beta.tgz","fileCount":18,"unpackedSize":279256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerjPGCRA9TVsSAnZWagAAhx0P/2az3hJwl8D+jVp8zjvx\nPe7ZJJ11bE/FyNYXJCIDBW6A0nMN34/BRjJdu3cz2XFYACMJxBLOjjo7+dR2\nlntC7kkQBhB8T17XPUXABgygSs8XRR9P2ACFehohTuvlvoMbUp/HZ8PQ2Z5g\n9pibZn81+xMClcCUW65r4Cv8IaznFIuIvryoPOJvIemcceflU21EBItwHkPn\n73Rhq92rwG/bwx1gP1izEW+C43TBlpdPJMBrOK1A/fMDIdyhyjAdme0j6BlU\nBvpzgsnQDVeZL5sWQrXHherWNXGKrSPDqUYAmDhRpBl6juaVEQ/jgYzvSaSw\nvGqtPfWltr/psNs4LGTossxU1+oigi9V49OsrL2Md++6w4NuU3y1wbEtveME\nU0hsNiAtLKm3RYjBAWqZyDLC8A0dGlZuoqZuUSGF6vbpinf4TMhO8dz2hDUw\nbbashU+9YCaLqNUdk2smiOiJLmrpIQ1rlpFmYs7/wJ5HP2e8dhtmPjE6yqga\nEXrcsMsUP4lh52WVDgFEmWgcF56g4VlhSJ1Jkv3E8Ywwbqne3ORYCOQBdWRc\nd9N3X3zbmJhTHpTyfqZOX6oAl79EKO9gnR/R15+5ESeugwuZzJzFyScYsS45\nQIvNervFu6Tb4Sdhe2S8roW8GcfOGEVJT4Y9E5iKkerQ+FD66A5GfvZscz+/\nKjLe\r\n=AOxU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGGo0mEk6MN/Kw5ZBNqPdXeCQD5H1jzm8afzO9dXSnxkAiEAhIdpGtqTIYczxUFKJ0fZ7OIstQU/Eo0FAh5AGC9Ccdc="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.2-beta_1588474822281_0.8983226617423596"},"_hasShrinkwrap":false},"1.1.2-beta2":{"name":"vue-puzzle-vcode","version":"1.1.2-beta2","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.11"},"devDependencies":{"@babel/core":"^7.9.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.6","@babel/polyfill":"^7.8.7","@babel/runtime":"^7.9.6","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.7.6","babel-loader":"^8.1.0","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.5.3","file-loader":"^6.0.0","less":"^3.11.1","less-loader":"^6.0.0","postcss-loader":"^3.0.0","style-loader":"^1.2.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-template-compiler":"^2.6.11","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-dev-server":"3.10.3"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n**DEMO**: https://isluo.com/work/vue-puzzle-vcode/\n\n![img](public/demo.gif)\n\n\n## 重要更新\n\n2020/03/16 v1.1.0 **事件名改变** <br/>\n```\n@onSuccess -> @success\n@onClose -> @close\n@onFail -> @fail\n```\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @success=\"success\"\n  @close=\"close\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE10以下会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @success=\"success\"\n      @close=\"close\"\n    />\n    <button @click=\"submit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      submit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      success(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      close(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| success | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| fail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| close   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题，因为canvas api无法调用跨域的图片\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"3843c425df65aa1b6e61ff5f4aa1065ff0b0c076","_id":"vue-puzzle-vcode@1.1.2-beta2","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-opIWnVzhSz0XlAY6bzd987KTZSgRuGwJ+fqN8CxP86DmikvUhgAs3yyCegCFlankIpRLD+Ltgmf0+VSi2149/Q==","shasum":"02e124ec237bd241f7a51e4fda0c309057eb55b4","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.2-beta2.tgz","fileCount":18,"unpackedSize":281627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerkBWCRA9TVsSAnZWagAArCYP/3/c3PkP/avvsDUMYS0v\nhTKKFZaY16yZ4LLEBEYudPjEByErbQXIyiPIZMQehf/uONV1qd3p4OPUV7ZP\nxfQbHylDE7n/FK2kY0eINwHcpL4JfvUKjsm+ytceSopOdt4cgBhsRwshCRYP\nLdmY+L79lsdNjRFG0kfJhTSLpHOxqsOor3xTE8quhCMEY4eyoqHKTGMO2J38\nmhDepwMQzrY3/2sxnvdFtupIFAXGpfnsBH+13Im7ux8vNjD9KuEAXAOnL9QL\ny4/ZM5/3hogaJwrl4lPEqzPm9esPm7WyL/8D9+6Z2WZY6hWkQ+0wDaL64VoR\ncDPZUydtWoObmMBLmWno3oaHSSYOEnohJNYBszPxNXWsH/OUHSfPcFNPU08z\nGFHYBKcvldRL9Lu3Bncy00PqEOP2mrFsMzaCY1UZLMyJ65dgfCoE+4UuzfQ5\nw2Q+F5qOMd/BlTj5jDUlAqT49xS3LUi0wVVi75ZjjwM/NCbHTNo+tQCpfCsy\n/mmYdQHIxAMi0e4yzgXiQIC1zOfuBFV22OS8lEYq2lwF8EEZzx4sqfiwbCIF\nk8tCejtQZIJqDucn5BptYAYzEBbQQBzlovUJn+WEcvtaoKqvIg2MKRdhbLIc\nFUgEfgz43QQGSua0YTULxXgZJjcDeDbxVFjZCqE1Fn+z5zs8rA7D+UY5xy/D\nbcOk\r\n=iKc2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFJx2PIqG7hsmH+pptct5IE3QOp2Y4MgzhfIIDbECsxNAiEAyqxOiC3POkKvl9Gy0b8pPpEyUcXGqry2uSpwmfI6ns8="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.2-beta2_1588478038097_0.39943664205642704"},"_hasShrinkwrap":false},"1.1.2-beta3":{"name":"vue-puzzle-vcode","version":"1.1.2-beta3","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.11"},"devDependencies":{"@babel/core":"^7.9.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.6","@babel/polyfill":"^7.8.7","@babel/runtime":"^7.9.6","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.7.6","babel-loader":"^8.1.0","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.5.3","file-loader":"^6.0.0","less":"^3.11.1","less-loader":"^6.0.0","postcss-loader":"^3.0.0","style-loader":"^1.2.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-template-compiler":"^2.6.11","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-dev-server":"3.10.3"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n**DEMO**: https://isluo.com/work/vue-puzzle-vcode/\n\n![img](public/demo.gif)\n\n\n## 重要更新\n\n2020/03/16 v1.1.0 **事件名改变** <br/>\n```\n@onSuccess -> @success\n@onClose -> @close\n@onFail -> @fail\n```\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @success=\"success\"\n  @close=\"close\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE10以下会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @success=\"success\"\n      @close=\"close\"\n    />\n    <button @click=\"submit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      submit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      success(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      close(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| success | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| fail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| close   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题，因为canvas api无法调用跨域的图片\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"3843c425df65aa1b6e61ff5f4aa1065ff0b0c076","_id":"vue-puzzle-vcode@1.1.2-beta3","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-tnhNcYoheJxfH7VVCRJ3RVY7oj0wY6N6ywIkawkv+uJv/M09thpQLXg5P57f4L47fF73REzSg6r5kDjUKdC2eQ==","shasum":"8cdb9cc6a69f46bf9687ecf69d7b9a2c6416ab05","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.2-beta3.tgz","fileCount":17,"unpackedSize":280362,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerkv7CRA9TVsSAnZWagAACx8P/AkTlqP3xchHNpA1EBzx\nTafJR/5pRpIWbfUl6Dpv1TDJFbc12FyYVks9p7tPSDWLojNtud0tXsGLFtmm\nriXg76jNSnGuo0MfpnTfVJA7reDiLJF2Ikk3cLdxVJReoJ+ZUL+OCCaVd41/\nSp50O6OWq79Y15RAYQ0oeUsbW2PXmhRPChS2CIY+uopJuYS3ne6+WWoNQs6E\n8BYbdS/nI+veXA1AEFGxMPuXuxcJVCrtQlh5Ls8Q8s2Bn4dU61s5PNO171Fj\nzahudnDF3M+Ps+PPKxNwh/BeOgG+WQNlTlZSH9AZmSURpJuk8xjTKhAGg6Iy\nMSzbVU79lX9aXUOWP6K2lvlf4zWbYC2HvmqEJEL0z4tTvw0tz7ezSQ4CpWKm\n3oNtHOSaTVAGbWhYSdlojmTX+MWpUM0y8j96oB/DBjp5M9TIUVA6tylLTXnp\nsARGMhW8lLGw1WEXlaFu5SBHqXjziRcSV/J1JJkdGKjKDHdU54Nnd70P26R+\nStsaX7NwdD8MofLTsGjiyMi9efd5xcWqEPl5vKTCVpFGFKiul+0aRgfG+z78\nKI533loYF3dTfcraOJxoyh0opB5rkpveXQ0chp0pd1zCQUaQrorL3B7OktFn\nnP/G1IFvCLhc6niAJVExuuawT/oxS2jOR4pLqdWs354M5hJGOkeDnszK2mGM\nHAxa\r\n=uUAH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3iZpeT+330IrogTUu+Xgj5lTkJRCfH78PwkzADntuvAIhAJG0TInjz9t62kh+YBz+6124B17HgsB+O83KMvSbxsan"}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.2-beta3_1588481018959_0.8142614479290449"},"_hasShrinkwrap":false},"1.1.2-beta4":{"name":"vue-puzzle-vcode","version":"1.1.2-beta4","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.11"},"devDependencies":{"@babel/core":"^7.9.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.6","@babel/polyfill":"^7.8.7","@babel/runtime":"^7.9.6","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.7.6","babel-loader":"^8.1.0","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.5.3","file-loader":"^6.0.0","less":"^3.11.1","less-loader":"^6.0.0","postcss-loader":"^3.0.0","style-loader":"^1.2.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-template-compiler":"^2.6.11","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-dev-server":"3.10.3"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\nVue 纯前端的拼图人机验证、右滑拼图验证<br/>\n我知道有第 3 方的很好用,比如 GEETEST 的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/>\n太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\n\n**DEMO**: https://isluo.com/work/vue-puzzle-vcode/\n\n![img](public/demo.gif)\n\n\n## 重要更新\n\n2020/03/16 v1.1.0 **事件名改变** <br/>\n```\n@onSuccess -> @success\n@onClose -> @close\n@onFail -> @fail\n```\n### 安装\n\n```node\n  npm install vue-puzzle-vcode --save\n```\n\n### 使用\n\n```vue\nimport Vcode from \"vue-puzzle-vcode\";\n\n<Vcode\n  :show=\"isShow\"\n  @success=\"success\"\n  @close=\"close\"\n/>\n```\n### IE\n我没加`babel-polyfill`,所以在IE10以下会报错：`SCRIPT1002: 语法错误`，<br/>\n需要兼容IE的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西到自己的项目里，给`app.vue`随便改个名字，就是个普通vue组件，直接用即可。<br/>\n`src/assets`里是两张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\n\n### 最简单例子\n\n```vue\n<template>\n  <div>\n    <Vcode\n      :show=\"isShow\"\n      @success=\"success\"\n      @close=\"close\"\n    />\n    <button @click=\"submit\">登录</button>\n  </div>\n</template>\n\n<script>\n  import Vcode from \"vue-puzzle-vcode\";\n  export default {\n    data(){\n      return {\n        isShow: false, // 验证码模态框是否出现\n      }\n    },\n    components:{\n      Vcode\n    },\n    methods:{\n      submit(){\n        this.isShow = true;\n      },\n      // 用户通过了验证\n      success(msg){\n        this.isShow = false; // 通过验证后，需要手动隐藏模态框\n      },\n      // 用户点击遮罩层，应该关闭模态框\n      close(){\n        this.isShow = false;\n      }\n    }\n  }\n</script>\n```\n\n### 参数\n\n| 字段         | 类型    | 默认值             | 说明                   |\n| ------------ | ------- | ------------------ | ---------------------- |\n| show         | Boolean | false              | 是否显示验证码弹框     |\n| canvasWidth  | Number  | 310                | 主图区域的宽度         |\n| canvasHeight | Number  | 160                | 主图区域的高度         |\n| imgs         | Array   | null               | 自定义图片，见下方例子 |\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字   |\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字   |\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字     |\n\n### 事件\n| 事件名    | 返回值 | 说明                                                         |\n| --------- | ------ | ------------------------------------------------------------ |\n| success | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值px |\n| fail    | 偏差值 | 验证失败时会触发，返回值同上                                 |\n| close   | null   | 用户点击遮罩层的回调                                         |\n\n### 自定义图片\n\n```vue\n<template>\n  <Vcode :imgs=\"[Img1, Img2]\" />\n</template>\n\n<script>\nimport Img1 from '~/assets/img1.png';\nimport Img2 from '~/assets/img2.png';\n\nexport default {\n  data(){\n    return {\n      Img1,\n      Img2\n    }\n  }\n}\n</script>\n```\n* 也可以是网络图片完整URL路径，但注意图片跨域问题，因为canvas api无法调用跨域的图片\n\n\n### 说明\n\n* 当不传递imgs字段或图片加载出错时，会自动生成随机图片\n* 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\n","readmeFilename":"README.md","gitHead":"3843c425df65aa1b6e61ff5f4aa1065ff0b0c076","_id":"vue-puzzle-vcode@1.1.2-beta4","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-2C1h/4OaoU6V+4xLBQGcNxyMkqSCMFnifTs0iwtXhyBSX2quQiPxhAomgWeP/Q06WbnAG2CEJ0LiAGa3fwJrMA==","shasum":"f1742ec5d29b1732b7b54df2c985ec6b1d211e7d","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.2-beta4.tgz","fileCount":4,"unpackedSize":42107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerk3sCRA9TVsSAnZWagAA/NUP/RxSv84nsraeV8WEzNKQ\naBDRTVglDVlPwwcnVFfgSLtqT6iijEXw13917r+fn1QSos7yXWfjnYjjZb+x\nRD/RnfCz/4fvRWY9Ryi3N6WZNJAMoGK//+jIamemACE6iX1VbiktTZgJs1WV\nEmZA+4kkL2UZ2loDkDt6/waodRTC7JULzvyyW0JM+Ci+9rri2ypo5k9TjTsa\nPs2pPU2WpC6QjEs2UEn9Bo+NbGzMgFYi37xX92YWblpstMQJbevQPwU6dfjZ\n4r07zjcBOvg3TvOZI1cFNbQHd9ApnM7MhOWye+udWON1HNg0iSNWLjOICYuY\n3bfOuijTbFHCkX4ljJF0hQwNGMmE6xHQsypCdtifmmMuwJ5Xwikt7tF5AZTR\nc2rQyfMzL72tHjEYyTmcfzEtWUTGD6OsS4KQmyJRXYI6dtqgLM+8C8ZdOIeC\nzoPDpSK2cu8T2qNIVriGyk+n44aLpIz/uOsUebFpE8SHRIfdG27jkNdidpQO\nSwLAlH6yfEWb3gUld8dasBLx68aQNI4ctIloGF5zWDjKA201TETjaQBF6hct\nTpNe9++JZO0RNV+v2jRgxp5cp50xUeCymSCYdTHWrKIbhlSsLAmXPAmtXoUj\npKjedopfsM7BOvI/GKlttk/T/yQgyN3QvUfrLp0AW8q7mOy9/BwCcStCT/Tp\nrVgn\r\n=sgI+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzZL1a80reYqbqm0BW+67kNhAV7a4x2pUEO9SdQAdbPQIhALduOW0mZBnG8wq5c1QMVEUted98+HL/JQNjYZb4hg7p"}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.2-beta4_1588481516010_0.31579692191606634"},"_hasShrinkwrap":false},"1.1.3":{"name":"vue-puzzle-vcode","version":"1.1.3","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.11"},"devDependencies":{"@babel/core":"^7.9.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.9.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.9.6","@babel/polyfill":"^7.8.7","@babel/runtime":"^7.9.6","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.7.6","babel-loader":"^8.1.0","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^3.5.3","file-loader":"^6.0.0","less":"^3.11.1","less-loader":"^6.0.0","postcss-loader":"^3.0.0","style-loader":"^1.2.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.0","vue-loader":"^15.9.2","vue-template-compiler":"^2.6.11","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-dev-server":"3.10.3"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"3843c425df65aa1b6e61ff5f4aa1065ff0b0c076","_id":"vue-puzzle-vcode@1.1.3","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-mfuVX2Qslb4CtqGHV4KB9HHG2BV7+6AYDLDAI04VMI2pOrVZ3Io5zrpyRbD7dI9alWAqll2i86ooyF+Dk+Vbkw==","shasum":"1492ecbe0a9b1ec4466ca00f6a93180e88b84dd1","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.3.tgz","fileCount":4,"unpackedSize":42101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerlBvCRA9TVsSAnZWagAAEYcP/3pxjlagdlabsxGvRqGD\nsHK4JA7SuSNM69Ypu/uvtfg/xnt5fTjDZ4dEBPLWTtew6NkgPg+6WrFj/72Z\nN85WKpqPPv4JVKSe1SZddPGNA40lpIpR56URgNU4OvfZyr8adb3egGEx6uz8\nhEtNhqQBqbatddBJQjJTo9Ty2E3ld6FRGRVQRPg2PdWnhur3m39xyN/NDWcR\nfUeRQdMEbdXsMUItMXRIJxDoTrwh0+BnBq8zWnCQYcJhuD6JgkY9O17A4SGk\n7AIS7nEVLslGelo+IG0aOP+T7P1AXszKqwIPu88kgnyj3v8k8ROTfOMUw/J+\nFEkc4ya8naYeoqApWtZE5B5WNTtw1dCKGQR/gp94d2xsFiOAYCQiq27Hlr3a\n6hZqPhI5iY2ToDJ+KfAap1LdPsMMXRsYvion4dZ36c12BLqsviyXuTWVp0HH\nrF9IEL6ebYgncrr7kUkCqOpjq+EwCSJAVd+eCoXnyAGWrQj7xSEuAY8/qjIo\ni+deaxB7BZUJIFmG15EvqYkKlZUs1R1HgwH9G4KURcuqA/Ts2uWMcrfExJNc\nQeUg+PwH9/PiioaSiDWRvkNJ7C/UYsxPQRE+T1Qz0XyhJw6TJgvqQULh/ZjW\nA3N0AasXxb5+Fqmze7Egz3NoF3jv/aZFfK23cLyCc3l9UIhGFrKWybfcwvYc\nRs6n\r\n=HAXi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBulch9nhFb1C6u/o09OOfkQESFIDmX24A9W1VhPswM8AiABCjL07CQMGcGITmEX9uhQUGMqHz5oxrxyWT8eN80m7Q=="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.3_1588482158774_0.36277544780267745"},"_hasShrinkwrap":false},"1.1.4":{"name":"vue-puzzle-vcode","version":"1.1.4","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js --progress --profile --colors","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.12"},"devDependencies":{"@babel/core":"^7.11.6","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.11.5","@babel/polyfill":"^7.11.5","@babel/runtime":"^7.11.2","@vue/babel-helper-vue-jsx-merge-props":"^1.0.0","@vue/babel-preset-jsx":"^1.1.2","autoprefixer":"^9.8.6","babel-loader":"^8.1.0","babel-plugin-import":"^1.13.0","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^4.3.0","file-loader":"^6.1.0","less":"^3.12.2","less-loader":"^7.0.1","postcss-loader":"^4.0.1","style-loader":"^1.2.1","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.0","vue-loader":"^15.9.3","vue-template-compiler":"^2.6.12","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-dev-server":"3.11.0"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"d2be91b7bcf1aca4cad6f5d082a4f310dc57cce8","_id":"vue-puzzle-vcode@1.1.4","_nodeVersion":"10.21.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-AcUywdDtDmVPhk4D4XwmdxKR9yxKl/gy4RFNFZ7jgK7sKx7GFDACaFs6J2jzuIJ0iR/GE6sgndX4odPAt5L+jw==","shasum":"64a67552857480afa74b6372b40c72afccbb6ddf","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.4.tgz","fileCount":4,"unpackedSize":43489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWeB2CRA9TVsSAnZWagAAYBYQAJRlYJsMFeWzGXDnGbPG\nW/ETUm0MoSSrkiBI6Bqrp4bwJ4hQgSmMo4oPTeHT+9M1Zrt0w7wc8DIVv4a4\nXk1yC78RYBjIt6wtXX1lzVq6W2Xj8xc2PJbhJEh24KFNTrhzw8P5HfhqdKAL\n/VdGefXSECRWt+uZqtLsO9eQwZGPjfDfTR32exxKNGYoZBFyOoHBH94+vyds\nMIGdTek+/GTS5LTToEwVvhv88zcb5Ssf/oZ0MONC3aPY8OadbJpdm2wStD6M\neWrbD5jHwv0SrS8nw634RtkLtSdLz1rnNuS1uL1sDwOuDE1z6A8zflYLMrNf\n59RzMz9rl0ymj16bRPCzjiodiaFFU3XWGA2qmrQtpY3EpbpcH+8HHV0MtE6y\nkq6mKmhAeB7ePJjUe8X00obd25s88I9WZaT4zFMVUl9EAMRmbLl1C7/Ou1qP\n8oQD+E0mSvO7P0TXT/HRtkDFNGFuQ8aGJnrYLgqCKxSbLeEl270qTi7H6gk0\nGnmWokE3bwPOpiPBtBlB9QKcdDs61MV+UDt9ux+e0a5ziNqgfJJ4BME/JD2R\noapZT9rFmJTrq4am+Cv2hirFuOD771zC3WwYezNLxIGRmomMFrTYvIQ5bBL0\ntUF3QmcJsUNVQVSyNCAoIO5wb+XEh4sqrJ23n7DFwITeJ7fWlYICkVXugYlM\n/ugg\r\n=3r2n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBeQEVnBx2YRmwfnYBU2GSwjZMVSSsJGp9w/DcrD1zMoAiBgJWX4/j/xDtntsOHluCkObL0dYMliKRQYc8C9iMiqfw=="}]},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.4_1599725686022_0.5697231747917728"},"_hasShrinkwrap":false},"1.1.5":{"name":"vue-puzzle-vcode","version":"1.1.5","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.12","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.2"},"devDependencies":{"@babel/core":"^7.12.13","@babel/plugin-proposal-class-properties":"^7.12.13","@babel/plugin-proposal-object-rest-spread":"^7.12.13","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.12.15","@babel/polyfill":"^7.11.5","@babel/runtime":"^7.12.13","@vue/babel-helper-vue-jsx-merge-props":"^1.2.1","@vue/babel-preset-jsx":"^1.2.4","autoprefixer":"^10.2.4","babel-loader":"^8.2.2","babel-plugin-import":"^1.13.3","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^3.0.0","css-loader":"^5.0.2","file-loader":"^6.2.0","less":"^4.1.1","less-loader":"^8.0.0","postcss-loader":"^5.0.0","style-loader":"^2.0.0","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.1","vue-loader":"^15.9.6","vue-template-compiler":"^2.6.12","webpack":"^5.21.2"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"6b5099f99dbf651236b3923475b36c55ead48c75","_id":"vue-puzzle-vcode@1.1.5","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Qkj8mEY9IwXLNFSoGCv3OE61d/RUfhlBWsZgJ7kwrA6NbvjeO4kEmsoUAN5cvKWuDjZd3lE1o2U6ZrZ6Er42xA==","shasum":"ce21ce18b76cbd8a4473fe194d2d6f91ad0f8d68","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.5.tgz","fileCount":4,"unpackedSize":42142,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIjghCRA9TVsSAnZWagAAH2YP/R5V48s1HfJZ7EKWnd6h\nDU3nHOazcfljoQcZ8i84bfJCPe66rc8BL8uXv8EGuqDdhymV3TsB7dIu7YQH\nGaW6rstcxwT1lDuhlLDRgCc+vUKt428Ub6O8h0VFeJHremDQCzafrgJ6zVth\nAiV/z/t+RKlPsU7DUbPpNXZCciDLjejuuWMWnys3ilAQjatBLbU4pGjUSBNE\nTmeU4Wg65x4kxg9thf+4QNR9I3nH3EURPjxfCF2S3kbrfo7Qh5+mE1z+6MK4\nAnpISzKShYZa3+Ln/GtyVOZ1gQQuI0VidGQRDtSXVwUBlH5i0uzwLDuo0FgG\n7dcb+OG021KIQ5eOX7CqunrONLbSTJ/y5A5ZE5B1YzshNnlD1Dp1V7GYf+Ku\nUnvQr1H+yZZxQxKvKyyTMKG4l2AOFjzi9lHNBVSu02Lafx7gQum1OCDmKcrz\nXxY74uZDEvNpYoGMnEwrWh1KL9ZzwMn0XvYBj+O7KnMU91PwmO0uNuM9X5eN\nlLewL4SHBL1S1uQfknHoxdguRhhPBIuEZx7RDuNPgM3aDzS4yT3tKD+T0tHu\nYoghKK9dr+M5P4Ita1TUwT/2JIgEuTmzVUkZwxJ5/HAp0H7MUpV9roIJ7+TX\n1dTDF/bpEmzYkVsa4ik5K9ObagigGBIfYzdsRlWOw97dQvghjo3XUnp/NMD7\n8V1i\r\n=Jek/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICrZhAYYe4KDXp2T20bI6blCM/XFo+AJ/5mrqw1cgcWxAiBvFrG+0JjaZsLaxqzKP5sJbW2xHM+vbSaU6GD3vFkqHg=="}]},"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.5_1612855328747_0.4256858051197725"},"_hasShrinkwrap":false},"1.1.6":{"name":"vue-puzzle-vcode","version":"1.1.6","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.14","webpack-cli":"^4.9.0","webpack-dev-server":"^4.3.1"},"devDependencies":{"@babel/core":"^7.15.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-object-rest-spread":"^7.15.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/polyfill":"^7.12.1","@babel/runtime":"^7.15.4","@vue/babel-helper-vue-jsx-merge-props":"^1.2.1","@vue/babel-preset-jsx":"^1.2.4","autoprefixer":"^10.3.7","babel-loader":"^8.2.2","babel-plugin-import":"^1.13.3","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^4.0.0","css-loader":"^6.4.0","file-loader":"^6.2.0","less":"^4.1.2","less-loader":"^10.1.0","postcss-loader":"^6.1.1","style-loader":"^3.3.0","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-template-compiler":"^2.6.14","webpack":"^5.58.1"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"09c6c76ce8f053dac659931765d7975218993b59","_id":"vue-puzzle-vcode@1.1.6","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-sR4urWfphgnSkeSkHP6biIfSz3u/5hJK30Cw+4N7yKx136dlyyHj/TE5krSohYmZxHtorkdyvZQKIyh/4mnxJw==","shasum":"eb69f423dc2cffe7b30abf8caf2557fb68b7c07c","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.6.tgz","fileCount":4,"unpackedSize":42764,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGrrFQfIpFfJLM7xjthAUBPf3A2a6yu3trAk1qFS8chgIhAPwXc38FB67COBTBGLTrt1V9OLNZ6UwWXOvVXM+OujsX"}]},"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.6_1634008402764_0.334483125306277"},"_hasShrinkwrap":false},"1.1.7":{"name":"vue-puzzle-vcode","version":"1.1.7","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.14","webpack-cli":"^4.9.0","webpack-dev-server":"^4.3.1"},"devDependencies":{"@babel/core":"^7.15.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-object-rest-spread":"^7.15.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/polyfill":"^7.12.1","@babel/runtime":"^7.15.4","@vue/babel-helper-vue-jsx-merge-props":"^1.2.1","@vue/babel-preset-jsx":"^1.2.4","autoprefixer":"^10.3.7","babel-loader":"^8.2.2","babel-plugin-import":"^1.13.3","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^4.0.0","css-loader":"^6.4.0","file-loader":"^6.2.0","less":"^4.1.2","less-loader":"^10.1.0","postcss-loader":"^6.1.1","style-loader":"^3.3.0","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-template-compiler":"^2.6.14","webpack":"^5.58.1"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"09c6c76ce8f053dac659931765d7975218993b59","_id":"vue-puzzle-vcode@1.1.7","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-hMYqa5wRI0n7wwsIm5SQAT0TZoJ/uUoV6qQmT4pn8NkjxxVa0aXFdao6mT8T67omSWJ6My2y1LHcB/n85nOHYA==","shasum":"15453859db8858184cbfab9ff558b466b6268dbd","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.7.tgz","fileCount":4,"unpackedSize":42804,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpKR599GKFXdcEF7LHEpiy6pc2+FgpbLe56VpNq5XBdAIgfQppJc+6FHIJEsTQ6kVsA5s4CpBBlAT8dc5a6+yxWz8="}]},"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.7_1634008879405_0.27213692000308076"},"_hasShrinkwrap":false},"1.1.8":{"name":"vue-puzzle-vcode","version":"1.1.8","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.14","webpack-cli":"^4.9.0","webpack-dev-server":"^4.3.1"},"devDependencies":{"@babel/core":"^7.15.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-object-rest-spread":"^7.15.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/polyfill":"^7.12.1","@babel/runtime":"^7.15.4","@vue/babel-helper-vue-jsx-merge-props":"^1.2.1","@vue/babel-preset-jsx":"^1.2.4","autoprefixer":"^10.3.7","babel-loader":"^8.2.2","babel-plugin-import":"^1.13.3","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^4.0.0","css-loader":"^6.4.0","file-loader":"^6.2.0","less":"^4.1.2","less-loader":"^10.1.0","postcss-loader":"^6.1.1","style-loader":"^3.3.0","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-template-compiler":"^2.6.14","webpack":"^5.58.1"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"42269e9e651323362f7a94ff3124ff843826443c","_id":"vue-puzzle-vcode@1.1.8","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-nQpEaK+30a7XLEkKJc8R6JMcK26U8JCZINZxRRO1fsjHYwafHyAT1uP/Ou/ylNNm6QC5ZUHgZyAQR5nfIro99g==","shasum":"810cf9d917b54a2d4655f983d35be235091a5c2f","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.8.tgz","fileCount":4,"unpackedSize":43039,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBH+/x0fa8rRhjF01Sj07xUT6F6NqP8iOuWUXqAVFkesAiEAgmx4npStIP7+qwwKzSbi50p7bFoePQabkgeEVIiZ16c="}]},"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.8_1634115778216_0.3165955201714594"},"_hasShrinkwrap":false},"1.1.9":{"name":"vue-puzzle-vcode","version":"1.1.9","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.14","webpack-cli":"^4.9.0","webpack-dev-server":"^4.3.1"},"devDependencies":{"@babel/core":"^7.15.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-object-rest-spread":"^7.15.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/polyfill":"^7.12.1","@babel/runtime":"^7.15.4","@vue/babel-helper-vue-jsx-merge-props":"^1.2.1","@vue/babel-preset-jsx":"^1.2.4","autoprefixer":"^10.3.7","babel-loader":"^8.2.2","babel-plugin-import":"^1.13.3","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^4.0.0","css-loader":"^6.4.0","file-loader":"^6.2.0","less":"^4.1.2","less-loader":"^10.1.0","postcss-loader":"^6.1.1","style-loader":"^3.3.0","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-template-compiler":"^2.6.14","webpack":"^5.58.1"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","_id":"vue-puzzle-vcode@1.1.9","dist":{"shasum":"59fc9e3b787ed22b6bddcc1cec23f92328a278c0","integrity":"sha512-Ml3w4W3LaN+DB+lyvNRZq70YeW7nssu3QTFo0jWhY0Y++VpGyU/kWdEQDXiMzavYXyoq2sgT9TgG3g25BFI8wg==","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.9.tgz","fileCount":7,"unpackedSize":47659,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHt5p+DPud3sc1U91O0t7iULFNdfcB9kM+FODuz9gv4+AiA/MSv2yM34m2NBVqPnSVAyL816jgMSiVxMoavgWHfsQg=="}]},"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.9_1634545742050_0.7074510187297256"},"_hasShrinkwrap":false},"1.1.10":{"name":"vue-puzzle-vcode","version":"1.1.10","description":"vue 滑动拼图验证码","main":"dist/main.js","scripts":{"dev":"webpack-dev-server --config webpack.dev.config.js --port 8081","build":"webpack --config webpack.production.config.js","test":"echo \"Error: no test specified\" && exit 1"},"private":false,"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"keywords":["vue","puzzle","vcode"],"author":{"name":"L"},"license":"ISC","bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","dependencies":{"vue":"^2.6.14","webpack-cli":"^4.9.0","webpack-dev-server":"^4.3.1"},"devDependencies":{"@babel/core":"^7.15.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-object-rest-spread":"^7.15.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/polyfill":"^7.12.1","@babel/runtime":"^7.15.4","@vue/babel-helper-vue-jsx-merge-props":"^1.2.1","@vue/babel-preset-jsx":"^1.2.4","autoprefixer":"^10.3.7","babel-loader":"^8.2.2","babel-plugin-import":"^1.13.3","babel-plugin-transform-decorators-legacy":"^1.3.5","babel-preset-vue-app":"^2.0.0","clean-webpack-plugin":"^4.0.0","css-loader":"^6.4.0","file-loader":"^6.2.0","less":"^4.1.2","less-loader":"^10.1.0","postcss-loader":"^6.1.1","style-loader":"^3.3.0","uglifyjs-webpack-plugin":"^2.2.0","url-loader":"^4.1.1","vue-loader":"^15.9.8","vue-template-compiler":"^2.6.14","webpack":"^5.58.1"},"browserslist":["iOS >= 8","Android > 4.1","last 1 versions","> 1%","not dead"],"gitHead":"f3a2a7fd7edae38c8d8d0b37f34ad38cbfc2575d","_id":"vue-puzzle-vcode@1.1.10","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-gvdrYgFcQOT1aQRn+JCQ6bTJRcdhv/y0asiPxc6Wz9a7zPz++KIbGaXndzTZRmXHfCpSJwqvSrntMMayjegY6g==","shasum":"628537040d4d7d6be9a37376cc60c8126acd253f","tarball":"https://registry.npmjs.org/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.10.tgz","fileCount":4,"unpackedSize":43345,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLgvEN6bf/BYZkdwrqxXZB4fc2tzVmNzjBrywl7/bTygIgcXwosvVtGwM//5WaAZSemx5z1TqJHF/Cb8WsITZAGzQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiKHKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrn1w//bNwAOElM2vZ0Im7QG/CcLJvLzG+thO9f7PLySP9Jd0a0O7n1\r\n3dZADSzKmI2LHzaojgAr5qxrULj6YdGm3owXSUSldKMoYMedi/6AqJI6pBbM\r\nzMf4qfDNofJYotHBTmN9MrCT0azshfLIu49RWHmPQGpvGGk27a7VpfptFmus\r\nebMbEjXiyYwXrTEGNzcUIgk2J3UhZ8XVxMQaqQmVzR8wRO/dv9TSHQD3F+Tc\r\nSoCGHx79r1a3CuS1HPU85qOUGJP8vE9JxE7QWJ+fb9LtmBO0zDUrnr3wqcTy\r\n8K2wP6rfdsy6DbyL1jTpApcZ6o59QxEjfKNOuXa80udeL/DmoSdDyVx6iFxo\r\nEU1tV9Y4l2fotJja2wiRqyweBbKzYHQf9OcD3heT0INKzY5z9xEWo3ksv1Hr\r\n+eJfzbGCuM0WxTbCupn6PtiXETf6IK7v22YAlY3jLT/DHl02G0+0UnVzrCOS\r\nmwUz3KUMtAhyiYjgFhXmaPE+K2lGjxSvsOjP+qIfVpEXVxkeBEdaR0+ihYuf\r\nb/WUIszQeZML4IAfYEmoCxSrr7t0pnLUx9wjreggT/IN1t+m0QyrtagcoCU1\r\nKH+pc99ehuaGZvsqrXATWzgM3pADG5hzs9Po78tEBTv2wGDJontflJS/V8o1\r\nrGfYRliQCwhEapeJycKUmMoEC+98n4QJhio=\r\n=2aqh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lx376693576","email":"376693576@qq.com"},"directories":{},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-puzzle-vcode_1.1.10_1669898697775_0.9983330352754147"},"_hasShrinkwrap":false}},"time":{"created":"2018-12-20T06:07:06.153Z","1.0.0":"2018-12-20T06:07:06.387Z","modified":"2022-12-01T12:44:58.077Z","1.0.1":"2018-12-21T03:41:35.639Z","0.1.0":"2019-02-14T02:34:31.997Z","1.0.2":"2019-02-14T02:41:16.817Z","1.0.3":"2019-02-14T04:18:59.102Z","1.0.4":"2019-02-22T15:39:52.739Z","1.0.5":"2019-02-26T03:13:57.172Z","1.0.6":"2019-04-04T07:20:48.581Z","1.0.7-beta":"2019-09-23T05:35:30.041Z","1.0.7-beta1":"2019-09-23T07:07:18.180Z","1.0.7-beta2":"2019-09-23T07:21:20.750Z","1.0.7-beta3":"2019-09-23T07:32:33.528Z","1.0.7":"2019-09-23T07:41:07.586Z","1.0.8-beta":"2020-03-16T11:58:09.959Z","1.0.8-beta2":"2020-03-16T12:05:43.742Z","1.0.9":"2020-03-16T12:08:20.154Z","1.0.9-beta":"2020-03-16T12:14:48.002Z","1.0.9-beta2":"2020-03-16T12:22:05.509Z","1.0.9-beta3":"2020-03-16T12:24:19.901Z","1.0.9-beta4":"2020-03-16T12:34:09.745Z","1.0.9-beta5":"2020-03-16T13:14:11.122Z","1.0.9-beta6":"2020-03-16T13:18:55.186Z","1.1.0":"2020-03-16T13:21:05.087Z","1.1.1":"2020-03-20T04:11:48.136Z","1.1.1-beta":"2020-03-23T05:02:59.908Z","1.1.2":"2020-03-23T05:06:58.531Z","1.1.2-beta":"2020-05-03T03:00:22.447Z","1.1.2-beta2":"2020-05-03T03:53:58.239Z","1.1.2-beta3":"2020-05-03T04:43:39.124Z","1.1.2-beta4":"2020-05-03T04:51:56.183Z","1.1.3":"2020-05-03T05:02:38.907Z","1.1.4":"2020-09-10T08:14:46.154Z","1.1.5":"2021-02-09T07:22:08.937Z","1.1.6":"2021-10-12T03:13:22.927Z","1.1.7":"2021-10-12T03:21:19.585Z","1.1.8":"2021-10-13T09:02:58.387Z","1.1.9":"2021-10-18T08:29:02.240Z","1.1.10":"2022-12-01T12:44:58.000Z"},"maintainers":[{"name":"lx376693576","email":"376693576@qq.com"}],"description":"vue 滑动拼图验证码","homepage":"https://github.com/javaLuo/vue-puzzle-vcode#readme","keywords":["vue","puzzle","vcode"],"repository":{"type":"git","url":"git+https://github.com/javaLuo/vue-puzzle-vcode.git"},"author":{"name":"L"},"bugs":{"url":"https://github.com/javaLuo/vue-puzzle-vcode/issues"},"license":"ISC","readme":"# vue-puzzle-vcode [![npm](https://img.shields.io/npm/v/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode) [![npm downloads](https://img.shields.io/npm/dt/vue-puzzle-vcode.svg)](https://www.npmjs.com/package/vue-puzzle-vcode)\r\n\r\nVue 纯前端的拼图人机验证、右滑拼图验证<br/> 我知道有第 3 方的很好用,比如 GEETEST\r\n的拼图验证，但要引入 SDK 跟后台配合，还有接口交互。<br/> 太麻烦了，有时候突然改需求来不及弄，为了应付老板，就弄了个纯前端的随便验一下得了。\r\n\r\n**DEMO**: https://isluo.com/work/vue-puzzle-vcode/\r\n\r\n![img](public/demo.gif)\r\n\r\n\r\n### [Vue3.x的使用文档在这](README3.md)\r\n### 以下为Vue2.x使用文档<br/>\r\n\r\n\r\n### 安装\r\n\r\n```node\r\n  npm install vue-puzzle-vcode --save\r\n```\r\n\r\n### 使用\r\n\r\n```vue\r\nimport Vcode from \"vue-puzzle-vcode\";\r\n\r\n<Vcode :show=\"isShow\" @success=\"onSuccess\" @close=\"onClose\" />\r\n```\r\n\r\n### IE\r\n\r\n我没加`babel-polyfill`,所以在 IE 里会报错：`SCRIPT1002: 语法错误`（IE 不支持箭头\r\n函数）<br/> 需要兼容 IE 的朋友，请直接复制`src/app.vue`和`src/assets`这两个东西\r\n到自己的项目里，给`app.vue`随便改个名字，就是个普通 vue 组件，直接用即可。<br/>\r\n`src/assets`里是一张小图片，`app.vue`中有引用，注意自己匹配一下引用路径\r\n\r\n### 最简单例子\r\n\r\n```vue\r\n<template>\r\n  <div>\r\n    <Vcode :show=\"isShow\" @success=\"onSuccess\" @close=\"onClose\" />\r\n    <button @click=\"submit\">开始验证</button>\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nimport Vcode from \"vue-puzzle-vcode\";\r\nexport default {\r\n  data() {\r\n    return {\r\n      isShow: false,\r\n    };\r\n  },\r\n  components: {\r\n    Vcode,\r\n  },\r\n  methods: {\r\n    submit() {\r\n      this.isShow = true;\r\n    },\r\n\r\n    onSuccess(msg) {\r\n      this.isShow = false; // 通过验证后，需要手动关闭模态框\r\n    },\r\n\r\n    onClose() {\r\n      this.isShow = false;\r\n    },\r\n  },\r\n};\r\n</script>\r\n```\r\n\r\n### 参数\r\n\r\n| 字段         | 类型    | 默认值             | 说明                                                                          |\r\n| ------------ | ------- | ------------------ | ----------------------------------------------------------------------------- |\r\n| show         | Boolean | false              | 是否显示验证码弹框                                                            |\r\n| canvasWidth  | Number  | 310                | 主图区域的宽度，单位 px                                                       |\r\n| canvasHeight | Number  | 160                | 主图区域的高度，单位 px                                                       |\r\n| puzzleScale  | Number  | 1                  | 拼图块(小的拼图)的大小比例，0.2 ～ 2 ，数字越大，拼图越大                     |\r\n| sliderSize   | Number  | 50                 | 左下角用户拖动的那个滑块的尺寸，单位 px                                       |\r\n| range        | Number  | 10                 | 判断成功的误差范围，单位 px, 滑动的距离和拼图的距离小于等于此值时，会判定重合 |\r\n| imgs         | Array   | null               | 自定义图片，见下方例子                                                        |\r\n| successText  | String  | \"验证通过！\"       | 验证成功时的提示文字                                                          |\r\n| failText     | String  | \"验证失败，请重试\" | 验证失败时的提示文字                                                          |\r\n| sliderText   | String  | \"拖动滑块完成拼图\" | 下方滑动条里的文字                                                            |\r\n\r\n### 事件\r\n\r\n| 事件名  | 返回值 | 说明                                                          |\r\n| ------- | ------ | ------------------------------------------------------------- |\r\n| success | 偏差值 | 验证通过时会触发，返回值是用户移动的距离跟目标距离的偏差值 px |\r\n| fail    | 偏差值 | 验证失败时会触发，返回值同上                                  |\r\n| close   | null   | 用户点击遮罩层的回调                                          |\r\n\r\n### 自定义图片\r\n\r\n```vue\r\n<template>\r\n  <Vcode :imgs=\"[Img1, Img2]\" />\r\n</template>\r\n\r\n<script>\r\nimport Img1 from \"~/assets/img1.png\";\r\nimport Img2 from \"~/assets/img2.png\";\r\n\r\nexport default {\r\n  data() {\r\n    return {\r\n      Img1,\r\n      Img2,\r\n    };\r\n  },\r\n};\r\n</script>\r\n```\r\n\r\n- 也可以是网络图片完整 URL 路径，但注意图片跨域问题，因为 canvas api 无法对跨域的图片进行操作\r\n\r\n\r\n### 说明\r\n\r\n- 当不传递 imgs 字段或图片加载出错时，会自动生成随机图片\r\n- 模态框的显示和隐藏完全由父级控制，所以用户通过验证后，需要手动隐藏模态框\r\n\r\n### 更新日志\r\n2021/10/18 - 1.1.9<br/>\r\n- 修复：修复了在判定状态还未刷新时关闭模态框，重新打开不刷新的问题\r\n\r\n2021/10/13 - 1.1.8<br/>\r\n- 修复：解决了一个在safari中无法显示拼图块的问题（safari drawImage看起来像是异步操作）\r\n\r\n2021/10/12 - 1.1.7<br/>\r\n- 修复：重复加载图片的问题\r\n- 修复：png图片的透明部分现在会用白色填充\r\n- 更新：初始化时不再自动加载图片，直到show出来时再加载\r\n- 更新：去掉了无用的id属性\r\n","readmeFilename":"README.md"}