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
91b90092
Commit
91b90092
authored
Oct 24, 2024
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 问题修改
parent
a4d37aa0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
src/components/UploadImage.vue
+2
-3
No files found.
src/components/UploadImage.vue
View file @
91b90092
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
import
{
computed
,
ref
,
watch
}
from
'vue'
import
{
computed
,
ref
,
watch
}
from
'vue'
import
{
Plus
,
Close
}
from
'@element-plus/icons-vue'
import
{
Plus
,
Close
}
from
'@element-plus/icons-vue'
import
{
uploadImageApi
,
uploadFileApi
}
from
'@/api/common'
import
{
uploadImageApi
,
uploadFileApi
}
from
'@/api/common'
import
{
getFilePath
}
from
'@/api/axios'
const
props
=
defineProps
({
const
props
=
defineProps
({
modelValue
:
String
,
modelValue
:
String
,
disabled
:
Boolean
,
disabled
:
Boolean
,
...
@@ -87,7 +86,7 @@ const onChange = async (e: Event) => {
...
@@ -87,7 +86,7 @@ const onChange = async (e: Event) => {
const
files
=
(
e
.
target
as
HTMLInputElement
).
files
const
files
=
(
e
.
target
as
HTMLInputElement
).
files
if
(
!
files
)
return
if
(
!
files
)
return
const
file
=
files
[
0
]
const
file
=
files
[
0
]
le
t
isLtTenM
=
file
.
size
/
1024
/
1024
<
100
;
cons
t
isLtTenM
=
file
.
size
/
1024
/
1024
<
100
;
if
(
!
isLtTenM
)
{
if
(
!
isLtTenM
)
{
ElMessage
.
error
(
"上传文件大小不能超过 200MB!"
);
ElMessage
.
error
(
"上传文件大小不能超过 200MB!"
);
return
isLtTenM
;
return
isLtTenM
;
...
@@ -146,7 +145,7 @@ const filename = (path: string) => {
...
@@ -146,7 +145,7 @@ const filename = (path: string) => {
}
}
const
downloadFile
=
(
item
:
FileItem
)
=>
{
const
downloadFile
=
(
item
:
FileItem
)
=>
{
window
.
open
(
getFilePath
()
+
item
.
path
)
window
.
open
(
item
.
path
)
}
}
const
removeFile
=
(
i
:
number
)
=>
{
const
removeFile
=
(
i
:
number
)
=>
{
files
.
value
.
splice
(
i
,
1
)
files
.
value
.
splice
(
i
,
1
)
...
...
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