修改了类型错误提示
This commit is contained in:
parent
82146f266d
commit
1adbc1f469
@ -312,6 +312,8 @@ export default {
|
|||||||
querentuichu: "You confirm to exit?",
|
querentuichu: "You confirm to exit?",
|
||||||
huobitishi: "Attention! You can only change the currency once!",
|
huobitishi: "Attention! You can only change the currency once!",
|
||||||
zhuanmazhong: "Transcoding in",
|
zhuanmazhong: "Transcoding in",
|
||||||
|
leixingcuowu:"File type error",
|
||||||
|
zuida:"maximum",
|
||||||
shichangtishi:"",
|
shichangtishi:"",
|
||||||
renshutishi: '',
|
renshutishi: '',
|
||||||
tixianzhu: "",
|
tixianzhu: "",
|
||||||
|
@ -312,6 +312,8 @@ export default {
|
|||||||
querentuichu: "您确认退出?",
|
querentuichu: "您确认退出?",
|
||||||
huobitishi: "请注意,货币一旦修改,不能变动。",
|
huobitishi: "请注意,货币一旦修改,不能变动。",
|
||||||
zhuanmazhong: "转码中",
|
zhuanmazhong: "转码中",
|
||||||
|
leixingcuowu:"文件类型错误",
|
||||||
|
zuida:"最大",
|
||||||
shichangtishi:"",
|
shichangtishi:"",
|
||||||
renshutishi: '',
|
renshutishi: '',
|
||||||
tixianzhu:"",
|
tixianzhu:"",
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import { geti18n } from './i18n';
|
||||||
|
const lan = geti18n()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片转Base64
|
* 图片转Base64
|
||||||
@ -68,7 +70,7 @@ export function provenimg(file: any): boolean | void{
|
|||||||
console.log(ntype)
|
console.log(ntype)
|
||||||
const size = 2 * 1024 * 1024;
|
const size = 2 * 1024 * 1024;
|
||||||
if(file.size > size){
|
if(file.size > size){
|
||||||
message.error("最大2MB")
|
message.error(lan.$t('zuida') + "2MB")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let istype = false
|
let istype = false
|
||||||
@ -93,13 +95,13 @@ export function provenvideo(file: any, isvideo?: boolean): boolean{
|
|||||||
if(isvideo){
|
if(isvideo){
|
||||||
const size = 500 * 1024 * 1024;
|
const size = 500 * 1024 * 1024;
|
||||||
if(file.size > size){
|
if(file.size > size){
|
||||||
message.error("最大500MB")
|
message.error(lan.$t('zuida') + "500MB")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
const size = 100 * 1024 * 1024;
|
const size = 100 * 1024 * 1024;
|
||||||
if(file.size > size){
|
if(file.size > size){
|
||||||
message.error("最大100MB")
|
message.error(lan.$t('zuida') + "100MB")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,5 +110,6 @@ export function provenvideo(file: any, isvideo?: boolean): boolean{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
message.error(lan.$t("leixingcuowu"))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user