Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
630d06bf76 | ||
|
8c9ebd7345 | ||
|
89c72d277e | ||
|
108b380d20 | ||
|
69fc52d4e9 | ||
|
d78b49803d | ||
|
dd9ef5145d | ||
|
ae44d0b8ca | ||
|
6ad03ac5f0 | ||
|
553ef477ef | ||
|
1083a17386 | ||
|
535fe083e5 | ||
|
83e8dfc494 | ||
|
77ff823037 |
@@ -47,7 +47,7 @@
|
||||
- Sticky
|
||||
- CountTo
|
||||
- echarts图表
|
||||
- 401,401错误页面
|
||||
- 401,404错误页面
|
||||
- 错误日志
|
||||
- 导出excel
|
||||
- table example
|
||||
|
@@ -10,7 +10,7 @@ module.exports = {
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: './', //请根据自己路径配置更改
|
||||
staticPath:'./static/', //请根据自己路径配置更改
|
||||
productionSourceMap: true,
|
||||
productionSourceMap: false,
|
||||
// Gzip off by default as many popular static hosts such as
|
||||
// Surge or Netlify already gzip all static assets for you.
|
||||
// Before setting to `true`, make sure to:
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
Binary file not shown.
Before Width: | Height: | Size: 117 KiB |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "juicy",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"description": "A Vue.js admin",
|
||||
"author": "Pan <panfree23@gmail.com>",
|
||||
"license": "MIT",
|
||||
@@ -17,7 +17,7 @@
|
||||
"codemirror": "5.26.0",
|
||||
"dropzone": "5.1.0",
|
||||
"echarts": "3.6.1",
|
||||
"element-ui": "1.3.6",
|
||||
"element-ui": "1.4.1",
|
||||
"file-saver": "1.3.3",
|
||||
"jquery": "3.1.1",
|
||||
"js-cookie": "2.1.4",
|
||||
@@ -29,7 +29,7 @@
|
||||
"showdown": "1.7.1",
|
||||
"simplemde": "1.11.2",
|
||||
"sortablejs": "1.5.1",
|
||||
"vue": "2.3.3",
|
||||
"vue": "2.4.2",
|
||||
"vue-count-to": "1.0.5",
|
||||
"vue-multiselect": "2.0.0-beta.15",
|
||||
"vue-router": "2.5.3",
|
||||
@@ -78,7 +78,7 @@
|
||||
"url-loader": "0.5.8",
|
||||
"vue-loader": "12.2.1",
|
||||
"vue-style-loader": "3.0.1",
|
||||
"vue-template-compiler": "2.3.3",
|
||||
"vue-template-compiler": "2.4.2",
|
||||
"webpack": "2.6.1",
|
||||
"webpack-bundle-analyzer": "2.8.2",
|
||||
"webpack-dev-middleware": "1.10.2",
|
||||
|
File diff suppressed because one or more lines are too long
@@ -87,7 +87,7 @@ router.afterEach(() => {
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
// 生产环境错误日志
|
||||
if (process.env === 'production') {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
Vue.config.errorHandler = function(err, vm) {
|
||||
console.log(err, window.location.href);
|
||||
errLog.pushLog({
|
||||
|
@@ -3,89 +3,30 @@ import Router from 'vue-router';
|
||||
const _import = require('./_import_' + process.env.NODE_ENV);
|
||||
// in development env not use Lazy Loading,because Lazy Loading large page will cause webpack hot update too slow.so only in production use Lazy Loading
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
/* layout */
|
||||
import Layout from '../views/layout/Layout';
|
||||
|
||||
/* login */
|
||||
const Login = _import('login/index');
|
||||
const authRedirect = _import('login/authredirect');
|
||||
|
||||
/* dashboard */
|
||||
const dashboard = _import('dashboard/index');
|
||||
|
||||
/* Introduction */
|
||||
const Introduction = _import('introduction/index');
|
||||
|
||||
/* components */
|
||||
const componentsIndex = _import('components/index');
|
||||
const Tinymce = _import('components/tinymce');
|
||||
const Markdown = _import('components/markdown');
|
||||
const JsonEditor = _import('components/jsoneditor');
|
||||
const DndList = _import('components/dndlist');
|
||||
const AvatarUpload = _import('components/avatarUpload');
|
||||
const Dropzone = _import('components/dropzone');
|
||||
const Sticky = _import('components/sticky');
|
||||
const SplitPane = _import('components/splitpane');
|
||||
const CountTo = _import('components/countTo');
|
||||
const Mixin = _import('components/mixin');
|
||||
const BackToTop = _import('components/backToTop')
|
||||
|
||||
/* charts */
|
||||
const chartIndex = _import('charts/index');
|
||||
const KeyboardChart = _import('charts/keyboard');
|
||||
const KeyboardChart2 = _import('charts/keyboard2');
|
||||
const LineMarker = _import('charts/line');
|
||||
const MixChart = _import('charts/mixChart');
|
||||
|
||||
/* error page */
|
||||
const Err404 = _import('error/404');
|
||||
const Err401 = _import('error/401');
|
||||
|
||||
/* error log */
|
||||
const ErrorLog = _import('errlog/index');
|
||||
|
||||
/* excel */
|
||||
const ExcelDownload = _import('excel/index');
|
||||
const SelectExcelDownload = _import('excel/selectExcel');
|
||||
|
||||
/* theme */
|
||||
const Theme = _import('theme/index');
|
||||
|
||||
/* example */
|
||||
const TableLayout = _import('example/table/index');
|
||||
const DynamicTable = _import('example/table/dynamictable');
|
||||
const Table = _import('example/table/table');
|
||||
const DragTable = _import('example/table/dragTable');
|
||||
const InlineEditTable = _import('example/table/inlineEditTable');
|
||||
|
||||
const Form = _import('example/form');
|
||||
const Tab = _import('example/tab/index');
|
||||
|
||||
/* permission */
|
||||
const Permission = _import('permission/index');
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
/**
|
||||
* icon : the icon show in the sidebar
|
||||
* hidden : if hidden:true will not show in the sidebar
|
||||
* redirect : if redirect:noredirect will not redirct in the levelbar
|
||||
* noDropdown : if noDropdown:true will not has submenu
|
||||
* meta : { role: ['admin'] } will control the page role
|
||||
**/
|
||||
|
||||
/**
|
||||
* icon : the icon show in the sidebar
|
||||
* hidden : if `hidden:true` will not show in the sidebar
|
||||
* redirect : if `redirect:noredirect` will no redirct in the levelbar
|
||||
* noDropdown : if `noDropdown:true` will has no submenu
|
||||
* meta : { role: ['admin'] } will control the page role
|
||||
**/
|
||||
export const constantRouterMap = [
|
||||
{ path: '/login', component: Login, hidden: true },
|
||||
{ path: '/authredirect', component: authRedirect, hidden: true },
|
||||
{ path: '/404', component: Err404, hidden: true },
|
||||
{ path: '/401', component: Err401, hidden: true },
|
||||
{ path: '/login', component: _import('login/index'), hidden: true },
|
||||
{ path: '/authredirect', component: _import('login/authredirect'), hidden: true },
|
||||
{ path: '/404', component: _import('error/404'), hidden: true },
|
||||
{ path: '/401', component: _import('error/401'), hidden: true },
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/dashboard',
|
||||
name: '首页',
|
||||
hidden: true,
|
||||
children: [{ path: 'dashboard', component: dashboard }]
|
||||
children: [{ path: 'dashboard', component: _import('dashboard/index') }]
|
||||
},
|
||||
{
|
||||
path: '/introduction',
|
||||
@@ -93,7 +34,7 @@ export const constantRouterMap = [
|
||||
redirect: '/introduction/index',
|
||||
icon: 'xinrenzhinan',
|
||||
noDropdown: true,
|
||||
children: [{ path: 'index', component: Introduction, name: '简述' }]
|
||||
children: [{ path: 'index', component: _import('introduction/index'), name: '简述' }]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -112,7 +53,7 @@ export const asyncRouterMap = [
|
||||
icon: 'quanxian',
|
||||
meta: { role: ['admin'] },
|
||||
noDropdown: true,
|
||||
children: [{ path: 'index', component: Permission, name: '权限测试页', meta: { role: ['admin'] } }]
|
||||
children: [{ path: 'index', component: _import('permission/index'), name: '权限测试页', meta: { role: ['admin'] } }]
|
||||
},
|
||||
{
|
||||
path: '/components',
|
||||
@@ -121,18 +62,18 @@ export const asyncRouterMap = [
|
||||
name: '组件',
|
||||
icon: 'zujian',
|
||||
children: [
|
||||
{ path: 'index', component: componentsIndex, name: '介绍 ' },
|
||||
{ path: 'tinymce', component: Tinymce, name: '富文本编辑器' },
|
||||
{ path: 'markdown', component: Markdown, name: 'Markdown' },
|
||||
{ path: 'jsoneditor', component: JsonEditor, name: 'JSON编辑器' },
|
||||
{ path: 'dndlist', component: DndList, name: '列表拖拽' },
|
||||
{ path: 'splitpane', component: SplitPane, name: 'SplitPane' },
|
||||
{ path: 'avatarupload', component: AvatarUpload, name: '头像上传' },
|
||||
{ path: 'dropzone', component: Dropzone, name: 'Dropzone' },
|
||||
{ path: 'sticky', component: Sticky, name: 'Sticky' },
|
||||
{ path: 'countto', component: CountTo, name: 'CountTo' },
|
||||
{ path: 'mixin', component: Mixin, name: '小组件' },
|
||||
{ path: 'backtotop', component: BackToTop, name: '返回顶部' }
|
||||
{ path: 'index', component: _import('components/index'), name: '介绍 ' },
|
||||
{ path: 'tinymce', component: _import('components/tinymce'), name: '富文本编辑器' },
|
||||
{ path: 'markdown', component: _import('components/markdown'), name: 'Markdown' },
|
||||
{ path: 'jsoneditor', component: _import('components/jsoneditor'), name: 'JSON编辑器' },
|
||||
{ path: 'dndlist', component: _import('components/dndlist'), name: '列表拖拽' },
|
||||
{ path: 'splitpane', component: _import('components/splitpane'), name: 'SplitPane' },
|
||||
{ path: 'avatarupload', component: _import('components/avatarUpload'), name: '头像上传' },
|
||||
{ path: 'dropzone', component: _import('components/dropzone'), name: 'Dropzone' },
|
||||
{ path: 'sticky', component: _import('components/sticky'), name: 'Sticky' },
|
||||
{ path: 'countto', component: _import('components/countTo'), name: 'CountTo' },
|
||||
{ path: 'mixin', component: _import('components/mixin'), name: '小组件' },
|
||||
{ path: 'backtotop', component: _import('components/backToTop'), name: '返回顶部' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -142,53 +83,13 @@ export const asyncRouterMap = [
|
||||
name: '图表',
|
||||
icon: 'tubiaoleixingzhengchang',
|
||||
children: [
|
||||
{ path: 'index', component: chartIndex, name: '介绍' },
|
||||
{ path: 'keyboard', component: KeyboardChart, name: '键盘图表' },
|
||||
{ path: 'keyboard2', component: KeyboardChart2, name: '键盘图表2' },
|
||||
{ path: 'line', component: LineMarker, name: '折线图' },
|
||||
{ path: 'mixchart', component: MixChart, name: '混合图表' }
|
||||
{ path: 'index', component: _import('charts/index'), name: '介绍' },
|
||||
{ path: 'keyboard', component: _import('charts/keyboard'), name: '键盘图表' },
|
||||
{ path: 'keyboard2', component: _import('charts/keyboard2'), name: '键盘图表2' },
|
||||
{ path: 'line', component: _import('charts/line'), name: '折线图' },
|
||||
{ path: 'mixchart', component: _import('charts/mixChart'), name: '混合图表' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/errorpage',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: '错误页面',
|
||||
icon: '404',
|
||||
children: [
|
||||
{ path: '401', component: Err401, name: '401' },
|
||||
{ path: '404', component: Err404, name: '404' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/errlog',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'errlog',
|
||||
icon: 'bug',
|
||||
noDropdown: true,
|
||||
children: [{ path: 'log', component: ErrorLog, name: '错误日志' }]
|
||||
},
|
||||
{
|
||||
path: '/excel',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'excel',
|
||||
icon: 'EXCEL',
|
||||
children: [
|
||||
{ path: 'download', component: ExcelDownload, name: '导出excel' },
|
||||
{ path: 'download2', component: SelectExcelDownload, name: '选择导出excel' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/theme',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'theme',
|
||||
icon: 'theme',
|
||||
noDropdown: true,
|
||||
children: [{ path: 'index', component: Theme, name: '换肤' }]
|
||||
},
|
||||
{
|
||||
path: '/example',
|
||||
component: Layout,
|
||||
@@ -198,21 +99,63 @@ export const asyncRouterMap = [
|
||||
children: [
|
||||
{
|
||||
path: '/example/table',
|
||||
component: TableLayout,
|
||||
component: _import('example/table/index'),
|
||||
redirect: '/example/table/table',
|
||||
name: 'Table',
|
||||
icon: 'table',
|
||||
children: [
|
||||
{ path: 'dynamictable', component: DynamicTable, name: '动态table' },
|
||||
{ path: 'dragtable', component: DragTable, name: '拖拽table' },
|
||||
{ path: 'inline_edit_table', component: InlineEditTable, name: 'table内编辑' },
|
||||
{ path: 'table', component: Table, name: '综合table' }
|
||||
{ path: 'dynamictable', component: _import('example/table/dynamictable'), name: '动态table' },
|
||||
{ path: 'dragtable', component: _import('example/table/dragTable'), name: '拖拽table' },
|
||||
{ path: 'inline_edit_table', component: _import('example/table/inlineEditTable'), name: 'table内编辑' },
|
||||
{ path: 'table', component: _import('example/table/table'), name: '综合table' }
|
||||
]
|
||||
},
|
||||
{ path: 'form/edit', component: Form, name: '编辑Form', meta: { isEdit: true } },
|
||||
{ path: 'form/create', component: Form, name: '创建Form' },
|
||||
{ path: 'form/edit', icon: 'ziliaoshouce', component: _import('example/form'), name: '编辑Form', meta: { isEdit: true } },
|
||||
{ path: 'form/create', icon: 'yinhangqia', component: _import('example/form'), name: '创建Form' },
|
||||
|
||||
{ path: 'tab/index', component: Tab, name: 'Tab' }
|
||||
{ path: 'tab/index', icon: 'mobankuangjia', component: _import('example/tab/index'), name: 'Tab' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/errorpage',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: '错误页面',
|
||||
icon: '404',
|
||||
children: [
|
||||
{ path: '401', component: _import('error/401'), name: '401' },
|
||||
{ path: '404', component: _import('error/404'), name: '404' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/errlog',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'errlog',
|
||||
icon: 'bug',
|
||||
noDropdown: true,
|
||||
children: [{ path: 'log', component: _import('errlog/index'), name: '错误日志' }]
|
||||
},
|
||||
{
|
||||
path: '/excel',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'excel',
|
||||
icon: 'EXCEL',
|
||||
children: [
|
||||
{ path: 'download', component: _import('excel/index'), name: '导出excel' },
|
||||
{ path: 'download2', component: _import('excel/selectExcel'), name: '选择导出excel' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/theme',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'theme',
|
||||
icon: 'theme',
|
||||
noDropdown: true,
|
||||
children: [{ path: 'index', component: _import('theme/index'), name: '换肤' }]
|
||||
},
|
||||
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
];
|
||||
|
@@ -1,83 +1,82 @@
|
||||
//覆盖一些element-ui样式
|
||||
.block-checkbox {
|
||||
display: block;
|
||||
}
|
||||
.block-checkbox {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.operation-container {
|
||||
.cell {
|
||||
padding: 10px !important;
|
||||
}
|
||||
.el-button {
|
||||
&:nth-child(3) {
|
||||
margin-top: 10px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.operation-container {
|
||||
.cell {
|
||||
padding: 10px !important;
|
||||
}
|
||||
.el-button {
|
||||
&:nth-child(3) {
|
||||
margin-top: 10px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-upload {
|
||||
input[type="file"] {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.el-upload {
|
||||
input[type="file"] {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-upload__input {
|
||||
display: none;
|
||||
}
|
||||
.el-upload__input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cell {
|
||||
.el-tag {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.cell {
|
||||
.el-tag {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.small-padding {
|
||||
.cell {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
}
|
||||
.small-padding {
|
||||
.cell {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.status-col {
|
||||
.cell {
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
.el-tag {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.status-col {
|
||||
.cell {
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
.el-tag {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461
|
||||
.el-dialog {
|
||||
transform: none;
|
||||
left: 0;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
//暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461
|
||||
.el-dialog {
|
||||
transform: none;
|
||||
left: 0;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
//文章页textarea修改样式
|
||||
.article-textarea {
|
||||
textarea {
|
||||
padding-right: 40px;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #bfcbd9;
|
||||
}
|
||||
}
|
||||
|
||||
//文章页textarea修改样式
|
||||
.article-textarea {
|
||||
textarea {
|
||||
padding-right: 40px;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #bfcbd9;
|
||||
}
|
||||
}
|
||||
|
||||
//element ui upload
|
||||
.upload-container {
|
||||
.el-upload {
|
||||
width: 100%;
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
//element ui upload
|
||||
.upload-container {
|
||||
.el-upload {
|
||||
width: 100%;
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
@import './mixin.scss';
|
||||
@import './btn.scss';
|
||||
@import './element-ui.scss';
|
||||
@import './mixin.scss';
|
||||
@import './sidebar.scss';
|
||||
|
||||
body {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
76
src/styles/sidebar.scss
Normal file
76
src/styles/sidebar.scss
Normal file
@@ -0,0 +1,76 @@
|
||||
// 侧边栏
|
||||
.sidebar-container>.el-menu {
|
||||
width: 100%!important;
|
||||
}
|
||||
|
||||
.sidebar-container .svg-icon {
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.hideSidebar .el-submenu>.el-submenu__title,
|
||||
.hideSidebar .submenu-title-noDropdown {
|
||||
padding-left: 10px!important;
|
||||
}
|
||||
|
||||
.hideSidebar .submenu-title-noDropdown span,
|
||||
.hideSidebar .el-submenu>.el-submenu__title>span {
|
||||
height: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.hideSidebar .nest-menu .el-submenu__title {
|
||||
text-align: initial!important;
|
||||
padding-left: 20px!important;
|
||||
span {
|
||||
height: auto;
|
||||
width: auto;
|
||||
visibility: visible;
|
||||
display: inline;
|
||||
}
|
||||
.el-submenu__icon-arrow {
|
||||
display: block!important;
|
||||
}
|
||||
}
|
||||
|
||||
.hideSidebar .menu-wrapper>.el-menu-item,
|
||||
.hideSidebar .submenu-title-noDropdown,
|
||||
.hideSidebar .menu-wrapper>.el-submenu .el-submenu__title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hideSidebar .el-menu-item .el-submenu__icon-arrow,
|
||||
.hideSidebar .el-submenu .el-submenu__title .el-submenu__icon-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hideSidebar .submenu-title-noDropdown {
|
||||
position: relative;
|
||||
span {
|
||||
transition: opacity .3s cubic-bezier(.55, 0, .1, 1);
|
||||
opacity: 0;
|
||||
}
|
||||
&:hover {
|
||||
span {
|
||||
display: block;
|
||||
border-radius: 3px;
|
||||
z-index: 1002;
|
||||
width: 140px;
|
||||
height: 56px;
|
||||
visibility: visible;
|
||||
position: absolute;
|
||||
right: -145px;
|
||||
text-align: left;
|
||||
text-indent: 20px;
|
||||
top: 0px;
|
||||
background-color: #1f2d3d;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-submenu .el-menu-item {
|
||||
min-width: 180px!important;
|
||||
}
|
@@ -35,7 +35,9 @@
|
||||
this.initChart();
|
||||
if (this.autoResize) {
|
||||
this.__resizeHanlder = debounce(() => {
|
||||
this.chart.resize()
|
||||
if (this.chart) {
|
||||
this.chart.resize()
|
||||
}
|
||||
}, 100)
|
||||
window.addEventListener('resize', this.__resizeHanlder)
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@
|
||||
legend: {
|
||||
x: 'center',
|
||||
y: 'bottom',
|
||||
data: ['industries', 'technology', 'gold', 'forex', 'forecasts', 'markets']
|
||||
data: ['industries', 'technology', 'forex', 'gold', 'forecasts', 'markets']
|
||||
},
|
||||
calculable: true,
|
||||
series: [
|
||||
@@ -65,7 +65,7 @@
|
||||
{ value: 240, name: 'technology' },
|
||||
{ value: 149, name: 'forex' },
|
||||
{ value: 100, name: 'gold' },
|
||||
{ value: 59, name: 'forecastsx' },
|
||||
{ value: 59, name: 'forecasts' },
|
||||
{ value: 49, name: 'markets' }
|
||||
],
|
||||
animationEasing: 'cubicInOut',
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<code>
|
||||
现在的管理后台基本都是spa的形式了,它增强了用户体验,但同时也会怎增加页面出问题的可能性,可能一个小小的疏忽就导致整个页面的死锁。好在Vue官网提供了一个方法来捕获处理异常
|
||||
</code>
|
||||
<a href="#"><img src='../../../documentImg/code1.png'></a>
|
||||
<a href="#"><img src='http://panjiachen.github.io/images/errHandler.png'></a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@@ -66,15 +66,22 @@
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
handleDownload() {
|
||||
require.ensure([], () => {
|
||||
const { export_json_to_excel } = require('vendor/Export2Excel');
|
||||
const tHeader = ['序号', '文章标题', '作者', '阅读数', '发布时间'];
|
||||
const filterVal = ['id', 'title', 'author', 'pageviews', 'display_time'];
|
||||
const list = this.multipleSelection;
|
||||
const data = this.formatJson(filterVal, list);
|
||||
export_json_to_excel(tHeader, data, '列表excel');
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
})
|
||||
if (this.multipleSelection.length) {
|
||||
require.ensure([], () => {
|
||||
const { export_json_to_excel } = require('vendor/Export2Excel');
|
||||
const tHeader = ['序号', '文章标题', '作者', '阅读数', '发布时间'];
|
||||
const filterVal = ['id', 'title', 'author', 'pageviews', 'display_time'];
|
||||
const list = this.multipleSelection;
|
||||
const data = this.formatJson(filterVal, list);
|
||||
export_json_to_excel(tHeader, data, '列表excel');
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请选择一条或多条记录导出',
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => v[j]))
|
||||
|
@@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<div class="app-wrapper" :class="{hideSidebar:!sidebar.opened}">
|
||||
<div class="sidebar-wrapper">
|
||||
<sidebar class="sidebar-container"></sidebar>
|
||||
</div>
|
||||
<sidebar class="sidebar-container"></sidebar>
|
||||
<div class="main-container">
|
||||
<navbar></navbar>
|
||||
<app-main></app-main>
|
||||
@@ -36,44 +34,27 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
&.hideSidebar {
|
||||
.sidebar-wrapper {
|
||||
transform: translate(-140px, 0);
|
||||
.sidebar-container {
|
||||
transform: translate(132px, 0);
|
||||
}
|
||||
&:hover {
|
||||
transform: translate(0, 0);
|
||||
.sidebar-container {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
.sidebar-container{
|
||||
width:36px;
|
||||
}
|
||||
.main-container {
|
||||
margin-left: 40px;
|
||||
margin-left: 36px;
|
||||
}
|
||||
}
|
||||
.sidebar-wrapper {
|
||||
.sidebar-container {
|
||||
transition: width 0.28s ease-out;
|
||||
width: 180px;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1001;
|
||||
overflow: hidden;
|
||||
transition: all .28s ease-out;
|
||||
}
|
||||
.sidebar-container {
|
||||
transition: all .28s ease-out;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: -17px;
|
||||
overflow-y: scroll;
|
||||
background: red;
|
||||
}
|
||||
.main-container {
|
||||
min-height: 100%;
|
||||
transition: all .28s ease-out;
|
||||
transition: margin-left 0.28s ease-out;
|
||||
margin-left: 180px;
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<el-breadcrumb class="app-levelbar" separator="/">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<router-link v-if='item.redirect==="noredirect"||index==levelList.length-1' to="" class="no-redirect">{{item.name}}</router-link>
|
||||
<router-link v-else :to="item.path">{{item.name}}</router-link>
|
||||
<router-link v-else :to="item.redirect||item.path">{{item.name}}</router-link>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<el-menu mode="vertical" theme="dark" :default-active="$route.path">
|
||||
<sidebar-item :routes='permission_routers'></sidebar-item>
|
||||
<div>
|
||||
<el-menu mode="vertical" theme="dark" :default-active="$route.path" :collapse="isCollapse">
|
||||
<sidebar-item :routes='permission_routers'></sidebar-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -11,8 +13,12 @@
|
||||
components: { SidebarItem },
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'permission_routers'
|
||||
])
|
||||
'permission_routers',
|
||||
'sidebar'
|
||||
]),
|
||||
isCollapse() {
|
||||
return !this.sidebar.opened
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@@ -1,24 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class='menu-wrapper'>
|
||||
<template v-for="item in routes">
|
||||
|
||||
<router-link v-if="!item.hidden&&item.noDropdown&&item.children.length>0" :to="item.path+'/'+item.children[0].path">
|
||||
<el-menu-item :index="item.path+'/'+item.children[0].path">
|
||||
<icon-svg v-if='item.icon' :icon-class="item.icon"></icon-svg>{{item.children[0].name}}
|
||||
<el-menu-item :index="item.path+'/'+item.children[0].path" class='submenu-title-noDropdown'>
|
||||
<icon-svg v-if='item.icon' :icon-class="item.icon"></icon-svg><span slot="title">{{item.children[0].name}}</span>
|
||||
</el-menu-item>
|
||||
</router-link>
|
||||
|
||||
<el-submenu :index="item.name" v-if="!item.noDropdown&&!item.hidden">
|
||||
<template slot="title">
|
||||
<icon-svg v-if='item.icon' :icon-class="item.icon"></icon-svg>{{item.name}}
|
||||
<icon-svg v-if='item.icon' :icon-class="item.icon"></icon-svg><span>{{item.name}}</span>
|
||||
</template>
|
||||
<template v-for="child in item.children" v-if='!child.hidden'>
|
||||
<sidebar-item class='menu-indent' v-if='child.children&&child.children.length>0' :routes='[child]'> </sidebar-item>
|
||||
<router-link v-else class="menu-indent" :to="item.path+'/'+child.path">
|
||||
|
||||
<sidebar-item class='nest-menu' v-if='child.children&&child.children.length>0' :routes='[child]'> </sidebar-item>
|
||||
|
||||
<router-link v-else :to="item.path+'/'+child.path">
|
||||
<el-menu-item :index="item.path+'/'+child.path">
|
||||
{{child.name}}
|
||||
<icon-svg v-if='child.icon' :icon-class="child.icon"></icon-svg><span>{{child.name}}</span>
|
||||
</el-menu-item>
|
||||
</router-link>
|
||||
|
||||
</template>
|
||||
|
||||
</el-submenu>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@@ -35,13 +42,6 @@
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.svg-icon {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.hideSidebar .menu-indent {
|
||||
display: block;
|
||||
text-indent: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
Reference in New Issue
Block a user