[update] 上传文件的限制文件名长度截取修改
This commit is contained in:
@@ -345,7 +345,7 @@ export default {
|
||||
doBeforeUpload (file) {
|
||||
this.uploadGoOn = true
|
||||
file.uploadGoOn = true
|
||||
if (file.name.split('.')[0].length > 30) {
|
||||
if (file.name.substring(0, file.name.lastIndexOf('.')).length > 30) {
|
||||
this.$message.warning(this.$t('uploadFile.fileNameOverlong'))
|
||||
this.uploadGoOn = false
|
||||
file.uploadGoOn = false
|
||||
|
||||
@@ -313,7 +313,7 @@ export default {
|
||||
console.log('--------file', file)
|
||||
this.uploadGoOn = true
|
||||
file.uploadGoOn = true
|
||||
if (file.name.split('.')[0].length > 30) {
|
||||
if (file.name.substring(0, file.name.lastIndexOf('.')).length > 30) {
|
||||
this.$message.warning(this.$t('uploadFile.fileNameOverlong'))
|
||||
this.uploadGoOn = false
|
||||
file.uploadGoOn = false
|
||||
|
||||
Reference in New Issue
Block a user