소스 검색

Integrate qrcode.vue for QR code generation in QrCode component, update package.json and yarn.lock to include the new dependency.

0es 4 달 전
부모
커밋
aab6a11557
5개의 변경된 파일15개의 추가작업 그리고 12개의 파일을 삭제
  1. 9 12
      app/components/popup/QrCode.vue
  2. 1 0
      package.json
  3. BIN
      public/favicon.ico
  4. BIN
      public/logo.png
  5. 5 0
      yarn.lock

+ 9 - 12
app/components/popup/QrCode.vue

@@ -1,5 +1,6 @@
 <script setup lang="ts">
 import { useQrCodePopup } from '~/composables/useQrCodePopup'
+import QrcodeVue from 'qrcode.vue'
 
 const {
   state,
@@ -166,9 +167,14 @@ const handleAmountInput = (event: Event) => {
         <!-- QR container (placeholder) -->
         <div class="qr-popup__qr-wrapper">
           <div class="qr-popup__qr-card">
-            <div class="qr-popup__qr-inner">
-              <!-- QR code placeholder area, you can replace with real QR component -->
-            </div>
+            <qrcode-vue
+              :value="`testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest`"
+              :size="145"
+              :gradient="true"
+              :gradient-start-color="`#4ED2FF`"
+              :gradient-end-color="`#B1EF5D`"
+              :image-settings="{ src: 'logo.png', height: 24, width: 24, excavate: true }"
+            />
           </div>
         </div>
 
@@ -327,15 +333,6 @@ const handleAmountInput = (event: Event) => {
     justify-content: center;
   }
 
-  &__qr-inner {
-    width: 145px;
-    height: 145px;
-    border-radius: 12px;
-    border: 6px solid #ffffff;
-    background-color: #f1f2f5;
-    overflow: hidden;
-  }
-
   &__price-row {
     display: flex;
     align-items: center;

+ 1 - 0
package.json

@@ -19,6 +19,7 @@
     "crypto-js": "^4.2.0",
     "nuxt": "^4.2.1",
     "pinia": "^3.0.4",
+    "qrcode.vue": "^3.6.0",
     "tailwindcss": "^4.1.17",
     "uuid": "^13.0.0",
     "v-viewer": "^3.0.22",

BIN
public/favicon.ico


BIN
public/logo.png


+ 5 - 0
yarn.lock

@@ -5637,6 +5637,11 @@ punycode@^2.1.0:
   resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
   integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
 
+qrcode.vue@^3.6.0:
+  version "3.6.0"
+  resolved "https://registry.yarnpkg.com/qrcode.vue/-/qrcode.vue-3.6.0.tgz#d940fe96712922232aa19892bdd68793e62c73e7"
+  integrity sha512-vQcl2fyHYHMjDO1GguCldJxepq2izQjBkDEEu9NENgfVKP6mv/e2SU62WbqYHGwTgWXLhxZ1NCD1dAZKHQq1fg==
+
 quansync@^0.2.11:
   version "0.2.11"
   resolved "https://registry.yarnpkg.com/quansync/-/quansync-0.2.11.tgz#f9c3adda2e1272e4f8cf3f1457b04cbdb4ee692a"