panhui 4 năm trước cách đây
mục cha
commit
9a384c3641
2 tập tin đã thay đổi với 13 bổ sung3 xóa
  1. 11 1
      src/components/Post.vue
  2. 2 2
      src/components/product/ProductBanner.vue

+ 11 - 1
src/components/Post.vue

@@ -45,7 +45,9 @@
                     </div>
                 </div>
 
-                <div class="tips">长按图片保存</div>
+                <div class="btn" @click.stop="">
+                    <van-button type="primary" round @click="save">点击保存到本地</van-button>
+                </div>
             </div>
         </van-overlay>
         <div class="share" v-if="!noButton" @click="init">
@@ -186,6 +188,10 @@ export default {
             ctx.drawImage(img, 0, 0, img.width, img.height);
             let dataURL = canvas.toDataURL('image/png');
             return dataURL;
+        },
+        save() {
+            // if (window.cordova) {
+            // }
         }
     }
 };
@@ -369,4 +375,8 @@ export default {
         }
     }
 }
+
+.btn {
+    padding: 30px;
+}
 </style>

+ 2 - 2
src/components/product/ProductBanner.vue

@@ -32,10 +32,10 @@
                     {{ info.likes }}
                 </like-button>
 
-                <div class="share-icon" :class="{ shareLeft: pageType === 'product' }" @click="share" v-if="isShare">
+                <!-- <div class="share-icon" :class="{ shareLeft: pageType === 'product' }" @click="share" v-if="isShare">
                     <img src="@assets/svgs/icon-fenxiang.svg" alt="" />
                     <span>分享</span>
-                </div>
+                </div> -->
             </div>
         </div>