Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/ImageCropper/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default {
}
},
data() {
let fileName
const { imgFormat, langType, langExt, width, height } = this
let isSupported = true
const allowImgFormat = ['jpg', 'png']
Expand Down Expand Up @@ -478,6 +479,7 @@ export default {
},
// 设置图片源
setSourceImg(file) {
this.fileName = file.name.substr(0,file.name.lastIndexOf('.'))
const fr = new FileReader()
fr.onload = e => {
this.sourceImgUrl = fr.result
Expand Down Expand Up @@ -773,7 +775,8 @@ export default {
fmData.append(
field,
data2blob(createImgUrl, mime),
field + '.' + imgFormat
//field + '.' + imgFormat
this.fileName + '.' + imgFormat
)
// 添加其他参数
if (typeof params === 'object' && params) {
Expand Down