Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
fdafddfc
Commit
fdafddfc
authored
Oct 23, 2024
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传限制大小
parent
c79bf644
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
src/components/UploadImage.vue
+9
-1
No files found.
src/components/UploadImage.vue
View file @
fdafddfc
...
...
@@ -27,7 +27,10 @@
>
{{
item
?.
filename
||
filename
(
item
.
path
)
}}
</span>
<el-icon
v-if=
"!disabled"
style=
"cursor: pointer"
@
click=
"removeFile(i)"
<el-icon
v-if=
"!disabled"
style=
"cursor: pointer"
@
click=
"removeFile(i)"
><Close
/></el-icon>
</li>
...
...
@@ -84,6 +87,11 @@ const onChange = async (e: Event) => {
const
files
=
(
e
.
target
as
HTMLInputElement
).
files
if
(
!
files
)
return
const
file
=
files
[
0
]
let
isLtTenM
=
file
.
size
/
1024
/
1024
<
100
;
if
(
!
isLtTenM
)
{
ElMessage
.
error
(
"上传文件大小不能超过 200MB!"
);
return
isLtTenM
;
}
if
(
props
.
imageMode
)
{
imageUpload
(
file
)
}
else
{
...
...
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