Your Name 2 년 전
부모
커밋
3ee651e2f9
3개의 변경된 파일26개의 추가작업 그리고 14개의 파일을 삭제
  1. 23
    14
      src/components/Image.vue
  2. 2
    0
      src/components/QrCode.vue
  3. 1
    0
      src/pages/makeSaving/index.vue

+ 23
- 14
src/components/Image.vue 파일 보기

1
 <template>
1
 <template>
2
-  <img class="page-image" :src="src" alt="" @load="onLoad">
3
-  <template v-if="actions">
4
-    <CoverBtn
5
-      v-for="(action, inx) in actions"
6
-      :key="inx"
7
-      :center="centers[inx]"
8
-      :width="action.width"
9
-      :height="action.height"
10
-      @click="action.onClick"
11
-    />
12
-  </template>
2
+  <div class="img-wrapper">
3
+    <img class="page-image" :src="src" alt="" @load="onLoad">
4
+    <template v-if="actions">
5
+      <CoverBtn
6
+        v-for="(action, inx) in actions"
7
+        :key="inx"
8
+        :center="centers[inx]"
9
+        :width="action.width"
10
+        :height="action.height"
11
+        @click="action.onClick"
12
+      />
13
+    </template>
14
+  </div>
13
 </template>
15
 </template>
14
 
16
 
15
 <script setup>
17
 <script setup>
41
 </script>
43
 </script>
42
 
44
 
43
 <style lang="less" scoped>
45
 <style lang="less" scoped>
44
-.page-image {
45
-  display: block;
46
-  width: 100%;
46
+
47
+.img-wrapper {
48
+  position: relative;
49
+
50
+  .page-image {
51
+    display: block;
52
+    width: 100%;
53
+  }
54
+
47
 }
55
 }
56
+
48
 </style>
57
 </style>

+ 2
- 0
src/components/QrCode.vue 파일 보기

25
   max-width: 1px;
25
   max-width: 1px;
26
   max-height: 1px;
26
   max-height: 1px;
27
   overflow: hidden;
27
   overflow: hidden;
28
+  top: -1000px;
29
+  left: -1000px;
28
   // z-index: 1000;
30
   // z-index: 1000;
29
 
31
 
30
   .qrcode {
32
   .qrcode {

+ 1
- 0
src/pages/makeSaving/index.vue 파일 보기

65
   };
65
   };
66
 
66
 
67
   const onLoad = (e) => {
67
   const onLoad = (e) => {
68
+    console.log('---------')
68
     const { width, height, naturalHeight, naturalWidth } = e.target;
69
     const { width, height, naturalHeight, naturalWidth } = e.target;
69
     const xRate = width / naturalWidth;
70
     const xRate = width / naturalWidth;
70
     const yRate = height / naturalHeight;
71
     const yRate = height / naturalHeight;