Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 fab7e516
authored
Jul 08, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
图片限制调整
1 parent
cee43ac5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
src/views/friendGroup/components/welcomeWords.vue
src/views/friendGroup/components/welcomeWords.vue
View file @
fab7e51
...
@@ -192,19 +192,19 @@ export default {
...
@@ -192,19 +192,19 @@ export default {
// 默认1MB
// 默认1MB
const
limitSize
=
10
const
limitSize
=
10
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
//
if (!isLt) {
if
(
!
isLt
)
{
//
this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
this
.
$message
.
error
(
'上传图片大小不能超过'
+
limitSize
+
'MB!'
)
//
return true
return
true
//
}
}
reader
.
readAsDataURL
(
file
)
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
e
=>
{
reader
.
onload
=
e
=>
{
var
image
=
new
Image
()
var
image
=
new
Image
()
image
.
src
=
e
.
target
.
result
image
.
src
=
e
.
target
.
result
image
.
onload
=
()
=>
{
image
.
onload
=
()
=>
{
if
(
image
.
width
>
1440
||
image
.
height
>
1080
)
{
//
if (image.width > 1440 || image.height > 1080) {
this
.
$message
.
error
(
'图片长宽不超过1440x1080'
)
//
this.$message.error('图片长宽不超过1440x1080')
return
//
return
}
//
}
this
.
previewList
=
this
.
previewList
.
filter
(
item
=>
{
this
.
previewList
=
this
.
previewList
.
filter
(
item
=>
{
return
item
.
attType
==
ATT_TYPE
.
TEXT
||
item
.
attType
==
ATT_TYPE
.
IMAGE
return
item
.
attType
==
ATT_TYPE
.
TEXT
||
item
.
attType
==
ATT_TYPE
.
IMAGE
})
})
...
...
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