Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 28486107
authored
May 07, 2021
by
jzou
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
图片类型支持PNG
1 parent
12ef37ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
linkwe-ui/src/views/application/fissionDetail/addFission.vue
linkwe-ui/src/views/application/taskDetail/addTask.vue
linkwe-ui/src/views/application/fissionDetail/addFission.vue
View file @
2848610
...
...
@@ -249,12 +249,13 @@ export default {
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
const
isPNG
=
file
.
type
===
'image/png'
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传头像图片只能是 JPG 格式!'
)
if
(
!
isJPG
&&
!
isPNG
)
{
this
.
$message
.
error
(
'上传头像图片只能是 JPG
/PNG
格式!'
)
}
return
isJPG
return
isJPG
||
isPNG
},
},
computed
:{
...
...
linkwe-ui/src/views/application/taskDetail/addTask.vue
View file @
2848610
...
...
@@ -46,6 +46,7 @@ export default {
{
required
:
true
,
message
:
'请输入活动名称'
,
trigger
:
'blur'
},
],
postersId
:
[{
required
:
true
,
message
:
'请输入海报'
,
trigger
:
'blur'
}],
fissionTargetId
:
[{
required
:
true
,
message
:
'请选择员工'
,
trigger
:
'blur'
}],
fissNum
:
[
{
required
:
true
,
message
:
'请输入数量'
,
trigger
:
'blur'
},
{
pattern
:
/^
[
1-9
]
+$/
,
message
:
'请输入数字'
,
trigger
:
'blur'
},
...
...
@@ -247,12 +248,13 @@ export default {
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
const
isPNG
=
file
.
type
===
'image/png'
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传头像图片只能是 JPG 格式!'
)
if
(
!
isJPG
&&
!
isPNG
)
{
this
.
$message
.
error
(
'上传头像图片只能是 JPG
/PNG
格式!'
)
}
return
isJPG
return
isJPG
||
isPNG
},
},
}
...
...
@@ -380,7 +382,7 @@ export default {
</div>
</el-form-item>
<el-form-item
label=
"添加员工"
>
<el-form-item
label=
"添加员工"
prop=
"fissionTargetId"
>
<el-button
type=
"primary"
class=
"ml10"
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment