perf[i18n]:dashboard document svg permission
This commit is contained in:
parent
85bc4175ad
commit
f8a81e0f1f
|
@ -45,6 +45,13 @@ export default {
|
||||||
clipboardDemo: 'Clipboard',
|
clipboardDemo: 'Clipboard',
|
||||||
i18n: 'I18n'
|
i18n: 'I18n'
|
||||||
},
|
},
|
||||||
|
navbar: {
|
||||||
|
logOut: 'Log Out',
|
||||||
|
dashboard: 'Dashboard',
|
||||||
|
github: 'Github',
|
||||||
|
screenfull: 'screenfull',
|
||||||
|
theme: 'theme'
|
||||||
|
},
|
||||||
login: {
|
login: {
|
||||||
title: 'Login Form',
|
title: 'Login Form',
|
||||||
logIn: 'Log in',
|
logIn: 'Log in',
|
||||||
|
@ -52,6 +59,14 @@ export default {
|
||||||
password: 'Password',
|
password: 'Password',
|
||||||
any: 'any',
|
any: 'any',
|
||||||
thirdparty: 'Or connect with',
|
thirdparty: 'Or connect with',
|
||||||
thirdpartyTips: 'Local can not be simulated, please combine their own business simulation! ! !'
|
thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !'
|
||||||
|
},
|
||||||
|
documentation: {
|
||||||
|
documentation: 'Documentation',
|
||||||
|
github: 'Github Repository'
|
||||||
|
},
|
||||||
|
permission: {
|
||||||
|
permissions: 'Your permissions',
|
||||||
|
switchPermissions: 'Switch permissions'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,13 @@ export default {
|
||||||
clipboardDemo: 'clipboard',
|
clipboardDemo: 'clipboard',
|
||||||
i18n: '国际化'
|
i18n: '国际化'
|
||||||
},
|
},
|
||||||
|
navbar: {
|
||||||
|
logOut: '退出登录',
|
||||||
|
dashboard: '首页',
|
||||||
|
github: '项目地址',
|
||||||
|
screenfull: '全屏',
|
||||||
|
theme: '换肤'
|
||||||
|
},
|
||||||
login: {
|
login: {
|
||||||
title: '系统登录',
|
title: '系统登录',
|
||||||
logIn: '登录',
|
logIn: '登录',
|
||||||
|
@ -53,5 +60,13 @@ export default {
|
||||||
any: '随便填',
|
any: '随便填',
|
||||||
thirdparty: '第三方登录',
|
thirdparty: '第三方登录',
|
||||||
thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!'
|
thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!'
|
||||||
|
},
|
||||||
|
documentation: {
|
||||||
|
documentation: '文档',
|
||||||
|
github: 'Github 地址'
|
||||||
|
},
|
||||||
|
permission: {
|
||||||
|
permissions: '你的权限',
|
||||||
|
switchPermissions: '切换权限'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import Clipboard from 'clipboard'
|
||||||
|
|
||||||
function clipboardSuccess() {
|
function clipboardSuccess() {
|
||||||
Vue.prototype.$message({
|
Vue.prototype.$message({
|
||||||
message: '复制成功',
|
message: 'Copy successfully',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
duration: 1500
|
duration: 1500
|
||||||
})
|
})
|
||||||
|
@ -11,7 +11,7 @@ function clipboardSuccess() {
|
||||||
|
|
||||||
function clipboardError() {
|
function clipboardError() {
|
||||||
Vue.prototype.$message({
|
Vue.prototype.$message({
|
||||||
message: '复制失败',
|
message: 'Copy failed',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts 主题
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import { debounce } from '@/utils'
|
import { debounce } from '@/utils'
|
||||||
|
|
||||||
const animationDuration = 6000
|
const animationDuration = 6000
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts 主题
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import { debounce } from '@/utils'
|
import { debounce } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">New Visits</div>
|
<div class="card-panel-text">New Visits</div>
|
||||||
<count-to class="card-panel-num" :startVal="0" :endVal="102400" :duration="3600"></count-to>
|
<count-to class="card-panel-num" :startVal="0" :endVal="102400" :duration="2600"></count-to>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">Messages</div>
|
<div class="card-panel-text">Messages</div>
|
||||||
<count-to class="card-panel-num" :startVal="0" :endVal="81212" :duration="4000"></count-to>
|
<count-to class="card-panel-num" :startVal="0" :endVal="81212" :duration="3000"></count-to>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">Purchases</div>
|
<div class="card-panel-text">Purchases</div>
|
||||||
<count-to class="card-panel-num" :startVal="0" :endVal="9280" :duration="4000"></count-to>
|
<count-to class="card-panel-num" :startVal="0" :endVal="9280" :duration="3200"></count-to>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">Shoppings</div>
|
<div class="card-panel-text">Shoppings</div>
|
||||||
<count-to class="card-panel-num" :startVal="0" :endVal="13600" :duration="4600"></count-to>
|
<count-to class="card-panel-num" :startVal="0" :endVal="13600" :duration="3600"></count-to>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts 主题
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import { debounce } from '@/utils'
|
import { debounce } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts 主题
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import { debounce } from '@/utils'
|
import { debounce } from '@/utils'
|
||||||
|
|
||||||
const animationDuration = 3000
|
const animationDuration = 3000
|
||||||
|
|
|
@ -44,7 +44,7 @@ export default {
|
||||||
fetchList().then(response => {
|
fetchList().then(response => {
|
||||||
this.list = response.data.items.slice(0, 7)
|
this.list = response.data.items.slice(0, 7)
|
||||||
})
|
})
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard-editor-container">
|
<div class="dashboard-editor-container">
|
||||||
<div class=" clearfix">
|
<div class=" clearfix">
|
||||||
<pan-thumb style="float: left" :image="avatar"> 你的权限:
|
<pan-thumb style="float: left" :image="avatar"> Your roles:
|
||||||
<span class="pan-info-roles" :key='item' v-for="item in roles">{{item}}</span>
|
<span class="pan-info-roles" :key='item' v-for="item in roles">{{item}}</span>
|
||||||
</pan-thumb>
|
</pan-thumb>
|
||||||
<github-corner></github-corner>
|
<github-corner></github-corner>
|
||||||
<div class="info-container">
|
<div class="info-container">
|
||||||
<span class="display_name">{{name}}</span>
|
<span class="display_name">{{name}}</span>
|
||||||
<span style="font-size:20px;padding-top:20px;display:inline-block;">普通编辑dashboard</span>
|
<span style="font-size:20px;padding-top:20px;display:inline-block;">editor : dashboard</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container documentation-container">
|
<div class="app-container documentation-container">
|
||||||
<a class="document-btn" target='_blank' href="https://panjiachen.github.io/vue-element-admin-site/#/">文档</a>
|
<a class="document-btn" target='_blank' href="https://panjiachen.github.io/vue-element-admin-site/#/">{{translateKey('documentation')}}</a>
|
||||||
<a class="document-btn" target='_blank' href="https://github.com/PanJiaChen/vue-element-admin/">Github 地址</a>
|
<a class="document-btn" target='_blank' href="https://github.com/PanJiaChen/vue-element-admin/">{{translateKey('github')}}</a>
|
||||||
<dropdown-menu style="float:left;margin-left:50px;" title='系列文章' :items='articleList'></dropdown-menu>
|
<dropdown-menu style="float:left;margin-left:50px;" title='系列文章' :items='articleList'></dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DropdownMenu from '@/components/Share/dropdownMenu'
|
import DropdownMenu from '@/components/Share/dropdownMenu'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'clipboardDemo',
|
name: 'documentation',
|
||||||
components: { DropdownMenu },
|
components: { DropdownMenu },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -23,6 +22,11 @@ export default {
|
||||||
{ title: '优雅的使用 icon', href: 'https://segmentfault.com/a/https://segmentfault.com/a/1190000012213278' }
|
{ title: '优雅的使用 icon', href: 'https://segmentfault.com/a/https://segmentfault.com/a/1190000012213278' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
translateKey(key) {
|
||||||
|
return this.$t('documentation.' + key)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<error-log class="errLog-container right-menu-item"></error-log>
|
<error-log class="errLog-container right-menu-item"></error-log>
|
||||||
|
|
||||||
<el-tooltip effect="dark" content="全屏" placement="bottom">
|
<el-tooltip effect="dark" :content="translateKey('screenfull')" placement="bottom">
|
||||||
<screenfull class="screenfull right-menu-item"></screenfull>
|
<screenfull class="screenfull right-menu-item"></screenfull>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<lang-select class="international right-menu-item"></lang-select>
|
<lang-select class="international right-menu-item"></lang-select>
|
||||||
|
|
||||||
<el-tooltip effect="dark" content="换肤" placement="bottom">
|
<el-tooltip effect="dark" :content="translateKey('theme')" placement="bottom">
|
||||||
<theme-picker class="theme-switch right-menu-item"></theme-picker>
|
<theme-picker class="theme-switch right-menu-item"></theme-picker>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
|
@ -25,16 +25,16 @@
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<router-link to="/">
|
<router-link to="/">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
首页
|
{{translateKey('dashboard')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
<a target='_blank' href="https://github.com/PanJiaChen/vue-element-admin/">
|
<a target='_blank' href="https://github.com/PanJiaChen/vue-element-admin/">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
项目地址
|
{{translateKey('github')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</a>
|
</a>
|
||||||
<el-dropdown-item divided>
|
<el-dropdown-item divided>
|
||||||
<span @click="logout" style="display:block;">退出登录</span>
|
<span @click="logout" style="display:block;">{{translateKey('logOut')}}</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
@ -75,6 +75,9 @@ export default {
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
location.reload()// 为了重新实例化vue-router对象 避免bug
|
location.reload()// 为了重新实例化vue-router对象 避免bug
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
translateKey(key) {
|
||||||
|
return this.$t('navbar.' + key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div style="margin-bottom:15px;">你的权限: {{roles}}</div>
|
<div style="margin-bottom:15px;">{{translateKey('permissions')}}: {{roles}}</div>
|
||||||
切换权限:
|
{{translateKey('switchPermissions')}}:
|
||||||
<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>
|
||||||
|
@ -29,6 +29,11 @@ export default{
|
||||||
this.$router.push({ path: '/permission/index?' + +new Date() })
|
this.$router.push({ path: '/permission/index?' + +new Date() })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
translateKey(key) {
|
||||||
|
return this.$t('permission.' + key)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="icons-container">
|
<div class="icons-container">
|
||||||
<p class="warn-content">
|
<p class="warn-content">
|
||||||
<a href="https://panjiachen.github.io/vue-element-admin-site/#/icon" target="_blank">添加和使用方式</a>
|
<a href="https://panjiachen.github.io/vue-element-admin-site/#/icon" target="_blank">Add and use
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="icons-wrapper">
|
<div class="icons-wrapper">
|
||||||
<div v-for="item of iconsMap" :key="item" @click="handleClipboard(generateIconCode(item),$event)">
|
<div v-for="item of iconsMap" :key="item" @click="handleClipboard(generateIconCode(item),$event)">
|
||||||
|
|
Loading…
Reference in New Issue