index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta
  6. name="viewport"
  7. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
  8. />
  9. <meta name="apple-mobile-web-app-capable" content="yes" />
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  11. <title>qrcode.vue - A Vue.js component for QRCode</title>
  12. <meta name="author" content="@scopewu" />
  13. <meta name="Keywords" content="qrcode.vue,qrcode,component" />
  14. <meta
  15. name="description"
  16. content="qrcode.vue - A Vue.js component for QRCode."
  17. />
  18. <link
  19. rel="stylesheet"
  20. href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css"
  21. integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE="
  22. crossorigin="anonymous"
  23. />
  24. <style>
  25. body {
  26. font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
  27. 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
  28. 'Microsoft YaHei', SimSun, sans-serif;
  29. color: #333;
  30. }
  31. .fork {
  32. width: 150px;
  33. height: 150px;
  34. position: absolute;
  35. top: 0;
  36. right: 0;
  37. }
  38. .fork img {
  39. max-width: 100%;
  40. }
  41. @media screen and (min-width: 768px) {
  42. .container-fluid {
  43. max-width: 798px;
  44. }
  45. }
  46. @media screen and (max-width: 470px) {
  47. h1 {
  48. font-size: 26px;
  49. }
  50. .fork {
  51. width: 120px;
  52. height: 120px;
  53. }
  54. }
  55. </style>
  56. <script
  57. src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"
  58. integrity="sha256-chlNFSVx3TdcQ2Xlw7SvnbLAavAQLO0Y/LBiWX04viY="
  59. crossorigin="anonymous"
  60. ></script>
  61. <script src="https://cdn.jsdelivr.net/npm/qrcode.vue@1.7.0/dist/qrcode.vue.min.js"></script>
  62. </head>
  63. <body>
  64. <div class="container-fluid">
  65. <div class="page-header">
  66. <h1>qrcode.vue</h1>
  67. <div>
  68. <!-- Place this tag where you want the button to render. -->
  69. <a
  70. class="github-button"
  71. href="https://github.com/scopewu/qrcode.vue"
  72. data-show-count="true"
  73. aria-label="Star qrcode.vue on GitHub"
  74. >Star</a
  75. >
  76. </div>
  77. </div>
  78. <div id="root"></div>
  79. </div>
  80. <div class="fork">
  81. <a href="https://github.com/scopewu/qrcode.vue">
  82. <img src="./assets/img/fork-me-on-github.svg" alt="fork me on github" />
  83. </a>
  84. </div>
  85. <script>
  86. new Vue({
  87. el: '#root',
  88. data: {
  89. value: 'https://example.com',
  90. size: 100,
  91. level: 'L',
  92. background: '#ffffff',
  93. foreground: '#000000',
  94. renderAs: 'svg',
  95. },
  96. template:
  97. '<form class="form-horizontal"><div class="form-group"><label class="col-sm-2 control-label">Value:</label><div class="col-sm-10"><textarea v-model="value" class="form-control" rows="3"></textarea></div></div><div class="form-group"><label class="col-sm-2 control-label">Size:</label><div class="col-sm-10"><div class="form-control-static"><input type="range" v-model="size" min="100" max="800" step="20"></div></div></div><div class="form-group"><label class="col-sm-2 control-label">Level:</label><div class="col-sm-10"><select v-model="renderAs" class="form-control"><option value="svg">svg</option><option value="canvas">canvas</option></select></div></div><div class="form-group"><label class="col-sm-2 control-label">Level:</label><div class="col-sm-10"><select v-model="level" class="form-control"><option value="L">L</option><option value="Q">Q</option><option value="M">M</option><option value="H">H</option></select></div></div><div class="form-group"><label class="col-sm-2 control-label">Background:</label><div class="col-sm-10"><div class="form-control-static"><input type="color" v-model="background"></div></div></div><div class="form-group"><label class="col-sm-2 control-label">Foreground:</label><div class="col-sm-10"><div class="form-control-static"><input type="color" v-model="foreground"></div></div></div><div class="form-group"><label class="col-sm-2 control-label">QR_CODE:</label><div class="col-sm-10"><div class="form-control-static"><qrcode-vue class="qrcode" :value="value" :renderAs="renderAs" :size="size" :level="level" :background="background" :foreground="foreground"></div></div></div></form>',
  98. components: {
  99. QrcodeVue,
  100. },
  101. })
  102. </script>
  103. </body>
  104. <script async defer src="https://buttons.github.io/buttons.js"></script>
  105. </html>