Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
3e08c5db
Commit
3e08c5db
authored
Aug 25, 2016
by
Leopoldthecoder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update loading spinner
parent
8c71f100
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
11 deletions
+62
-11
packages/loading/src/directive.js
packages/loading/src/directive.js
+4
-11
packages/loading/src/spinner.css
packages/loading/src/spinner.css
+44
-0
packages/loading/src/spinner.js
packages/loading/src/spinner.js
+14
-0
No files found.
packages/loading/src/directive.js
View file @
3e08c5db
import
Spinner
from
'
./spinner
'
;
require
(
'
./spinner.css
'
);
exports
.
install
=
Vue
=>
{
let
insertDom
=
(
parent
,
directive
,
binding
)
=>
{
if
(
!
directive
.
domVisible
)
{
...
...
@@ -36,18 +38,9 @@ exports.install = Vue => {
margin
:
'
0
'
};
el
.
spinner
=
document
.
createElement
(
'
img
'
);
el
.
spinner
.
src
=
require
(
'
./loading-bubbles.svg
'
);
el
.
spinner
=
(
new
Spinner
()).
el
;
el
.
spinnerStyle
=
{
color
:
'
#ddd
'
,
height
:
'
60px
'
,
width
:
'
60px
'
,
position
:
'
absolute
'
,
top
:
'
50%
'
,
left
:
'
50%
'
,
marginTop
:
'
-30px
'
,
marginLeft
:
'
-30px
'
,
zIndex
:
'
10001
'
position
:
'
absolute
'
};
},
...
...
packages/loading/src/spinner.css
0 → 100644
View file @
3e08c5db
.el-loading-spinner
{
height
:
12px
;
width
:
60px
;
top
:
50%
;
left
:
50%
;
font-size
:
0
;
text-align
:
center
;
margin-top
:
-6px
;
margin-left
:
-30px
;
z-index
:
10001
;
}
.el-loading-bubble
{
height
:
12px
;
width
:
12px
;
background-color
:
#fff
;
margin
:
0
3px
;
border-radius
:
50%
;
display
:
inline-block
;
animation
:
1s
cubic-bezier
(
.2
,
.68
,
.18
,
1.08
)
infinite
both
bubble-pulse
;
}
.el-loading-bubble.bubble1
{
animation-delay
:
.16s
;
}
.el-loading-bubble.bubble2
{
animation-delay
:
.32s
;
}
.el-loading-bubble.bubble3
{
animation-delay
:
.48s
;
}
@keyframes
bubble-pulse
{
0
%,
80
%
{
transform
:
scale
(
1
);
opacity
:
1
;
}
45
%
{
transform
:
scale
(
0
);
opacity
:
0
;
}
}
\ No newline at end of file
packages/loading/src/spinner.js
0 → 100644
View file @
3e08c5db
class
Spinner
{
constructor
()
{
let
spinner
=
document
.
createElement
(
'
div
'
);
spinner
.
classList
.
add
(
'
el-loading-spinner
'
);
[
1
,
2
,
3
].
forEach
(
index
=>
{
let
bubble
=
document
.
createElement
(
'
div
'
);
bubble
.
classList
.
add
(
'
el-loading-bubble
'
,
`bubble
${
index
}
`
);
spinner
.
appendChild
(
bubble
);
});
this
.
el
=
spinner
;
}
}
export
default
Spinner
;
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