rk
2025-09-29 e067f714c0588407b1c20ddd6b7af3b2043e35f8
admin/src/components/common/ImageCropper.vue
@@ -13,8 +13,8 @@
              :canMove="options.canMove"
              :output-size="options.outputSize"
              :centerBox="options.centerBox"
              :autoCropWidth="options.autoCropWidth"
              :autoCropHeight="options.autoCropHeight"
              :autoCropWidth="autoCrop.width || options.autoCropWidth"
              :autoCropHeight="autoCrop.height || options.autoCropHeight"
              @realTime="realTime"
          ></vue-cropper>
        </div>
@@ -28,7 +28,7 @@
<script>
import { VueCropper } from 'vue-cropper'
import {upload} from "@/api/system/common";
import { upload } from '@/api/system/common'
export default {
  name: 'ImageCropper',
  components: { VueCropper },
@@ -36,6 +36,12 @@
    imgSrc: {
      type: String,
      default: ''
    },
    autoCrop: {
      type: Object,
      default () {
        return { width: 500, height: 500 }
      }
    },
    // 回显上次保存的截图的位置
    location: {
@@ -76,7 +82,7 @@
        centerBox: true,
        height: 500,
        width: 500,
        outputSize:{width: 500, height: 500 },
        outputSize: 1,
        autoCropWidth: 500,
        autoCropHeight: 500,
        fixed: true,