nav.js 4.25 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import BasicLayout from '../layouts/BasicLayout';
import UserLayout from '../layouts/UserLayout';

import Analysis from '../routes/Dashboard/Analysis';
import Monitor from '../routes/Dashboard/Monitor';
import Workplace from '../routes/Dashboard/Workplace';

import TableList from '../routes/List/TableList';
import CoverCardList from '../routes/List/CoverCardList';
import CardList from '../routes/List/CardList';
import FilterCardList from '../routes/List/FilterCardList';
import SearchList from '../routes/List/SearchList';
import BasicList from '../routes/List/BasicList';

ddcat1115's avatar
ddcat1115 committed
15 16 17
import BasicProfile from '../routes/Profile/BasicProfile';
import AdvancedProfile from '../routes/Profile/AdvancedProfile';

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
import BasicForm from '../routes/Forms/BasicForm';
import AdvancedForm from '../routes/Forms/AdvancedForm';
import StepForm from '../routes/Forms/StepForm';
import Step2 from '../routes/Forms/StepForm/Step2';
import Step3 from '../routes/Forms/StepForm/Step3';

import Exception403 from '../routes/Exception/403';
import Exception404 from '../routes/Exception/404';
import Exception500 from '../routes/Exception/500';

import Success from '../routes/Result/Success';
import Error from '../routes/Result/Error';

import Login from '../routes/User/Login';
import Register from '../routes/User/Register';
import RegisterResult from '../routes/User/RegisterResult';

afc163's avatar
afc163 committed
35 36
const data = [{
  component: BasicLayout,
ddcat1115's avatar
ddcat1115 committed
37
  layout: 'BasicLayout',
afc163's avatar
afc163 committed
38
  name: '首页', // for breadcrumb
afc163's avatar
afc163 committed
39
  path: '',
40
  children: [{
afc163's avatar
afc163 committed
41 42 43
    name: 'Dashboard',
    icon: 'dashboard',
    path: 'dashboard',
44
    children: [{
afc163's avatar
afc163 committed
45 46 47 48 49 50 51
      name: '分析页',
      path: 'analysis',
      component: Analysis,
    }, {
      name: '监控页',
      path: 'monitor',
      component: Monitor,
52
    }, {
afc163's avatar
afc163 committed
53 54 55
      name: '工作台',
      path: 'workplace',
      component: Workplace,
56 57
    }],
  }, {
afc163's avatar
afc163 committed
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
    name: '表单页',
    path: 'form',
    icon: 'form',
    children: [{
      name: '基础表单',
      path: 'basic-form',
      component: BasicForm,
    }, {
      name: '分步表单',
      path: 'step-form',
      component: StepForm,
      children: [{
        path: 'confirm',
        component: Step2,
      }, {
        path: 'result',
        component: Step3,
      }],
    }, {
      name: '高级表单',
      path: 'advanced-form',
      component: AdvancedForm,
    }],
81
  }, {
afc163's avatar
afc163 committed
82 83 84 85
    name: '列表页',
    path: 'list',
    icon: 'table',
    children: [{
niko's avatar
niko committed
86
      name: '查询表格',
afc163's avatar
afc163 committed
87 88 89 90 91 92 93 94 95 96 97
      path: 'table-list',
      component: TableList,
    }, {
      name: '标准列表',
      path: 'basic-list',
      component: BasicList,
    }, {
      name: '卡片列表',
      path: 'card-list',
      component: CardList,
    }, {
niko's avatar
niko committed
98
      name: '搜索列表(项目)',
afc163's avatar
afc163 committed
99 100 101
      path: 'cover-card-list',
      component: CoverCardList,
    }, {
niko's avatar
niko committed
102
      name: '搜索列表(应用)',
afc163's avatar
afc163 committed
103 104 105
      path: 'filter-card-list',
      component: FilterCardList,
    }, {
niko's avatar
niko committed
106
      name: '搜索列表(文章)',
afc163's avatar
afc163 committed
107 108 109
      path: 'search',
      component: SearchList,
    }],
110
  }, {
afc163's avatar
afc163 committed
111 112 113
    name: '详情页',
    path: 'profile',
    icon: 'profile',
ddcat1115's avatar
ddcat1115 committed
114 115 116 117 118 119 120 121 122
    children: [{
      name: '基础详情页',
      path: 'basic',
      component: BasicProfile,
    }, {
      name: '高级详情页',
      path: 'advanced',
      component: AdvancedProfile,
    }],
123
  }, {
afc163's avatar
afc163 committed
124 125 126 127 128 129 130 131 132 133 134 135
    name: '结果',
    path: 'result',
    icon: 'check-circle-o',
    children: [{
      name: '成功',
      path: 'success',
      component: Success,
    }, {
      name: '失败',
      path: 'fail',
      component: Error,
    }],
136
  }, {
ddcat1115's avatar
ddcat1115 committed
137 138
    name: '异常',
    path: 'exception',
afc163's avatar
afc163 committed
139 140 141 142 143 144 145 146 147 148 149 150 151 152
    icon: 'warning',
    children: [{
      name: '403',
      path: '403',
      component: Exception403,
    }, {
      name: '404',
      path: '404',
      component: Exception404,
    }, {
      name: '500',
      path: '500',
      component: Exception500,
    }],
153 154
  }],
}, {
afc163's avatar
afc163 committed
155
  component: UserLayout,
ddcat1115's avatar
ddcat1115 committed
156
  layout: 'UserLayout',
157
  children: [{
afc163's avatar
afc163 committed
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
    name: '帐户',
    icon: 'user',
    path: 'user',
    children: [{
      name: '登录',
      path: 'login',
      component: Login,
    }, {
      name: '注册',
      path: 'register',
      component: Register,
    }, {
      name: '注册结果',
      path: 'register-result',
      component: RegisterResult,
    }],
174 175
  }],
}];
afc163's avatar
afc163 committed
176 177 178 179 180 181

export function getNavData() {
  return data;
}

export default data;