Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
tea-resources-web
Commits
cfdc1d79
Commit
cfdc1d79
authored
Jun 27, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传限制完善
parent
0723d45d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
1 deletion
+18
-1
index.vue
src/views/contentManagement/banner/index.vue
+13
-1
index.vue
src/views/contentManagement/centralCase/info/index.vue
+1
-0
index.vue
src/views/contentManagement/competitionSupport/index.vue
+1
-0
index.vue
src/views/contentManagement/developmentCourse/index.vue
+1
-0
index.vue
src/views/contentManagement/newsInformation/info/index.vue
+1
-0
index.vue
src/views/courseInformation/lecturerManagement/index.vue
+1
-0
No files found.
src/views/contentManagement/banner/index.vue
View file @
cfdc1d79
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
<el-upload
<el-upload
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
action=
"#"
accept=
".png,.jpg,.jpeg,.PNG,.JPG,.JPEG"
:http-request=
"handleUpload"
:http-request=
"handleUpload"
:show-file-list=
"false"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:on-success=
"handleAvatarSuccess"
...
@@ -331,6 +331,18 @@ export default {
...
@@ -331,6 +331,18 @@ export default {
},
},
beforeAvatarUpload
(
file
)
{
beforeAvatarUpload
(
file
)
{
// this.file = file
// this.file = file
// 判断文件是否为图片类型
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'只能上传图片格式的文件!'
)
return
false
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传图片大小不能超过 2MB!'
)
return
false
}
this
.
file
=
file
},
},
step
(
index
)
{
step
(
index
)
{
...
...
src/views/contentManagement/centralCase/info/index.vue
View file @
cfdc1d79
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
]"
]"
>
>
<el-upload
<el-upload
accept=
".png,.jpg,.jpeg,.PNG,.JPG,.JPEG"
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
action=
"#"
:http-request=
"handleUpload"
:http-request=
"handleUpload"
...
...
src/views/contentManagement/competitionSupport/index.vue
View file @
cfdc1d79
...
@@ -165,6 +165,7 @@
...
@@ -165,6 +165,7 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"封面:"
prop=
"contestPicture"
>
<el-form-item
label=
"封面:"
prop=
"contestPicture"
>
<el-upload
<el-upload
accept=
".png,.jpg,.jpeg,.PNG,.JPG,.JPEG"
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
action=
"#"
:http-request=
"handleUpload"
:http-request=
"handleUpload"
...
...
src/views/contentManagement/developmentCourse/index.vue
View file @
cfdc1d79
...
@@ -189,6 +189,7 @@
...
@@ -189,6 +189,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"图片:"
prop=
"url"
>
<el-form-item
label=
"图片:"
prop=
"url"
>
<el-upload
<el-upload
accept=
".png,.jpg,.jpeg,.PNG,.JPG,.JPEG"
:show-file-list=
"false"
:show-file-list=
"false"
list-type=
"picture-card"
list-type=
"picture-card"
action=
"#"
action=
"#"
...
...
src/views/contentManagement/newsInformation/info/index.vue
View file @
cfdc1d79
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"封面:"
>
<el-form-item
label=
"封面:"
>
<el-upload
<el-upload
accept=
".png,.jpg,.jpeg,.PNG,.JPG,.JPEG"
:disabled=
"secondFromDisabled"
:disabled=
"secondFromDisabled"
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
action=
"#"
...
...
src/views/courseInformation/lecturerManagement/index.vue
View file @
cfdc1d79
...
@@ -162,6 +162,7 @@
...
@@ -162,6 +162,7 @@
v-model=
"form.avatarId"
v-model=
"form.avatarId"
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
action=
"#"
accept=
".png,.jpg,.jpeg,.PNG,.JPG,.JPEG"
:show-file-list=
"false"
:show-file-list=
"false"
:file-list=
"photoList"
:file-list=
"photoList"
:on-change=
"changePhotoFile"
:on-change=
"changePhotoFile"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment