# add settings view

This commit is contained in:
xianfuxing 2018-08-15 16:24:06 +08:00
parent faa2a140e4
commit d89fb84047
7 changed files with 63 additions and 31 deletions

1
src/icons/svg/device.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1534320378407" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1009" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M959.68 642.944l-1.472-10.432-96.96-338.816C834.688 201.088 741.312 128 649.6 128L409.536 128C318.272 128 221.824 198.08 189.312 287.68l-123.008 339.2L64 640l0 73.088C64 813.952 141.568 896 236.992 896l550.656 0c95.488 0 172.864-82.24 172.352-183.424L959.68 642.944zM253.696 313.92c22.208-61.312 93.12-112.768 155.84-112.768l240.064 0c61.44 0 127.936 52.032 145.6 113.728l83.904 293.12L147.072 608 253.696 313.92zM787.648 822.784 236.992 822.784c-57.344 0-104-49.344-104-109.76L132.992 672l757.824 0 0.192 40.96C891.328 773.568 844.928 822.784 787.648 822.784z" p-id="1010"></path><path d="M736 704l64 0 0 64-64 0 0-64Z" p-id="1011"></path></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

1
src/icons/svg/system.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1534320364216" class="icon" style="" viewBox="0 0 1170 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="895" xmlns:xlink="http://www.w3.org/1999/xlink" width="228.515625" height="200"><defs><style type="text/css"></style></defs><path d="M787.333533 588.946109a75.190803 75.190803 0 0 0-75.09328 75.09328 75.190803 75.190803 0 0 0 75.09328 75.093279 75.166423 75.166423 0 0 0 75.068899-75.093279 75.166423 75.166423 0 0 0-75.068899-75.09328m0 222.841745a147.919132 147.919132 0 0 1-147.748466-147.748465c0-81.456704 66.291762-147.748466 147.748466-147.748466 81.432323 0 147.748466 66.291762 147.748466 147.748466 0 81.481085-66.316143 147.748466-147.748466 147.748465m89.45365 102.107356c0.341333 0.243809 1.31657 0.585142 2.316189 0.585143h0.121905l71.484901-39.497115c-1.706665-4.022854-9.606088-23.47884-9.606088-43.739397a113.858966 113.858966 0 0 1 107.739351-113.615157c0.853333-4.729901 5.558853-31.524549 5.558853-51.638821s-4.70552-46.884538-5.558853-51.63882A113.858966 113.858966 0 0 1 941.10409 500.784648c0-20.358081 7.923804-39.814067 9.606088-43.81254l-70.314616-39.058258-0.292572-0.024381a5.339425 5.339425 0 0 0-2.706283 0.731428 196.754145 196.754145 0 0 1-26.014458 21.820937c-21.699032 15.238084-42.154637 22.966841-60.952337 22.966841-18.919606 0-39.594638-7.875042-61.391195-23.405698a194.706147 194.706147 0 0 1-26.160743-22.284174 5.778282 5.778282 0 0 0-2.730665-0.707048h-0.243809l-72.825853 40.033496c1.706665 4.047235 9.581707 23.47884 9.581708 43.739397a113.858966 113.858966 0 0 1-107.763733 113.566395c-0.853333 4.729901-5.510091 31.524549-5.510091 51.63882s4.656759 46.908919 5.534472 51.663202a113.858966 113.858966 0 0 1 107.763733 113.590776c0 20.3337-7.972566 39.862829-9.679231 43.788159l68.973665 38.546258h0.146285c1.023999 0 1.950475-0.365714 2.316189-0.585143a200.850142 200.850142 0 0 1 26.428933-23.161888c22.089127-16.188941 43.081112-24.429697 62.415194-24.429697 19.55351 0 40.716161 8.387042 62.951574 24.917316 14.921132 11.068944 25.258649 22.186651 26.550838 23.576364m22.67427 108.397637c-13.775228-0.024381-27.135981-5.705139-35.766832-15.213703-11.775992-12.897515-49.005679-46.445681-79.53061-46.445682-30.281121 0-68.120332 33.767595-78.994229 45.543587-8.60647 9.38666-21.869699 14.969894-35.498641 14.969894-6.485329 0-12.604943-1.243428-18.188178-3.705902l-0.975237-0.414476-92.696315-51.833868-0.926475-0.682666a44.470825 44.470825 0 0 1-14.921133-53.735581c0.048762-0.146286 8.533327-19.699795 8.533328-37.595401a98.377073 98.377073 0 0 0-98.255168-98.255168h-3.90095c-15.506275 0-28.15998-13.799609-32.182834-35.108547-0.341333-1.706665-7.923804-42.179017-7.923804-74.044899 0-31.914644 7.55809-72.362615 7.899423-74.118042 4.120378-21.577127 16.993512-35.449879 32.816738-35.084166h3.267046a98.401454 98.401454 0 0 0 98.279549-98.30393c0-17.846844-8.484565-37.400354-8.557709-37.619782a44.348921 44.348921 0 0 1 15.067418-53.662438l0.950857-0.658285 97.840692-53.759962 1.023999-0.414476c5.48571-2.364951 11.507801-3.535236 17.895606-3.535235 13.604562 0 26.892171 5.436948 35.596165 14.628561 11.580944 12.117325 48.176727 43.641874 77.775183 43.641873 29.354646 0 65.755382-30.915026 77.287564-42.812922 8.655232-8.996565 21.845318-14.33599 35.303594-14.335989 6.50971 0 12.653705 1.219047 18.285701 3.65714l0.975237 0.414476 94.476123 52.516534 0.950857 0.658285c16.895988 11.751611 23.332555 34.889118 14.945513 53.735581-0.048762 0.146286-8.533327 19.699795-8.533328 37.546639a98.401454 98.401454 0 0 0 98.255168 98.279549h3.291427c15.774465-0.341333 28.720741 13.507038 32.816738 35.108547 0.316952 1.706665 7.899423 42.203398 7.899423 74.06928 0 31.890263-7.582471 72.411377-7.948185 74.118042-4.047235 21.552747-16.993512 35.425499-32.767976 35.059785h-3.291427a98.401454 98.401454 0 0 0-98.255168 98.279549c0 17.846844 8.484565 37.449116 8.557709 37.619782a44.422064 44.422064 0 0 1-15.018656 53.7112l-0.926476 0.682666-96.134026 53.101677-0.975238 0.414475a44.885301 44.885301 0 0 1-17.846844 3.583998zM1121.523008 316.952398a48.76187 48.76187 0 1 1-97.523739 0V121.978061C1023.999269 108.519785 1013.125372 97.523984 999.691476 97.523984H121.831532C108.568303 97.523984 97.52374 108.495404 97.52374 121.978061v584.996154c0 13.458276 10.873897 24.454078 24.307792 24.454078H341.33309a48.76187 48.76187 0 1 1 0 97.52374H48.908156A48.76187 48.76187 0 0 1 0 780.190163V48.762114C0 21.821181 21.89408 0.000244 48.908156 0.000244h1023.706697A48.76187 48.76187 0 0 1 1121.523008 48.762114v268.190284zM219.428415 975.237642c0-26.940933 21.991603-48.76187 48.981298-48.761869h194.608623a48.76187 48.76187 0 1 1 0 97.523739H268.434094A48.76187 48.76187 0 0 1 219.428415 975.237642z" p-id="896"></path></svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -8,6 +8,8 @@ export default {
device: 'Device',
detail: 'Detail',
logs: 'Logs',
deviceSetting: 'Device Setting',
systemSetting: 'System Setting',
guide: 'Guide',
permission: 'Permission',
pagePermission: 'Page Permission',

View File

@ -1,13 +1,15 @@
export default {
route: {
dashboard: '首页',
dashboard: '仪表盘',
introduction: '简述',
documentation: '文档',
counter: '灭蚊器',
counter: '数据分析',
statistic: '统计',
device: '设备',
detail: '详情',
logs: '日志',
deviceSetting: '设备设置',
systemSetting: '系统设置',
guide: '引导页',
permission: '权限测试页',
pagePermission: '页面权限',

View File

@ -87,43 +87,54 @@ export default new Router({
})
export const asyncRouterMap = [
// {
// path: '/permission',
// component: Layout,
// redirect: '/permission/index',
// alwaysShow: true, // will always show the root menu
// meta: {
// title: 'permission',
// icon: 'lock',
// roles: ['admin', 'editor'] // you can set roles in root nav
// },
// children: [{
// path: 'page',
// component: () => import('@/views/permission/page'),
// name: 'pagePermission',
// meta: {
// title: 'pagePermission',
// roles: ['admin'] // or you can only set roles in sub nav
// }
// }, {
// path: 'directive',
// component: () => import('@/views/permission/directive'),
// name: 'directivePermission',
// meta: {
// title: 'directivePermission'
// // if do not set roles, means: this page does not require permission
// }
// }]
// },
{
path: '/permission',
path: '/settings/device',
component: Layout,
redirect: '/permission/index',
alwaysShow: true, // will always show the root menu
meta: {
title: 'permission',
icon: 'lock',
roles: ['admin', 'editor'] // you can set roles in root nav
},
children: [{
path: 'page',
component: () => import('@/views/permission/page'),
name: 'pagePermission',
meta: {
title: 'pagePermission',
roles: ['admin'] // or you can only set roles in sub nav
}
}, {
path: 'directive',
component: () => import('@/views/permission/directive'),
name: 'directivePermission',
meta: {
title: 'directivePermission'
// if do not set roles, means: this page does not require permission
}
path: 'index',
component: () => import('@/views/settings/device'),
name: 'deviceSetting',
meta: { title: 'deviceSetting', icon: 'device', noCache: true }
}]
},
{
path: '/icon',
path: '/settings/system',
component: Layout,
children: [{
path: 'index',
component: () => import('@/views/svg-icons/index'),
name: 'icons',
meta: { title: 'icons', icon: 'icon', noCache: true }
component: () => import('@/views/settings/system'),
name: 'systemSetting',
meta: { title: 'systemSetting', icon: 'system', noCache: true }
}]
},

View File

@ -1,12 +1,12 @@
<template>
<div class="app-container">
<p>设备设置</p>
<p class="warn-content">设备设置</p>
</div>
</template>
<script>
export default {
name: 'settings'
name: 'deviceSetting'
}
</script>

View File

@ -0,0 +1,15 @@
<template>
<div class="app-container">
<p class="warn-content">系统设置</p>
</div>
</template>
<script>
export default {
name: 'systemSetting'
}
</script>
<style lang="scss">
</style>