jiangping
2024-06-12 bd305e527234bf1af5ed0f23b1c9f940083a23bc
admin/src/components/common/ImageCropper.vue
@@ -6,9 +6,12 @@
          <vue-cropper
              ref="cropper"
              :img="imgSrc"
              :width="options.width"
              :height="options.height"
              :canScale="options.canScale"
              :autoCrop="options.autoCrop"
              :canMove="options.canMove"
              :output-size="options.outputSize"
              :centerBox="options.centerBox"
              :autoCropWidth="options.autoCropWidth"
              :autoCropHeight="options.autoCropHeight"
@@ -17,11 +20,6 @@
        </div>
        <div class="previews">
          <img style="width: 100px;height: 100px;border-radius: 50%;object-fit: cover" :src="cutImgSrc" alt="图片">
          <!--          <el-image-->
          <!--            v-if="cutImgSrc"-->
          <!--            style="width: 100px; height: 100px;vertical-align: middle;border-radius: 50%;"-->
          <!--            :src="cutImgSrc"-->
          <!--            fit="fill"></el-image>-->
        </div>
      </div>
    </div>
@@ -76,8 +74,11 @@
        autoCrop: true,
        canMove: false,
        centerBox: true,
        autoCropWidth: 200,
        autoCropHeight: 200,
        height: 300,
        width: 300,
        outputSize:{width: 300, height: 300},
        autoCropWidth: 300,
        autoCropHeight: 300,
        fixed: true,
        fixedNumber: [1, 1]
      },