Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
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
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄瑜
VueElementTemplate
Commits
bd607b47
Commit
bd607b47
authored
Jun 14, 2017
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine code && document
parent
f82ec2d5
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
142 additions
and
150 deletions
+142
-150
README.md
README.md
+8
-7
mixchart.vue
src/components/Charts/mixchart.vue
+0
-1
index.vue
src/views/charts/index.vue
+1
-1
keyboard.vue
src/views/charts/keyboard.vue
+5
-6
keyboard2.vue
src/views/charts/keyboard2.vue
+5
-6
line.vue
src/views/charts/line.vue
+5
-8
mixchart.vue
src/views/charts/mixchart.vue
+6
-7
countTo.vue
src/views/components/countTo.vue
+3
-3
dndlist.vue
src/views/components/dndlist.vue
+1
-1
index.vue
src/views/components/index.vue
+2
-2
jsoneditor.vue
src/views/components/jsoneditor.vue
+4
-3
markdown.vue
src/views/components/markdown.vue
+4
-4
index.vue
src/views/errlog/index.vue
+5
-11
401.vue
src/views/error/401.vue
+34
-34
404.vue
src/views/error/404.vue
+3
-1
dynamictable.vue
src/views/example/table/dynamictable.vue
+15
-16
table.vue
src/views/example/table/table.vue
+12
-13
index.vue
src/views/excel/index.vue
+1
-0
AppMain.vue
src/views/layout/AppMain.vue
+1
-3
Layout.vue
src/views/layout/Layout.vue
+2
-2
Levelbar.vue
src/views/layout/Levelbar.vue
+1
-0
Navbar.vue
src/views/layout/Navbar.vue
+4
-3
Sidebar.vue
src/views/layout/Sidebar.vue
+1
-0
SidebarItem.vue
src/views/layout/SidebarItem.vue
+1
-0
index.vue
src/views/permission/index.vue
+5
-5
index.vue
src/views/theme/index.vue
+13
-13
No files found.
README.md
View file @
bd607b47
...
@@ -8,11 +8,9 @@
...
@@ -8,11 +8,9 @@
**注意:该项目目前使用element-ui@1.3.3版本,所以最低兼容 Vue 2.3.0**
**注意:该项目目前使用element-ui@1.3.3版本,所以最低兼容 Vue 2.3.0**
## 前言
## 前言
> 这半年来一直在用vue写管理后台,目前后台已经有
七十多个页面,十几种权限,但维护成本依然很低,所以准备开源分享一下后台开发的经验和成果。目前的技术栈主要的采用vue+element+axios
.由于是个人项目,所以数据请求都是用了mockjs模拟。注意:在次项目基础上改造开发时请移除mock文件。
> 这半年来一直在用vue写管理后台,目前后台已经有
百来个个页面,十几种权限,但维护成本依然很低,所以准备开源分享一下后台开发的经验和成果。目前的技术栈主要的采用vue+element+axios由webpack2打包
.由于是个人项目,所以数据请求都是用了mockjs模拟。注意:在次项目基础上改造开发时请移除mock文件。
后续会出一系列的教程配套文章,如如何从零构建后台项目框架,如何做完整的用户系统(如权限验证,二次登录等),如何二次开发组件(如富文本),如何整合七牛等等文章,各种后台开发经验等等。莫急~~
写了一个系列的教程配套文章,如何从零构建后一个完整的后台项目:
相应需求,开了一个qq群 591724180 方便大家交流
-
[
wiki
](
https://github.com/PanJiaChen/vue-element-admin/wiki
)
-
[
wiki
](
https://github.com/PanJiaChen/vue-element-admin/wiki
)
-
[
手摸手,带你用 vue 撸后台 系列一(基础篇)
](
https://juejin.im/post/59097cd7a22b9d0065fb61d2
)
-
[
手摸手,带你用 vue 撸后台 系列一(基础篇)
](
https://juejin.im/post/59097cd7a22b9d0065fb61d2
)
...
@@ -20,12 +18,14 @@
...
@@ -20,12 +18,14 @@
-
[
手摸手,带你用 vue 撸后台 系列三 (实战篇)
](
https://juejin.im/post/593121aa0ce4630057f70d35
)
-
[
手摸手,带你用 vue 撸后台 系列三 (实战篇)
](
https://juejin.im/post/593121aa0ce4630057f70d35
)
-
[
手摸手,带你封装一个vue component
](
https://segmentfault.com/a/1190000009090836
)
-
[
手摸手,带你封装一个vue component
](
https://segmentfault.com/a/1190000009090836
)
相应需求,开了一个qq群 591724180 方便大家交流
**如有问题请先看上述文章和Wiki,若不能满足,欢迎issue和pr~**
**如有问题请先看上述文章和Wiki,若不能满足,欢迎issue和pr~**
**该项目并不是一个脚手架,更倾向于是一个集成解决方案方案**
**该项目并不是一个脚手架,更倾向于是一个集成解决方案方案**
**该项目不支持低版本游览器,有需求请自行添加polyfill[详情](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)**
**该项目不支持低版本游览器,有需求请自行添加polyfill[详情](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)**
## 功能
## 功能
-
登录/注销
-
登录/注销
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
-
table example
-
table example
-
动态table example
-
动态table example
-
拖拽table example
-
拖拽table example
-
内联编辑table example
-
form example
-
form example
-
多环境发布
-
多环境发布
-
dashboard
-
dashboard
...
...
src/components/Charts/mixchart.vue
View file @
bd607b47
...
@@ -51,7 +51,6 @@
...
@@ -51,7 +51,6 @@
backgroundColor
:
'#344b58'
,
backgroundColor
:
'#344b58'
,
title
:
{
title
:
{
text
:
'统计'
,
text
:
'统计'
,
subtext
:
'from http://gallery.echartsjs.com'
,
x
:
'4%'
,
x
:
'4%'
,
textStyle
:
{
textStyle
:
{
color
:
'#fff'
,
color
:
'#fff'
,
...
...
src/views/charts/index.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
>
<div
class=
"components-container"
>
<code>
<code>
这里的所有的图表都基于
echarts,实例代码来源
<a
href=
'http://gallery.echartsjs.com/explore.html#sort=rank~timeframe=all~author=all'
target=
'_blank'
>
gallery
</a><br/>
其实echarts封装的很好了,用vue封装是很简单的事情,建议大家自己来封装。
这里的所有的图表都基于
ECharts,实例代码来源
<a
href=
'http://gallery.echartsjs.com/explore.html#sort=rank~timeframe=all~author=all'
target=
'_blank'
>
gallery
</a><br/>
其实ECharts封装的很好了,用vue封装是很简单的事情,建议大家自己来封装。
<a
target=
'_blank'
class=
'lin'
href=
"https://segmentfault.com/a/1190000009762198#articleHeader16"
>
相关教程
</a>
</code>
</code>
</div>
</div>
</
template
>
</
template
>
src/views/charts/keyboard.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
'chart-container'
>
<div
class=
'chart-container'
>
<keyboardChart
height=
'100%'
width=
'100%'
/>
<keyboardChart
height=
'100%'
width=
'100%'
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
keyboardChart
from
'components/Charts/keyboard'
;
import
keyboardChart
from
'components/Charts/keyboard'
;
export
default
{
export
default
{
components
:
{
keyboardChart
}
components
:
{
keyboardChart
}
};
};
...
@@ -16,9 +15,9 @@
...
@@ -16,9 +15,9 @@
<
style
scoped
>
<
style
scoped
>
.chart-container
{
.chart-container
{
position
:
relative
;
position
:
relative
;
width
:
100%
;
width
:
100%
;
height
:
90%
;
height
:
90%
;
}
}
</
style
>
</
style
>
src/views/charts/keyboard2.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
'chart-container'
>
<div
class=
'chart-container'
>
<keyboardChart2
id=
'apple'
height=
'100%'
width=
'100%'
/>
<keyboardChart2
id=
'apple'
height=
'100%'
width=
'100%'
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
keyboardChart2
from
'components/Charts/keyboard2'
;
import
keyboardChart2
from
'components/Charts/keyboard2'
;
export
default
{
export
default
{
components
:
{
keyboardChart2
}
components
:
{
keyboardChart2
}
};
};
...
@@ -16,9 +15,9 @@
...
@@ -16,9 +15,9 @@
<
style
scoped
>
<
style
scoped
>
.chart-container
{
.chart-container
{
position
:
relative
;
position
:
relative
;
width
:
100%
;
width
:
100%
;
height
:
90%
;
height
:
90%
;
}
}
</
style
>
</
style
>
src/views/charts/line.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
https://github.com/ecomfe/echarts/blob/master/index.js
http://echarts.baidu.com/tutorial.html
<div
class=
'chart-container'
>
<div
class=
'chart-container'
>
<lineMarker
height=
'100%'
width=
'100%'
/>
<lineMarker
height=
'100%'
width=
'100%'
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
lineMarker
from
'components/Charts/lineMarker'
;
import
lineMarker
from
'components/Charts/lineMarker'
;
export
default
{
export
default
{
components
:
{
lineMarker
}
components
:
{
lineMarker
}
};
};
...
@@ -18,9 +15,9 @@
...
@@ -18,9 +15,9 @@
<
style
scoped
>
<
style
scoped
>
.chart-container
{
.chart-container
{
position
:
relative
;
position
:
relative
;
width
:
100%
;
width
:
100%
;
height
:
80%
;
height
:
80%
;
}
}
</
style
>
</
style
>
src/views/charts/mixchart.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
'chart-container'
>
<div
class=
'chart-container'
>
<mixchart
id=
'apple'
height=
'100%'
width=
'100%'
/>
<mixchart
id=
'apple'
height=
'100%'
width=
'100%'
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
mixchart
from
'components/Charts/mixchart'
;
import
mixchart
from
'components/Charts/mixchart'
;
export
default
{
export
default
{
components
:
{
mixchart
}
components
:
{
mixchart
}
};
};
...
@@ -16,10 +15,10 @@
...
@@ -16,10 +15,10 @@
<
style
scoped
>
<
style
scoped
>
.chart-container
{
.chart-container
{
position
:
relative
;
position
:
relative
;
width
:
100%
;
width
:
100%
;
height
:
90%
;
height
:
90%
;
padding-bottom
:
40px
;
padding-bottom
:
40px
;
}
}
</
style
>
</
style
>
src/views/components/countTo.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
>
<div
class=
"components-container"
>
<code>
countTo 组件
<a
href=
'https://github.com/PanJiaChen/vue-countTo'
target=
'_blank'
>
线上地址
</a></code>
<code>
<a
href=
'https://github.com/PanJiaChen/vue-countTo'
target=
'_blank'
>
countTo component
</a></code>
<count-to
ref=
'example'
class=
'example'
:start-val=
'_startVal'
:end-val=
'_endVal'
:duration=
'_duration'
:decimals=
'_decimals'
<count-to
ref=
'example'
class=
'example'
:start-val=
'_startVal'
:end-val=
'_endVal'
:duration=
'_duration'
:decimals=
'_decimals'
:separator=
'_separator'
:prefix=
'_prefix'
:suffix=
'_suffix'
:autoplay=
'false'
/>
:separator=
'_separator'
:prefix=
'_prefix'
:suffix=
'_suffix'
:autoplay=
'false'
/>
<div
style=
'margin-left: 25%;margin-top: 40px;'
>
<div
style=
'margin-left: 25%;margin-top: 40px;'
>
<label
class=
"label"
for=
"startValInput"
>
startVal:
<input
type=
"number"
v-model
.
number=
'setStartVal'
name=
'startValInput'
/></label>
<label
class=
"label"
for=
"startValInput"
>
startVal:
<input
type=
"number"
v-model
.
number=
'setStartVal'
name=
'startValInput'
/></label>
...
@@ -20,9 +20,9 @@
...
@@ -20,9 +20,9 @@
:separator=
'
{{
_separator
}}
'
:prefix=
'
{{
_prefix
}}
'
:suffix=
'
{{
_suffix
}}
'
:autoplay=false
>
</code>
:separator=
'
{{
_separator
}}
'
:prefix=
'
{{
_prefix
}}
'
:suffix=
'
{{
_suffix
}}
'
:autoplay=false
>
</code>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
countTo
from
'vue-count-to'
;
import
countTo
from
'vue-count-to'
;
export
default
{
export
default
{
components
:
{
countTo
},
components
:
{
countTo
},
data
()
{
data
()
{
...
...
src/views/components/dndlist.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
>
<div
class=
"components-container"
>
<code>
拖拽https://github.com/SortableJS/Vue.Draggable 项目:Vue.Draggable
</code>
<code>
drag-list base on
<a
href=
"https://github.com/SortableJS/Vue.Draggable"
target=
"_blank"
>
Vue.Draggable
</a>
</code>
<div
class=
"editor-container"
>
<div
class=
"editor-container"
>
<DndList
:list1=
"list1"
:list2=
"list2"
list1Title=
"头条列表"
list2Title=
"文章池"
/>
<DndList
:list1=
"list1"
:list2=
"list2"
list1Title=
"头条列表"
list2Title=
"文章池"
/>
</div>
</div>
...
...
src/views/components/index.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
>
<div
class=
"components-container"
>
<code>
这里暂时列出了自己在项目中
自己封装和用到的组件,如有补充可以提
<a
href=
'https://github.com/PanJiaChen/vue-element-admin/issues'
target=
'_blank'
>
issue
</a><br/>
<code>
这里暂时列出了自己在项目中
用到的组件和一些自己封装的组件,如有补充可以提
<a
target=
'_blank'
href=
'https://github.com/PanJiaChen/vue-element-admin/issues'
>
issue
</a><br/>
我个人崇尚自己封装组件,因为很多组件会和业务后高度的耦合,
很多时候第三方封装是满足不了需求的
,如有需要可以看楼主之前写过的一篇
<a
href=
'https://segmentfault.com/a/1190000009090836'
target=
'_blank'
>
文章
</a>
我个人崇尚自己封装组件,因为很多组件会和业务后高度的耦合,
而且第三方封装的组件灵活性可控性都不高
,如有需要可以看楼主之前写过的一篇
<a
href=
'https://segmentfault.com/a/1190000009090836'
target=
'_blank'
>
文章
</a>
</code>
</code>
</div>
</div>
</
template
>
</
template
>
src/views/components/jsoneditor.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
style=
'height:100vh'
>
<div
class=
"components-container"
style=
'height:100vh'
>
<code>
有校验
</code>
<code>
jsonEditor is base on
<a
href=
"https://github.com/codemirror/CodeMirror"
target=
"_blank"
>
CodeMirrorr
</a>
,lint base on json-lint
</code>
<div
class=
"editor-container"
>
<div
class=
"editor-container"
>
<json-editor
ref=
"jsonEditor"
v-model=
"value"
></json-editor>
<json-editor
ref=
"jsonEditor"
v-model=
"value"
></json-editor>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
jsonEditor
from
'components/jsonEditor'
;
import
jsonEditor
from
'components/jsonEditor'
;
const
jsonData
=
'[{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"CORN"}],"name":""},{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"XAGUSD"},{"market_type":"forexdata","symbol":"AUTD"},{"market_type":"forexdata","symbol":"AGTD"}],"name":"贵金属"},{"items":[{"market_type":"forexdata","symbol":"CORN"},{"market_type":"forexdata","symbol":"WHEAT"},{"market_type":"forexdata","symbol":"SOYBEAN"},{"market_type":"forexdata","symbol":"SUGAR"}],"name":"农产品"},{"items":[{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"USOIL"},{"market_type":"forexdata","symbol":"NGAS"}],"name":"能源化工"}]'
;
const
jsonData
=
'[{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"CORN"}],"name":""},{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"XAGUSD"},{"market_type":"forexdata","symbol":"AUTD"},{"market_type":"forexdata","symbol":"AGTD"}],"name":"贵金属"},{"items":[{"market_type":"forexdata","symbol":"CORN"},{"market_type":"forexdata","symbol":"WHEAT"},{"market_type":"forexdata","symbol":"SOYBEAN"},{"market_type":"forexdata","symbol":"SUGAR"}],"name":"农产品"},{"items":[{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"USOIL"},{"market_type":"forexdata","symbol":"NGAS"}],"name":"能源化工"}]'
;
...
@@ -21,8 +22,8 @@
...
@@ -21,8 +22,8 @@
<
style
scoped
>
<
style
scoped
>
.editor-container
{
.editor-container
{
position
:
relative
;
position
:
relative
;
height
:
100%
;
height
:
100%
;
}
}
</
style
>
</
style
>
src/views/components/markdown.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"components-container"
>
<div
class=
"components-container"
>
<code>
公司做的后台主要是一个cms系统,公司也是以自媒体为核心的,所以富文本是后台很核心的功能。在选择富文本的过程中也走了不少的弯路,市面上常见的富文本都基本用过了,最终选择了tinymce
</code>
<code>
Markdown 我们这里选用了
<a
href=
"https://github.com/sparksuite/simplemde-markdown-editor"
target=
"_blank"
>
simplemde-markdown-editor
</a>
,简单的用vue封装了一下
<a
target=
'_blank'
href=
'https://segmentfault.com/a/1190000009762198#articleHeader14'
>
相关文章
</a>
</code>
<div
class=
"editor-container"
>
<div
class=
"editor-container"
>
<MdEditor
id=
'contentEditor'
ref=
"contentEditor"
v-model=
'content'
:height=
"300"
:zIndex=
'20'
></MdEditor>
<MdEditor
id=
'contentEditor'
ref=
"contentEditor"
v-model=
'content'
:height=
"300"
:zIndex=
'20'
></MdEditor>
</div>
</div>
<el-button
@
click=
'markdown2Html'
style=
"margin-top:80px;"
type=
"primary"
>
转为HTML
<i
class=
"el-icon-document el-icon--right"
></i></el-button>
<el-button
@
click=
'markdown2Html'
style=
"margin-top:80px;"
type=
"primary"
>
转为HTML
<i
class=
"el-icon-document el-icon--right"
></i></el-button>
<div
v-html=
"html"
></div>
<div
v-html=
"html"
></div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
MdEditor
from
'components/MdEditor'
;
import
MdEditor
from
'components/MdEditor'
;
export
default
{
export
default
{
components
:
{
MdEditor
},
components
:
{
MdEditor
},
data
()
{
data
()
{
return
{
return
{
content
:
'Simplemde'
,
content
:
'
##
Simplemde'
,
html
:
''
html
:
''
}
}
},
},
...
...
src/views/errlog/index.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"errPage-container"
>
<div
class=
"errPage-container"
>
<!--error code-->
<err-code/>
<err-code/>
<!--error code-->
<h3>
请点击右上角bug小图表
</h3>
<h3>
请点击右上角bug小图表
</h3>
<code>
<code>
现在的管理后台基本都是spa的形式了,它增强了用户体验,但同时也会怎增加页面出问题的可能性,可能一个小小的疏忽就导致整个页面的死锁。好在Vue官网提供了一个方法来捕获处理异常
现在的管理后台基本都是spa的形式了,它增强了用户体验,但同时也会怎增加页面出问题的可能性,可能一个小小的疏忽就导致整个页面的死锁。好在Vue官网提供了一个方法来捕获处理异常
</code>
</code>
<a
href=
"#"
><img
src=
'../../../documentImg/code1.png'
></a>
<a
href=
"#"
><img
src=
'../../../documentImg/code1.png'
></a>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
errCode
from
'./errcode'
;
import
errCode
from
'./errcode'
;
// import code1Img from
export
default
{
export
default
{
components
:
{
errCode
},
components
:
{
errCode
},
data
()
{
return
{
}
},
methods
:
{
methods
:
{
back
()
{
back
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
...
@@ -28,6 +21,7 @@
...
@@ -28,6 +21,7 @@
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.errPage-container
{
.errPage-container
{
padding
:
30px
;
padding
:
30px
;
...
...
src/views/error/401.vue
View file @
bd607b47
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<h1
class=
"text-jumbo text-ginormous"
>
Oops!
</h1>
<h1
class=
"text-jumbo text-ginormous"
>
Oops!
</h1>
gif来源
<a
href=
'https://zh.airbnb.com/'
target=
'_blank'
>
airbnb
</a>
页面
gif来源
<a
href=
'https://zh.airbnb.com/'
target=
'_blank'
>
airbnb
</a>
页面
<h2>
你没有权限去该页面
</h2>
<h2>
你没有权限去该页面
</h2>
<h6>
如有不满请联系你领导
</h6>
<h6>
如有不满请联系你领导
</h6>
<ul
class=
"list-unstyled"
>
<ul
class=
"list-unstyled"
>
...
@@ -26,9 +26,9 @@
...
@@ -26,9 +26,9 @@
</el-dialog>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
errGif
from
'assets/401.gif'
;
import
errGif
from
'assets/401.gif'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -50,38 +50,38 @@
...
@@ -50,38 +50,38 @@
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.errPage-container
{
.errPage-container
{
width
:
800px
;
width
:
800px
;
margin
:
100px
auto
;
margin
:
100px
auto
;
.pan-back-btn
{
.pan-back-btn
{
background
:
#008489
;
background
:
#008489
;
color
:
#fff
;
color
:
#fff
;
}
}
.pan-gif
{
.pan-gif
{
margin
:
0
auto
;
margin
:
0
auto
;
display
:
block
;
display
:
block
;
}
}
.pan-img
{
.pan-img
{
display
:
block
;
display
:
block
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
.text-jumbo
{
.text-jumbo
{
font-size
:
60px
;
font-size
:
60px
;
font-weight
:
700
;
font-weight
:
700
;
color
:
#484848
;
color
:
#484848
;
}
}
.list-unstyled
{
.list-unstyled
{
font-size
:
14px
;
font-size
:
14px
;
li
{
li
{
padding-bottom
:
5px
;
padding-bottom
:
5px
;
}
}
a
{
a
{
color
:
#008489
;
color
:
#008489
;
text-decoration
:
none
;
text-decoration
:
none
;
&
:hover
{
&
:hover
{
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
}
}
}
}
}
}
</
style
>
</
style
>
src/views/error/404.vue
View file @
bd607b47
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</div>
</div>
<div
class=
"bullshit"
>
<div
class=
"bullshit"
>
<div
class=
"bullshit__oops"
>
OOPS!
</div>
<div
class=
"bullshit__oops"
>
OOPS!
</div>
<div
class=
"bullshit__info"
>
版权所有
<a
class=
'link-type'
href=
'https://wallstreetcn.com'
target=
'_blank'
>
华尔街见闻
</a></div>
<div
class=
"bullshit__info"
>
版权所有
<a
class=
'link-type'
href=
'https://wallstreetcn.com'
target=
'_blank'
>
华尔街见闻
</a></div>
<div
class=
"bullshit__headline"
>
{{
message
}}
</div>
<div
class=
"bullshit__headline"
>
{{
message
}}
</div>
<div
class=
"bullshit__info"
>
请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告
</div>
<div
class=
"bullshit__info"
>
请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告
</div>
<a
href=
"/"
class=
"bullshit__return-home"
>
返回首页
</a>
<a
href=
"/"
class=
"bullshit__return-home"
>
返回首页
</a>
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
computed
:
{
computed
:
{
...
@@ -26,6 +27,7 @@
...
@@ -26,6 +27,7 @@
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.wscn-http404
{
.wscn-http404
{
position
:
relative
;
position
:
relative
;
...
...
src/views/example/table/dynamictable.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-checkbox-group
v-model=
"formThead"
>
<el-checkbox-group
v-model=
"formThead"
>
<el-checkbox
label=
"apple"
>
apple
</el-checkbox>
<el-checkbox
label=
"apple"
>
apple
</el-checkbox>
<el-checkbox
label=
"banana"
>
banana
</el-checkbox>
<el-checkbox
label=
"banana"
>
banana
</el-checkbox>
<el-checkbox
label=
"orange"
>
orange
</el-checkbox>
<el-checkbox
label=
"orange"
>
orange
</el-checkbox>
...
@@ -18,22 +18,21 @@
...
@@ -18,22 +18,21 @@
</el-table>
</el-table>
</div>
</div>
</template>
</template>
<
script
>
export
default
{
<
script
>
data
()
{
export
default
{
return
{
data
()
{
tableData
:
[{
return
{
name
:
'水果'
,
tableData
:
[{
list
:
[{
name
:
'apple'
,
value
:
10
},
{
name
:
'banana'
,
value
:
20
},
{
name
:
'orange'
,
value
:
20
}]
name
:
'水果'
,
},
{
list
:
[{
name
:
'apple'
,
value
:
10
},
{
name
:
'banana'
,
value
:
20
},
{
name
:
'orange'
,
value
:
20
}]
name
:
'水果2'
,
},
{
list
:
[{
name
:
'apple2'
,
value
:
12
},
{
name
:
'banana2'
,
value
:
22
},
{
name
:
'orange'
,
value
:
20
}]
name
:
'水果2'
,
}],
list
:
[{
name
:
'apple2'
,
value
:
12
},
{
name
:
'banana2'
,
value
:
22
},
{
name
:
'orange'
,
value
:
20
}]
formThead
:
[
'apple'
,
'banana'
]
}],
formThead
:
[
'apple'
,
'banana'
]
}
}
}
}
};
};
</
script
>
</
script
>
src/views/example/table/table.vue
View file @
bd607b47
...
@@ -22,10 +22,10 @@
...
@@ -22,10 +22,10 @@
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
@
click=
"handleCreate"
type=
"primary"
icon=
"edit"
>
添加
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
@
click=
"handleCreate"
type=
"primary"
icon=
"edit"
>
添加
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"document"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"document"
@
click=
"handleDownload"
>
导出
</el-button>
<el-checkbox
class=
"filter-item"
@
change=
'tableKey=tableKey+1'
v-model=
"showAuditor"
>
显示审核人
</el-checkbox>
<el-checkbox
class=
"filter-item"
@
change=
'tableKey=tableKey+1'
v-model=
"showAuditor"
>
显示审核人
</el-checkbox>
</div>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
align=
"center"
label=
"序号"
width=
"65"
>
<el-table-column
align=
"center"
label=
"序号"
width=
"65"
>
<template
scope=
"scope"
>
<template
scope=
"scope"
>
...
@@ -58,10 +58,9 @@
...
@@ -58,10 +58,9 @@
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
width
=
"80px"
label
=
"重要性"
>
<
el
-
table
-
column
width
=
"80px"
label
=
"重要性"
>
<
template
scope
=
"scope"
>
<
template
scope
=
"scope"
>
<
wscn
-
icon
-
svg
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"wujiaoxing"
class
=
"meta-item__icon"
:
key
=
"n"
/>
<
wscn
-
icon
-
svg
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"wujiaoxing"
class
=
"meta-item__icon"
:
key
=
"n"
/>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
@@ -71,28 +70,28 @@
...
@@ -71,28 +70,28 @@
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
class
-
name
=
"status-col"
label
=
"状态"
width
=
"90"
>
<
el
-
table
-
column
class
-
name
=
"status-col"
label
=
"状态"
width
=
"90"
>
<
template
scope
=
"scope"
>
<
template
scope
=
"scope"
>
<
el
-
tag
:
type
=
"scope.row.status | statusFilter"
>
{{
scope
.
row
.
status
}}
<
/el-tag
>
<
el
-
tag
:
type
=
"scope.row.status | statusFilter"
>
{{
scope
.
row
.
status
}}
<
/el-tag
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"center"
label
=
"操作"
width
=
"150"
>
<
el
-
table
-
column
align
=
"center"
label
=
"操作"
width
=
"150"
>
<
template
scope
=
"scope"
>
<
template
scope
=
"scope"
>
<
el
-
button
v
-
if
=
"scope.row.status!='published'"
size
=
"small"
type
=
"success"
@
click
=
"handleModifyStatus(scope.row,'published')"
>
发布
<
el
-
button
v
-
if
=
"scope.row.status!='published'"
size
=
"small"
type
=
"success"
@
click
=
"handleModifyStatus(scope.row,'published')"
>
发布
<
/el-button
>
<
/el-button
>
<
el
-
button
v
-
if
=
"scope.row.status!='draft'"
size
=
"small"
@
click
=
"handleModifyStatus(scope.row,'draft')"
>
草稿
<
el
-
button
v
-
if
=
"scope.row.status!='draft'"
size
=
"small"
@
click
=
"handleModifyStatus(scope.row,'draft')"
>
草稿
<
/el-button
>
<
/el-button
>
<
el
-
button
v
-
if
=
"scope.row.status!='deleted'"
size
=
"small"
type
=
"danger"
@
click
=
"handleModifyStatus(scope.row,'deleted')"
>
删除
<
el
-
button
v
-
if
=
"scope.row.status!='deleted'"
size
=
"small"
type
=
"danger"
@
click
=
"handleModifyStatus(scope.row,'deleted')"
>
删除
<
/el-button
>
<
/el-button
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
<
div
v
-
show
=
"!listLoading"
class
=
"pagination-container"
>
<
div
v
-
show
=
"!listLoading"
class
=
"pagination-container"
>
<
el
-
pagination
@
size
-
change
=
"handleSizeChange"
@
current
-
change
=
"handleCurrentChange"
:
current
-
page
.
sync
=
"listQuery.page"
:
page
-
sizes
=
"[10,20,30, 50]"
<
el
-
pagination
@
size
-
change
=
"handleSizeChange"
@
current
-
change
=
"handleCurrentChange"
:
current
-
page
.
sync
=
"listQuery.page"
:
page
-
size
=
"listQuery.limit"
layout
=
"total, sizes, prev, pager, next, jumper"
:
total
=
"total"
>
:
page
-
size
s
=
"[10,20,30, 50]"
:
page
-
size
=
"listQuery.limit"
layout
=
"total, sizes, prev, pager, next, jumper"
:
total
=
"total"
>
<
/el-pagination
>
<
/el-pagination
>
<
/div
>
<
/div
>
...
@@ -138,14 +137,14 @@
...
@@ -138,14 +137,14 @@
<
/el-dialog
>
<
/el-dialog
>
<
el
-
dialog
title
=
"阅读数统计"
:
visible
.
sync
=
"dialogPvVisible"
size
=
"small"
>
<
el
-
dialog
title
=
"阅读数统计"
:
visible
.
sync
=
"dialogPvVisible"
size
=
"small"
>
<
el
-
table
:
data
=
"pvData"
border
fit
highlight
-
current
-
row
style
=
"width: 100%"
>
<
el
-
table
:
data
=
"pvData"
border
fit
highlight
-
current
-
row
style
=
"width: 100%"
>
<
el
-
table
-
column
prop
=
"key"
label
=
"渠道"
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"key"
label
=
"渠道"
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"pv"
label
=
"pv"
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"pv"
label
=
"pv"
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"dialogPvVisible = false"
>
确
定
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"dialogPvVisible = false"
>
确
定
<
/el-button
>
<
/span
>
<
/span
>
<
/el-dialog
>
<
/el-dialog
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
...
src/views/excel/index.vue
View file @
bd607b47
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
</el-table>
</el-table>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getList
}
from
'api/article'
;
import
{
getList
}
from
'api/article'
;
export
default
{
export
default
{
...
...
src/views/layout/AppMain.vue
View file @
bd607b47
...
@@ -11,9 +11,7 @@
...
@@ -11,9 +11,7 @@
name
:
'AppMain'
,
name
:
'AppMain'
,
computed
:
{
computed
:
{
key
()
{
key
()
{
return
this
.
$route
.
name
!==
undefined
return
this
.
$route
.
name
!==
undefined
?
this
.
$route
.
name
+
+
new
Date
()
:
this
.
$route
+
+
new
Date
()
?
this
.
$route
.
name
+
+
new
Date
()
:
this
.
$route
+
+
new
Date
()
}
}
}
}
}
}
...
...
src/views/layout/Layout.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"app-wrapper"
:class=
"
{hideSidebar:!sidebar.opened}">
<div
class=
"app-wrapper"
:class=
"
{hideSidebar:!sidebar.opened}">
<div
class=
"sidebar-wrapper"
>
<div
class=
"sidebar-wrapper"
>
<Sidebar
class=
"sidebar-container"
/>
<Sidebar
class=
"sidebar-container"
/>
</div>
</div>
<div
class=
"main-container"
>
<div
class=
"main-container"
>
<Navbar/>
<Navbar/>
...
@@ -27,9 +27,9 @@
...
@@ -27,9 +27,9 @@
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
@import
"src/styles/mixin.scss"
;
@import
"src/styles/mixin.scss"
;
.app-wrapper
{
.app-wrapper
{
@include
clearfix
;
@include
clearfix
;
position
:
relative
;
position
:
relative
;
...
...
src/views/layout/Levelbar.vue
View file @
bd607b47
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.app-levelbar.el-breadcrumb
{
.app-levelbar.el-breadcrumb
{
display
:
inline-block
;
display
:
inline-block
;
...
...
src/views/layout/Navbar.vue
View file @
bd607b47
...
@@ -6,15 +6,15 @@
...
@@ -6,15 +6,15 @@
<el-dropdown
class=
"avatar-container"
trigger=
"click"
>
<el-dropdown
class=
"avatar-container"
trigger=
"click"
>
<div
class=
"avatar-wrapper"
>
<div
class=
"avatar-wrapper"
>
<img
class=
"user-avatar"
:src=
"avatar+'?imageView2/1/w/80/h/80'"
>
<img
class=
"user-avatar"
:src=
"avatar+'?imageView2/1/w/80/h/80'"
>
<i
class=
"el-icon-caret-bottom"
/>
<i
class=
"el-icon-caret-bottom"
/>
</div>
</div>
<el-dropdown-menu
class=
"user-dropdown"
slot=
"dropdown"
>
<el-dropdown-menu
class=
"user-dropdown"
slot=
"dropdown"
>
<router-link
class=
'inlineBlock'
to=
"/"
>
<router-link
class=
'inlineBlock'
to=
"/"
>
<el-dropdown-item>
<el-dropdown-item>
首页
首页
</el-dropdown-item>
</el-dropdown-item>
</router-link>
</router-link>
<router-link
class=
'inlineBlock'
to=
"/admin/profile"
>
<router-link
class=
'inlineBlock'
to=
"/admin/profile"
>
<el-dropdown-item>
<el-dropdown-item>
设置
设置
</el-dropdown-item>
</el-dropdown-item>
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.navbar
{
.navbar
{
height
:
50px
;
height
:
50px
;
...
...
src/views/layout/Sidebar.vue
View file @
bd607b47
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.el-menu
{
.el-menu
{
min-height
:
100%
;
min-height
:
100%
;
...
...
src/views/layout/SidebarItem.vue
View file @
bd607b47
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.wscn-icon
{
.wscn-icon
{
margin-right
:
10px
;
margin-right
:
10px
;
...
...
src/views/permission/index.vue
View file @
bd607b47
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<div
style=
'margin-bottom:15px;'
>
你的权限:
{{
roles
}}
</div>
<div
style=
'margin-bottom:15px;'
>
你的权限:
{{
roles
}}
</div>
切换权限:
切换权限:
<el-radio-group
v-model=
"role"
>
<el-radio-group
v-model=
"role"
>
<el-radio-button
label=
"editor"
></el-radio-button>
<el-radio-button
label=
"editor"
></el-radio-button>
</el-radio-group>
</el-radio-group>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/theme/index.vue
View file @
bd607b47
...
@@ -76,17 +76,17 @@ export default {
...
@@ -76,17 +76,17 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.box-card
{
.box-card
{
width
:
400px
;
width
:
400px
;
margin
:
20px
auto
;
margin
:
20px
auto
;
}
}
.block
{
.block
{
padding
:
30px
24px
;
padding
:
30px
24px
;
}
}
.alert-item
{
.alert-item
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.tag-item
{
.tag-item
{
margin-right
:
15px
;
margin-right
:
15px
;
}
}
</
style
>
</
style
>
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