瀏覽代碼

分享图片白边

yuany 3 年之前
父節點
當前提交
9e977e5686
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/components/Post.vue

+ 2 - 0
src/components/Post.vue

@@ -208,6 +208,8 @@ export default {
                 useCORS: true,
                 useCORS: true,
                 allowTaint: true,
                 allowTaint: true,
                 backgroundColor: null,
                 backgroundColor: null,
+                width: this.$refs.post.offsetWidth - 1,
+                height: this.$refs.post.offsetHeight - 1,
                 scale: 3
                 scale: 3
             }).then(canvas => {
             }).then(canvas => {
                 this.$toast.clear();
                 this.$toast.clear();