Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
590c83b0
authored
Sep 18, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
e3bb6ab4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/components/Tinymce/components/EditorImage.vue
+7
-3
No files found.
src/components/Tinymce/components/EditorImage.vue
View file @
590c83b0
...
@@ -12,9 +12,11 @@
...
@@ -12,9 +12,11 @@
:on-success=
"handleSuccess"
:on-success=
"handleSuccess"
:before-upload=
"beforeUpload"
:before-upload=
"beforeUpload"
class=
"editor-slide-upload"
class=
"editor-slide-upload"
action=
"https://httpbin.org/post"
:action=
"uploadUrl"
name=
"resource"
list-type=
"picture-card"
list-type=
"picture-card"
>
>
<!-- https://httpbin.org/post -->
<el-button
size=
"small"
type=
"primary"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
点击上传
</el-button>
</el-button>
...
@@ -31,7 +33,7 @@
...
@@ -31,7 +33,7 @@
<
script
>
<
script
>
// import { getToken } from 'api/qiniu'
// import { getToken } from 'api/qiniu'
import
{
uploadUrl
}
from
'@/api/device'
export
default
{
export
default
{
name
:
'EditorSlideUpload'
,
name
:
'EditorSlideUpload'
,
props
:
{
props
:
{
...
@@ -43,6 +45,7 @@ export default {
...
@@ -43,6 +45,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
dialogVisible
:
false
,
dialogVisible
:
false
,
uploadUrl
:
uploadUrl
(),
listObj
:
{},
listObj
:
{},
fileList
:
[]
fileList
:
[]
}
}
...
@@ -63,11 +66,12 @@ export default {
...
@@ -63,11 +66,12 @@ export default {
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
},
},
handleSuccess
(
response
,
file
)
{
handleSuccess
(
response
,
file
)
{
console
.
log
(
response
)
const
uid
=
file
.
uid
const
uid
=
file
.
uid
const
objKeyArr
=
Object
.
keys
(
this
.
listObj
)
const
objKeyArr
=
Object
.
keys
(
this
.
listObj
)
for
(
let
i
=
0
,
len
=
objKeyArr
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
objKeyArr
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
listObj
[
objKeyArr
[
i
]].
uid
===
uid
)
{
if
(
this
.
listObj
[
objKeyArr
[
i
]].
uid
===
uid
)
{
this
.
listObj
[
objKeyArr
[
i
]].
url
=
response
.
files
.
file
this
.
listObj
[
objKeyArr
[
i
]].
url
=
response
.
data
this
.
listObj
[
objKeyArr
[
i
]].
hasSuccess
=
true
this
.
listObj
[
objKeyArr
[
i
]].
hasSuccess
=
true
return
return
}
}
...
...
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