Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
court-inner
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
0
Merge Requests
0
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
莫晓莉
court-inner
Commits
83de50f3
Commit
83de50f3
authored
Oct 21, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表单验证发布新闻必须上传图片
parent
d054e68b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
src/views/manage/index.vue
+15
-2
No files found.
src/views/manage/index.vue
View file @
83de50f3
...
...
@@ -1762,7 +1762,13 @@ export default {
});
return
;
}
if
(
this
.
fileList
.
length
==
0
){
this
.
$message
({
message
:
'请上传图片附件!'
,
type
:
'warning'
});
return
;
}
let
formData
=
new
FormData
();
...
...
@@ -1771,6 +1777,7 @@ export default {
formData
.
append
(
key
,
this
.
newsForm
[
key
])
}
formData
.
append
(
'content'
,
this
.
htmlContent
);
this
.
fileList
.
forEach
(
item
=>
{
formData
.
append
(
'fileList'
,
item
.
raw
)
})
...
...
@@ -1840,7 +1847,13 @@ export default {
}
console
.
log
(
'-=-=-=-=-=-=-=--=需提交保存的附件列表'
,
this
.
fileListEdit
);
if
(
this
.
fileListEdit
.
length
==
0
){
this
.
$message
({
message
:
'请上传图片附件!'
,
type
:
'warning'
});
return
;
}
this
.
fileListEdit
=
[...
new
Set
(
this
.
fileListEdit
)]
this
.
fileListEdit
.
forEach
((
item
)
=>
{
if
(
item
.
raw
)
{
...
...
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