Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dyingstraw
vue-element-admin
提交
ffd668fb
V
vue-element-admin
项目概览
dyingstraw
/
vue-element-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-element-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ffd668fb
编写于
7月 03, 2017
作者:
P
Pan
提交者:
花裤衩
7月 03, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine dashboard css
上级
ed803c68
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
63 addition
and
10 deletion
+63
-10
src/components/TodoList/index.scss
src/components/TodoList/index.scss
+2
-1
src/mock/login.js
src/mock/login.js
+2
-2
src/utils/index.js
src/utils/index.js
+35
-0
src/views/dashboard/editor/index.vue
src/views/dashboard/editor/index.vue
+4
-2
src/views/dashboard/editor/lineChart.vue
src/views/dashboard/editor/lineChart.vue
+20
-5
未找到文件。
src/components/TodoList/index.scss
浏览文件 @
ffd668fb
...
...
@@ -246,7 +246,7 @@
list-style
:
none
;
position
:
absolute
;
right
:
0
;
left
:
0
;
left
:
-20px
;
}
.filters
li
{
display
:
inline
;
...
...
@@ -254,6 +254,7 @@
.filters
li
a
{
color
:
inherit
;
margin
:
3px
;
font-size
:
12px
;
padding
:
3px
7px
;
text-decoration
:
none
;
border
:
1px
solid
transparent
;
...
...
src/mock/login.js
浏览文件 @
ffd668fb
...
...
@@ -6,7 +6,7 @@ const userMap = {
token
:
'
admin
'
,
introduction
:
'
我是超级管理员
'
,
avatar
:
'
https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif
'
,
name
:
'
超级管理员小潘
'
,
name
:
'
Super Admin
'
,
uid
:
'
001
'
},
editor
:
{
...
...
@@ -14,7 +14,7 @@ const userMap = {
token
:
'
editor
'
,
introduction
:
'
我是编辑
'
,
avatar
:
'
https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif
'
,
name
:
'
普通编辑小张
'
,
name
:
'
Normal Editor
'
,
uid
:
'
002
'
},
...
...
src/utils/index.js
浏览文件 @
ffd668fb
...
...
@@ -212,3 +212,38 @@
}
}
export
function
debounce
(
func
,
wait
,
immediate
)
{
let
timeout
,
args
,
context
,
timestamp
,
result
;
const
later
=
function
()
{
// 据上一次触发时间间隔
const
last
=
+
new
Date
()
-
timestamp
;
// 上次被包装函数被调用时间间隔last小于设定时间间隔wait
if
(
last
<
wait
&&
last
>
0
)
{
timeout
=
setTimeout
(
later
,
wait
-
last
);
}
else
{
timeout
=
null
;
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if
(
!
immediate
)
{
result
=
func
.
apply
(
context
,
args
);
if
(
!
timeout
)
context
=
args
=
null
;
}
}
};
return
function
(...
args
)
{
context
=
this
;
timestamp
=
+
new
Date
();
const
callNow
=
immediate
&&
!
timeout
;
// 如果延时不存在,重新设定延时
if
(
!
timeout
)
timeout
=
setTimeout
(
later
,
wait
);
if
(
callNow
)
{
result
=
func
.
apply
(
context
,
args
);
context
=
args
=
null
;
}
return
result
;
};
}
src/views/dashboard/editor/index.vue
浏览文件 @
ffd668fb
...
...
@@ -65,10 +65,10 @@
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"1
6
"
>
<el-col
:span=
"1
5
"
>
<line-chart></line-chart>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
9
"
>
<todo-list></todo-list>
</el-col>
</el-row>
...
...
@@ -129,10 +129,12 @@
}
.display_name
{
font-size
:
30px
;
display
:
block
;
}
.info-item
{
display
:
inline-block
;
margin-top
:
10px
;
font-size
:
14px
;
&
:last-of-type
{
margin-left
:
15px
;
}
...
...
src/views/dashboard/editor/lineChart.vue
浏览文件 @
ffd668fb
...
...
@@ -4,6 +4,8 @@
<
script
>
import
echarts
from
'
echarts
'
;
require
(
'
echarts/theme/macarons
'
);
// echarts 主题
import
{
debounce
}
from
'
utils
'
;
export
default
{
props
:
{
...
...
@@ -18,6 +20,10 @@
height
:
{
type
:
String
,
default
:
'
300px
'
},
autoResize
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
...
...
@@ -27,11 +33,20 @@
},
mounted
()
{
this
.
initChart
();
if
(
this
.
autoResize
)
{
this
.
__resizeHanlder
=
debounce
(()
=>
{
this
.
chart
.
resize
()
},
100
)
window
.
addEventListener
(
'
resize
'
,
this
.
__resizeHanlder
)
}
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
if
(
this
.
autoResize
)
{
window
.
removeEventListener
(
'
resize
'
,
this
.
__resizeHanlder
)
}
this
.
chart
.
dispose
();
this
.
chart
=
null
;
},
...
...
@@ -41,12 +56,12 @@
this
.
chart
.
setOption
({
xAxis
:
{
data
:
[
'
Sunday
'
,
'
Monday
'
,
'
Tuesday
'
,
'
Wednesday
'
,
'
Thursday
'
,
'
Friday
'
,
'
Saturday
'
],
data
:
[
'
Mon
'
,
'
Tue
'
,
'
Wed
'
,
'
Thu
'
,
'
Fri
'
,
'
Sat
'
,
'
Sun
'
],
boundaryGap
:
false
},
grid
:
{
left
:
0
,
right
:
0
,
left
:
1
0
,
right
:
1
0
,
bottom
:
20
,
containLabel
:
true
},
...
...
@@ -59,7 +74,7 @@
},
yAxis
:
{},
series
:
[{
name
:
'
vis
tor
'
,
name
:
'
vis
itors
'
,
itemStyle
:
{
normal
:
{
areaStyle
:
{}
...
...
@@ -70,7 +85,7 @@
data
:
[
100
,
120
,
161
,
134
,
105
,
160
,
165
]
},
{
name
:
'
buyer
'
,
name
:
'
buyer
s
'
,
smooth
:
true
,
type
:
'
line
'
,
itemStyle
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录