【更新】头像剪裁组件增加默认剪裁宽度和高度属性

pull/284/head
xuyuxiang 2025-09-14 21:29:41 +08:00
parent f4d875ae3c
commit b0b2d67fce
1 changed files with 11 additions and 3 deletions

View File

@ -85,7 +85,15 @@
circle: { circle: {
type: Boolean, type: Boolean,
default: () => false default: () => false
} },
autoCropWidth: {
type: Number,
default: () => 100
},
autoCropHeight: {
type: Number,
default: () => 100
},
}) })
const emit = defineEmits({ successful: null }) const emit = defineEmits({ successful: null })
const visible = ref(false) const visible = ref(false)
@ -99,8 +107,8 @@
original: false, original: false,
canMoveBox: true, canMoveBox: true,
autoCrop: true, autoCrop: true,
autoCropWidth: 200, autoCropWidth: props.autoCropWidth,
autoCropHeight: 200, autoCropHeight: props.autoCropHeight,
centerBox: false, centerBox: false,
high: false, high: false,
cropData: {}, cropData: {},