mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +08:00
Merge 3716590b2fda2bee531563b5d26611a6798d0c79 into 6858a9ad67483025f6a9432a926beb9327037be3
This commit is contained in:
commit
0c12d607fa
@ -225,6 +225,7 @@ export default {
|
||||
}
|
||||
},
|
||||
data() {
|
||||
let fileName
|
||||
const { imgFormat, langType, langExt, width, height } = this
|
||||
let isSupported = true
|
||||
const allowImgFormat = ['jpg', 'png']
|
||||
@ -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
|
||||
@ -773,7 +775,8 @@ export default {
|
||||
fmData.append(
|
||||
field,
|
||||
data2blob(createImgUrl, mime),
|
||||
field + '.' + imgFormat
|
||||
//field + '.' + imgFormat
|
||||
this.fileName + '.' + imgFormat
|
||||
)
|
||||
// 添加其他参数
|
||||
if (typeof params === 'object' && params) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user