mirror of https://github.com/ElemeFE/element
commit
6565811a95
|
@ -30,36 +30,36 @@
|
||||||
{
|
{
|
||||||
"path": "/message-box",
|
"path": "/message-box",
|
||||||
"name": "弹框 (message-box)",
|
"name": "弹框 (message-box)",
|
||||||
"title": "message-box 弹框"
|
"title": "Message Box 弹框"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/alert",
|
"path": "/alert",
|
||||||
"name": "警告 (alert)",
|
"name": "警告 (alert)",
|
||||||
"title": "alert 警告",
|
"title": "Alert 警告",
|
||||||
"description": "用于页面中展示重要的提示信息"
|
"description": "用于页面中展示重要的提示信息"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/notification",
|
"path": "/notification",
|
||||||
"name": "通知 (notification)",
|
"name": "通知 (notification)",
|
||||||
"title": "notification 通知",
|
"title": "Notification 通知",
|
||||||
"description": "悬浮出现在页面右上角, 显示全局的通知提醒消息"
|
"description": "悬浮出现在页面右上角, 显示全局的通知提醒消息"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/message",
|
"path": "/message",
|
||||||
"name": "消息提示 (message)",
|
"name": "消息提示 (message)",
|
||||||
"title": "message 消息提示",
|
"title": "Message 消息提示",
|
||||||
"description": "对用户的操作进行反馈提示,包含成功、反馈或错误等消息提示"
|
"description": "对用户的操作进行反馈提示,包含成功、反馈或错误等消息提示"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/loading",
|
"path": "/loading",
|
||||||
"name": "加载 (loading)",
|
"name": "加载 (loading)",
|
||||||
"title": "loading 加载",
|
"title": "Loading 加载",
|
||||||
"description": "加载数据时显示"
|
"description": "加载数据时显示"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/card",
|
"path": "/card",
|
||||||
"name": "卡片 (card)",
|
"name": "卡片 (card)",
|
||||||
"title": "card 卡片",
|
"title": "Card 卡片",
|
||||||
"description": "将信息聚合在卡片容器中展示"
|
"description": "将信息聚合在卡片容器中展示"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -110,19 +110,19 @@
|
||||||
{
|
{
|
||||||
"path": "/time-picker",
|
"path": "/time-picker",
|
||||||
"name": "时间选择器(time-picker)",
|
"name": "时间选择器(time-picker)",
|
||||||
"title": "TimePicker 时间选择器",
|
"title": "Time Picker 时间选择器",
|
||||||
"description": "用于选择或输入时间"
|
"description": "用于选择或输入时间"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/date-picker",
|
"path": "/date-picker",
|
||||||
"name": "日期选择器(date-picker)",
|
"name": "日期选择器(date-picker)",
|
||||||
"title": "DatePicker",
|
"title": "Date Picker",
|
||||||
"description": "用于选择或输入时间"
|
"description": "用于选择或输入时间"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/datetime-picker",
|
"path": "/datetime-picker",
|
||||||
"name": "日期时间选择器",
|
"name": "日期时间选择器",
|
||||||
"title": "DatetimePicker",
|
"title": "Datetime Picker",
|
||||||
"description": "用于选择或输入日期时间"
|
"description": "用于选择或输入日期时间"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Spinner from './spinner';
|
||||||
exports.install = Vue => {
|
exports.install = Vue => {
|
||||||
let insertDom = (parent, directive, binding) => {
|
let insertDom = (parent, directive, binding) => {
|
||||||
if (!directive.domVisible) {
|
if (!directive.domVisible) {
|
||||||
|
@ -32,21 +33,13 @@ exports.install = Vue => {
|
||||||
el.maskStyle = {
|
el.maskStyle = {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
zIndex: '10000',
|
zIndex: '10000',
|
||||||
backgroundColor: 'rgba(0, 0, 0, .7)',
|
backgroundColor: 'rgba(0, 0, 0, .65)',
|
||||||
margin: '0'
|
margin: '0'
|
||||||
};
|
};
|
||||||
|
|
||||||
el.spinner = document.createElement('i');
|
el.spinner = (new Spinner()).el;
|
||||||
el.spinner.className = 'el-icon-loading';
|
|
||||||
el.spinnerStyle = {
|
el.spinnerStyle = {
|
||||||
color: '#ddd',
|
position: 'absolute'
|
||||||
fontSize: '32px',
|
|
||||||
position: 'absolute',
|
|
||||||
top: '50%',
|
|
||||||
left: '50%',
|
|
||||||
marginTop: '-19px',
|
|
||||||
marginLeft: '-16px',
|
|
||||||
zIndex: '10001'
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
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;
|
|
@ -9,6 +9,7 @@
|
||||||
@import "./radio.css";
|
@import "./radio.css";
|
||||||
@import "./switch.css";
|
@import "./switch.css";
|
||||||
@import "./dropdown.css";
|
@import "./dropdown.css";
|
||||||
|
@import "./loading.css";
|
||||||
@import "./dialog.css";
|
@import "./dialog.css";
|
||||||
@import "./table.css";
|
@import "./table.css";
|
||||||
@import "./pagination.css";
|
@import "./pagination.css";
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue