Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
5fd62b13
Commit
5fd62b13
authored
Jul 21, 2019
by
Jason
Committed by
linlinjava
Jul 21, 2019
Browse files
modify this file (#234)
parent
e1f41d77
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin/src/views/promotion/ad.vue
View file @
5fd62b13
...
@@ -60,10 +60,12 @@
...
@@ -60,10 +60,12 @@
:action=
"uploadPath"
:action=
"uploadPath"
:show-file-list=
"false"
:show-file-list=
"false"
:on-success=
"uploadUrl"
:on-success=
"uploadUrl"
:before-upload=
"checkFileSize"
class=
"avatar-uploader"
class=
"avatar-uploader"
accept=
".jpg,.jpeg,.png,.gif"
>
accept=
".jpg,.jpeg,.png,.gif"
>
<img
v-if=
"dataForm.url"
:src=
"dataForm.url"
class=
"avatar"
>
<img
v-if=
"dataForm.url"
:src=
"dataForm.url"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
/>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传jpg/png文件,且不超过1024kb
</div>
</el-upload>
</el-upload>
</el-form-item>
</el-form-item>
<el-form-item
label=
"广告位置"
prop=
"position"
>
<el-form-item
label=
"广告位置"
prop=
"position"
>
...
@@ -218,6 +220,13 @@ export default {
...
@@ -218,6 +220,13 @@ export default {
uploadUrl
:
function
(
response
)
{
uploadUrl
:
function
(
response
)
{
this
.
dataForm
.
url
=
response
.
data
.
url
this
.
dataForm
.
url
=
response
.
data
.
url
},
},
checkFileSize
:
function
(
file
)
{
if
(
file
.
size
>
1048576
)
{
this
.
$message
.
error
(
`
${
file
.
name
}
文件大于1024KB,请选择小于1024KB大小的图片`
)
return
false
}
return
true
},
createData
()
{
createData
()
{
this
.
$refs
[
'
dataForm
'
].
validate
(
valid
=>
{
this
.
$refs
[
'
dataForm
'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
Write
Preview
Supports
Markdown
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