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
6565811a
Commit
6565811a
authored
Aug 25, 2016
by
cinwell.li
Committed by
GitHub
Aug 25, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #103 from Leopoldthecoder/next
update loading
parents
b51aeab3
1db71ec5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
20 deletions
+72
-20
examples/nav.config.json
examples/nav.config.json
+9
-9
packages/loading/src/directive.js
packages/loading/src/directive.js
+4
-11
packages/loading/src/spinner.js
packages/loading/src/spinner.js
+14
-0
packages/theme-default/src/index.css
packages/theme-default/src/index.css
+1
-0
packages/theme-default/src/loading.css
packages/theme-default/src/loading.css
+44
-0
No files found.
examples/nav.config.json
View file @
6565811a
...
...
@@ -30,36 +30,36 @@
{
"path"
:
"/message-box"
,
"name"
:
"弹框 (message-box)"
,
"title"
:
"
message-b
ox 弹框"
"title"
:
"
Message B
ox 弹框"
},
{
"path"
:
"/alert"
,
"name"
:
"警告 (alert)"
,
"title"
:
"
a
lert 警告"
,
"title"
:
"
A
lert 警告"
,
"description"
:
"用于页面中展示重要的提示信息"
},
{
"path"
:
"/notification"
,
"name"
:
"通知 (notification)"
,
"title"
:
"
n
otification 通知"
,
"title"
:
"
N
otification 通知"
,
"description"
:
"悬浮出现在页面右上角, 显示全局的通知提醒消息"
},
{
"path"
:
"/message"
,
"name"
:
"消息提示 (message)"
,
"title"
:
"
m
essage 消息提示"
,
"title"
:
"
M
essage 消息提示"
,
"description"
:
"对用户的操作进行反馈提示,包含成功、反馈或错误等消息提示"
},
{
"path"
:
"/loading"
,
"name"
:
"加载 (loading)"
,
"title"
:
"
l
oading 加载"
,
"title"
:
"
L
oading 加载"
,
"description"
:
"加载数据时显示"
},
{
"path"
:
"/card"
,
"name"
:
"卡片 (card)"
,
"title"
:
"
c
ard 卡片"
,
"title"
:
"
C
ard 卡片"
,
"description"
:
"将信息聚合在卡片容器中展示"
}
]
...
...
@@ -110,19 +110,19 @@
{
"path"
:
"/time-picker"
,
"name"
:
"时间选择器(time-picker)"
,
"title"
:
"TimePicker 时间选择器"
,
"title"
:
"Time
Picker 时间选择器"
,
"description"
:
"用于选择或输入时间"
},
{
"path"
:
"/date-picker"
,
"name"
:
"日期选择器(date-picker)"
,
"title"
:
"DatePicker"
,
"title"
:
"Date
Picker"
,
"description"
:
"用于选择或输入时间"
},
{
"path"
:
"/datetime-picker"
,
"name"
:
"日期时间选择器"
,
"title"
:
"DatetimePicker"
,
"title"
:
"Datetime
Picker"
,
"description"
:
"用于选择或输入日期时间"
},
{
...
...
packages/loading/src/directive.js
View file @
6565811a
import
Spinner
from
'
./spinner
'
;
exports
.
install
=
Vue
=>
{
let
insertDom
=
(
parent
,
directive
,
binding
)
=>
{
if
(
!
directive
.
domVisible
)
{
...
...
@@ -32,21 +33,13 @@ exports.install = Vue => {
el
.
maskStyle
=
{
position
:
'
absolute
'
,
zIndex
:
'
10000
'
,
backgroundColor
:
'
rgba(0, 0, 0, .
7
)
'
,
backgroundColor
:
'
rgba(0, 0, 0, .
65
)
'
,
margin
:
'
0
'
};
el
.
spinner
=
document
.
createElement
(
'
i
'
);
el
.
spinner
.
className
=
'
el-icon-loading
'
;
el
.
spinner
=
(
new
Spinner
()).
el
;
el
.
spinnerStyle
=
{
color
:
'
#ddd
'
,
fontSize
:
'
32px
'
,
position
:
'
absolute
'
,
top
:
'
50%
'
,
left
:
'
50%
'
,
marginTop
:
'
-19px
'
,
marginLeft
:
'
-16px
'
,
zIndex
:
'
10001
'
position
:
'
absolute
'
};
},
...
...
packages/loading/src/spinner.js
0 → 100644
View file @
6565811a
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
;
packages/theme-default/src/index.css
View file @
6565811a
...
...
@@ -9,6 +9,7 @@
@import
"./radio.css"
;
@import
"./switch.css"
;
@import
"./dropdown.css"
;
@import
"./loading.css"
;
@import
"./dialog.css"
;
@import
"./table.css"
;
@import
"./pagination.css"
;
...
...
packages/theme-default/src/loading.css
0 → 100644
View file @
6565811a
.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
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