refine
This commit is contained in:
parent
4107fa5366
commit
7157c2a728
|
@ -12,12 +12,10 @@
|
||||||
|
|
||||||
<screenfull class="right-menu-item hover-effect" />
|
<screenfull class="right-menu-item hover-effect" />
|
||||||
|
|
||||||
<el-tooltip :content="$t('navbar.size')" effect="dark" placement="bottom">
|
<el-tooltip content="Global Size" effect="dark" placement="bottom">
|
||||||
<size-select class="right-menu-item hover-effect" />
|
<size-select class="right-menu-item hover-effect" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<lang-select class="right-menu-item hover-effect" />
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||||
|
@ -27,17 +25,13 @@
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<router-link to="/">
|
<router-link to="/">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>Dashboard</el-dropdown-item>
|
||||||
{{ $t('navbar.dashboard') }}
|
|
||||||
</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>Github</el-dropdown-item>
|
||||||
{{ $t('navbar.github') }}
|
|
||||||
</el-dropdown-item>
|
|
||||||
</a>
|
</a>
|
||||||
<el-dropdown-item divided>
|
<el-dropdown-item divided>
|
||||||
<span style="display:block;" @click="logout">{{ $t('navbar.logOut') }}</span>
|
<span style="display:block;" @click="logout">Log Out</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
@ -52,7 +46,6 @@ import Hamburger from '@/components/Hamburger'
|
||||||
import ErrorLog from '@/components/ErrorLog'
|
import ErrorLog from '@/components/ErrorLog'
|
||||||
import Screenfull from '@/components/Screenfull'
|
import Screenfull from '@/components/Screenfull'
|
||||||
import SizeSelect from '@/components/SizeSelect'
|
import SizeSelect from '@/components/SizeSelect'
|
||||||
import LangSelect from '@/components/LangSelect'
|
|
||||||
import Search from '@/components/HeaderSearch'
|
import Search from '@/components/HeaderSearch'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -62,7 +55,6 @@ export default {
|
||||||
ErrorLog,
|
ErrorLog,
|
||||||
Screenfull,
|
Screenfull,
|
||||||
SizeSelect,
|
SizeSelect,
|
||||||
LangSelect,
|
|
||||||
Search
|
Search
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -1,11 +1,24 @@
|
||||||
<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/">{{ $t('documentation.documentation') }}</a>
|
<a
|
||||||
<a class="document-btn" target="_blank" href="https://github.com/PanJiaChen/vue-element-admin/">{{ $t('documentation.github') }}</a>
|
class="document-btn"
|
||||||
<a class="document-btn" target="_blank" href="https://panjiachen.gitee.io/vue-element-admin-site/zh/">国内文档</a>
|
target="_blank"
|
||||||
|
href="https://panjiachen.github.io/vue-element-admin-site/"
|
||||||
|
>Documentation</a>
|
||||||
|
<a
|
||||||
|
class="document-btn"
|
||||||
|
target="_blank"
|
||||||
|
href="https://github.com/PanJiaChen/vue-element-admin/"
|
||||||
|
>Github Repository</a>
|
||||||
|
<a
|
||||||
|
class="document-btn"
|
||||||
|
target="_blank"
|
||||||
|
href="https://panjiachen.gitee.io/vue-element-admin-site/zh/"
|
||||||
|
>国内文档</a>
|
||||||
<dropdown-menu :items="articleList" style="float:left;margin-left:50px;" title="系列文章" />
|
<dropdown-menu :items="articleList" style="float:left;margin-left:50px;" title="系列文章" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DropdownMenu from '@/components/Share/dropdownMenu'
|
import DropdownMenu from '@/components/Share/dropdownMenu'
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<p class="warn-content">
|
<p class="warn-content">
|
||||||
{{ $t('guide.description') }}
|
The guide page is useful for some people who entered the project for the first time. You can briefly introduce the
|
||||||
|
features of the project. Demo is based on
|
||||||
<a href="https://github.com/kamranahmedse/driver.js" target="_blank">driver.js.
|
<a href="https://github.com/kamranahmedse/driver.js" target="_blank">driver.js.
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<el-button icon="el-icon-question" type="primary" @click.prevent.stop="guide">
|
<el-button icon="el-icon-question" type="primary" @click.prevent.stop="guide">
|
||||||
{{ $t('guide.button') }}
|
Show Guide
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
|
||||||
|
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<h3 class="title">
|
<h3 class="title">Login Form</h3>
|
||||||
{{ $t('login.title') }}
|
|
||||||
</h3>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
|
@ -15,7 +13,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
ref="username"
|
ref="username"
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
:placeholder="$t('login.username')"
|
placeholder="Username"
|
||||||
name="username"
|
name="username"
|
||||||
type="text"
|
type="text"
|
||||||
auto-complete="on"
|
auto-complete="on"
|
||||||
|
@ -31,7 +29,7 @@
|
||||||
ref="password"
|
ref="password"
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
:type="passwordType"
|
:type="passwordType"
|
||||||
:placeholder="$t('login.password')"
|
placeholder="Password"
|
||||||
name="password"
|
name="password"
|
||||||
auto-complete="on"
|
auto-complete="on"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
|
@ -41,30 +39,26 @@
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">
|
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">Login</el-button>
|
||||||
{{ $t('login.logIn') }}
|
|
||||||
</el-button>
|
|
||||||
|
|
||||||
<div style="position:relative">
|
<div style="position:relative">
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<span>{{ $t('login.username') }} : admin</span>
|
<span>Username : admin</span>
|
||||||
<span>{{ $t('login.password') }} : {{ $t('login.any') }}</span>
|
<span>Password : any</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<span style="margin-right:18px;">
|
<span style="margin-right:18px;">Username : editor</span>
|
||||||
{{ $t('login.username') }} : editor
|
<span>Password : any</span>
|
||||||
</span>
|
|
||||||
<span>{{ $t('login.password') }} : {{ $t('login.any') }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button class="thirdparty-button" type="primary" @click="showDialog=true">
|
<el-button class="thirdparty-button" type="primary" @click="showDialog=true">
|
||||||
{{ $t('login.thirdparty') }}
|
Or connect with
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-dialog :title="$t('login.thirdparty')" :visible.sync="showDialog">
|
<el-dialog title="Or connect with" :visible.sync="showDialog">
|
||||||
{{ $t('login.thirdpartyTips') }}
|
Can not be simulated on local, so please combine you own business simulation! ! !
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div style="margin-bottom:15px;">
|
<div style="margin-bottom:15px;">
|
||||||
{{ $t('permission.roles') }}: {{ roles }}
|
Your roles: {{ roles }}
|
||||||
</div>
|
</div>
|
||||||
{{ $t('permission.switchRoles') }}:
|
Switch roles:
|
||||||
<el-radio-group v-model="switchRoles">
|
<el-radio-group v-model="switchRoles">
|
||||||
<el-radio-button label="editor" />
|
<el-radio-button label="editor" />
|
||||||
<el-radio-button label="admin" />
|
<el-radio-button label="admin" />
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
<div :key="'checkPermission'+key" style="margin-top:60px;">
|
<div :key="'checkPermission'+key" style="margin-top:60px;">
|
||||||
<code>
|
<code>
|
||||||
{{ $t('permission.tips') }}
|
In some cases, using v-permission will have no effect. For example: Element-UI's Tab component or el-table-column and other scenes that dynamically render dom. You can only do this with v-if.
|
||||||
<br> e.g.
|
<br> e.g.
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-button type="primary" @click="handleAddRole">
|
<el-button type="primary" @click="handleAddRole">New Role</el-button>
|
||||||
{{ $t('permission.addRole') }}
|
|
||||||
</el-button>
|
|
||||||
|
|
||||||
<el-table :data="rolesList" style="width: 100%;margin-top:30px;" border>
|
<el-table :data="rolesList" style="width: 100%;margin-top:30px;" border>
|
||||||
<el-table-column align="center" label="Role Key" width="220">
|
<el-table-column align="center" label="Role Key" width="220">
|
||||||
|
@ -22,12 +20,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="Operations">
|
<el-table-column align="center" label="Operations">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="primary" size="small" @click="handleEdit(scope)">
|
<el-button type="primary" size="small" @click="handleEdit(scope)">Edit</el-button>
|
||||||
{{ $t('permission.editPermission') }}
|
<el-button type="danger" size="small" @click="handleDelete(scope)">Delete</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button type="danger" size="small" @click="handleDelete(scope)">
|
|
||||||
{{ $t('permission.delete') }}
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -46,16 +40,20 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Menus">
|
<el-form-item label="Menus">
|
||||||
<el-tree ref="tree" :check-strictly="checkStrictly" :data="routesData" :props="defaultProps" show-checkbox node-key="path" class="permission-tree" />
|
<el-tree
|
||||||
|
ref="tree"
|
||||||
|
:check-strictly="checkStrictly"
|
||||||
|
:data="routesData"
|
||||||
|
:props="defaultProps"
|
||||||
|
show-checkbox
|
||||||
|
node-key="path"
|
||||||
|
class="permission-tree"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align:right;">
|
<div style="text-align:right;">
|
||||||
<el-button type="danger" @click="dialogVisible=false">
|
<el-button type="danger" @click="dialogVisible=false">Cancel</el-button>
|
||||||
{{ $t('permission.cancel') }}
|
<el-button type="primary" @click="confirmRole">Confirm</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" @click="confirmRole">
|
|
||||||
{{ $t('permission.confirm') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue