Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
62af13a8
Commit
62af13a8
authored
Dec 29, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复图片上传,头像上传等组件在iOS Safari 下无法使用的问题
parent
60ce1290
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
25 deletions
+9
-25
style.css
src/frontend/web/css/style.css
+1
-16
video-upload.vue
src/frontend/web/js/components/uploader/video-upload.vue
+8
-9
No files found.
src/frontend/web/css/style.css
View file @
62af13a8
...
@@ -628,19 +628,6 @@ a:link, a:active, a:visited {
...
@@ -628,19 +628,6 @@ a:link, a:active, a:visited {
padding-top
:
10px
;
padding-top
:
10px
;
}
}
.upload-avatar
input
{
display
:
inline-block
;
position
:
absolute
;
left
:
0
;
top
:
0
;
opacity
:
0
;
width
:
100px
;
height
:
100px
;
border-radius
:
100%
;
background-color
:
#000
;
cursor
:
pointer
;
}
.upload-avatar
img
{
.upload-avatar
img
{
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
...
@@ -648,7 +635,6 @@ a:link, a:active, a:visited {
...
@@ -648,7 +635,6 @@ a:link, a:active, a:visited {
height
:
100px
;
height
:
100px
;
width
:
100px
;
width
:
100px
;
border-radius
:
100%
;
border-radius
:
100%
;
z-index
:
2
;
}
}
.upload-avatar
span
.loading-tip
{
.upload-avatar
span
.loading-tip
{
...
@@ -676,7 +662,6 @@ a:link, a:active, a:visited {
...
@@ -676,7 +662,6 @@ a:link, a:active, a:visited {
color
:
#fff
;
color
:
#fff
;
background-color
:
rgba
(
0
,
0
,
0
,
0.3
);
background-color
:
rgba
(
0
,
0
,
0
,
0.3
);
position
:
absolute
;
position
:
absolute
;
z-index
:
3
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
100px
;
width
:
100px
;
...
@@ -1131,7 +1116,7 @@ textarea.input-r-control {
...
@@ -1131,7 +1116,7 @@ textarea.input-r-control {
width
:
300px
;
width
:
300px
;
color
:
#999
;
color
:
#999
;
border-radius
:
3px
;
border-radius
:
3px
;
z-index
:
3
;
z-index
:
0
;
}
}
.upload-video-screen
img
{
.upload-video-screen
img
{
...
...
src/frontend/web/js/components/uploader/video-upload.vue
View file @
62af13a8
...
@@ -29,8 +29,6 @@ import str from "../../utils/string";
...
@@ -29,8 +29,6 @@ import str from "../../utils/string";
import
qiniu
from
"../../utils/qiniu"
;
import
qiniu
from
"../../utils/qiniu"
;
import
Bus
from
"../bus"
;
import
Bus
from
"../bus"
;
var
uploader
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -39,7 +37,8 @@ export default {
...
@@ -39,7 +37,8 @@ export default {
videoSize
:
""
,
videoSize
:
""
,
progress
:
0
,
progress
:
0
,
speed
:
""
,
speed
:
""
,
uploaderId
:
"videoUploader"
+
str
.
rand
(
10
)
uploaderId
:
"videoUploader"
+
str
.
rand
(
10
),
uploader
:
null
}
}
},
},
props
:
{
props
:
{
...
@@ -47,9 +46,9 @@ export default {
...
@@ -47,9 +46,9 @@ export default {
},
},
methods
:
{
methods
:
{
cancelClick
:
function
()
{
cancelClick
:
function
()
{
uploader
.
stop
();
this
.
uploader
.
stop
();
this
.
state
=
"ready"
;
this
.
state
=
"ready"
;
uploader
.
refresh
();
this
.
uploader
.
refresh
();
//本组件的所有视频上传相关事件都会同时向 Bus 发送
//本组件的所有视频上传相关事件都会同时向 Bus 发送
this
.
$emit
(
"video-upload-cancel"
);
this
.
$emit
(
"video-upload-cancel"
);
...
@@ -86,7 +85,7 @@ export default {
...
@@ -86,7 +85,7 @@ export default {
}
}
});
});
uploader
=
new
qiniu
.
Uploader
({
self
.
uploader
=
new
qiniu
.
Uploader
({
browse_button
:
self
.
uploaderId
,
browse_button
:
self
.
uploaderId
,
drop_element
:
self
.
uploaderId
,
drop_element
:
self
.
uploaderId
,
upload_token
:
self
.
uptoken
,
upload_token
:
self
.
uptoken
,
...
@@ -158,16 +157,16 @@ export default {
...
@@ -158,16 +157,16 @@ export default {
//状态变化时禁用或启用上传按钮
//状态变化时禁用或启用上传按钮
self
.
$watch
(
"state"
,
function
(
val
,
old
)
{
self
.
$watch
(
"state"
,
function
(
val
,
old
)
{
if
(
val
==
"ready"
||
val
==
"error"
)
{
if
(
val
==
"ready"
||
val
==
"error"
)
{
uploader
.
disableBrowse
(
false
);
self
.
uploader
.
disableBrowse
(
false
);
}
else
{
}
else
{
uploader
.
disableBrowse
();
self
.
uploader
.
disableBrowse
();
}
}
self
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
self
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
Bus
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
Bus
.
$emit
(
"video-upload-state-change"
,
val
,
old
);
});
});
uploader
.
init
();
self
.
uploader
.
init
();
});
});
}
}
}
}
...
...
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