Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2239205b
authored
2023-07-28 14:22:01 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
32f61336
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
src/views/components/imagePreview.vue
src/views/components/imagePreview.vue
View file @
2239205
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-
04 16:07:3
7
* @LastEditTime: 2023-07-
28 14:20:0
7
-->
<
template
>
<div
class=
"rlPopup"
>
...
...
@@ -77,7 +77,7 @@
scale
:
1
,
degree
:
0
},
maxLength
:
0
,
max
File
Length
:
0
,
// 缩略图
thumbnailImages
:
[],
showViewer
:
false
,
...
...
@@ -252,17 +252,16 @@
* @param {*} files
* @author: renchao
*/
async
handleChange
(
file
,
files
)
{
// 清空 fileList 数组
debugger
let
length
=
files
.
length
;
this
.
maxLength
=
Math
.
max
(
length
,
this
.
maxLength
)
this
.
$refs
.
upload
.
clearFiles
();
async
handleChange
(
file
,
fileList
)
{
let
length
=
fileList
.
length
;
this
.
maxFileLength
=
Math
.
max
(
length
,
this
.
maxFileLength
)
setTimeout
(()
=>
{
if
(
length
!==
this
.
maxLength
)
return
var
formData
=
new
FormData
();
files
.
forEach
(
file
=>
{
formData
.
append
(
'file'
,
file
.
raw
)
if
(
this
.
maxFileLength
!==
length
)
{
return
}
fileList
.
forEach
(
item
=>
{
formData
.
append
(
'file'
,
item
.
raw
)
})
formData
.
append
(
"bsmSj"
,
this
.
previewImg
.
bsmSj
);
formData
.
append
(
"bsmSlsq"
,
this
.
previewImg
.
bsmSlsq
);
...
...
Please
register
or
sign in
to post a comment