Skip to content

Commit

Permalink
tweak spelling mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
PanJiaChen committed Sep 3, 2018
1 parent 2fb2652 commit 2938e33
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Understanding and learning this knowledge in advance will greatly help the use o
- Error Log
- Dashboard
- Guide Page
- Echarts
- ECharts
- Clipboard
- Markdown to html
```
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
- 错误日志
- Dashboard
- 引导页
- Echarts 图表
- ECharts 图表
- Clipboard(剪贴复制)
- Markdown2html
```
Expand All @@ -154,7 +154,7 @@ git clone https://github.com/PanJiaChen/vue-element-admin.git
# 安装依赖
npm install

# 建议不要用cnpm安装 会有各种诡异的bug 可以通过如下操作解决 npm 下载速度慢的问题
# 建议不要用 cnpm 安装 会有各种诡异的bug 可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org

# 启动服务
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const webpackConfig = merge(baseWebpackConfig, {
test: /[\\/]node_modules[\\/]element-ui[\\/]/
},
commons: {
name: 'chunk-comomns',
name: 'chunk-commons',
test: resolve('src/components'), // 可自定义拓展你的规则
minChunks: 3, // 最小公用次数
priority: 5,
Expand Down
6 changes: 3 additions & 3 deletions src/components/Charts/mixins/resize.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { debounce } from '@/utils'

export default {
mounted() {
this.__resizeHanlder = debounce(() => {
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHanlder)
window.addEventListener('resize', this.__resizeHandler)
},
beforeDestroy() {
window.removeEventListener('resize', this.__resizeHanlder)
window.removeEventListener('resize', this.__resizeHandler)
}
}
2 changes: 1 addition & 1 deletion src/directive/clipboard/clipboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Inspired by https://github.com/Inndy/vue-clipboard2
const Clipboard = require('clipboard')
if (!Clipboard) {
throw new Error('you shold npm install `clipboard` --save at first ')
throw new Error('you should npm install `clipboard` --save at first ')
}

export default {
Expand Down
4 changes: 2 additions & 2 deletions src/directive/el-dragDialog/drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default{
const disY = e.clientY - dialogHeaderEl.offsetTop

const dragDomWidth = dragDom.offsetWidth
const dragDomheight = dragDom.offsetHeight
const dragDomHeight = dragDom.offsetHeight

const screenWidth = document.body.clientWidth
const screenHeight = document.body.clientHeight
Expand All @@ -29,7 +29,7 @@ export default{
const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth

const minDragDomTop = dragDom.offsetTop
const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight
const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight

// 获取到的值带px 正则匹配替换
let styL = getStyle(dragDom, 'left')
Expand Down
2 changes: 1 addition & 1 deletion src/directive/waves/waves.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default{
const customOpts = Object.assign({}, binding.value)
const opts = Object.assign({
ele: el, // 波纹作用元素
type: 'hit', // hit点击位置扩散center中心点扩展
type: 'hit', // hit 点击位置扩散 center中心点扩展
color: 'rgba(0, 0, 0, 0.15)' // 波纹颜色
}, customOpts)
const target = opts.ele
Expand Down
2 changes: 1 addition & 1 deletion src/filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ export function numberFormatter(num, digits) {
return num.toString()
}

export function toThousandslsFilter(num) {
export function toThousandFilter(num) {
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
}
2 changes: 1 addition & 1 deletion src/permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function hasPermission(roles, permissionRoles) {
return roles.some(role => permissionRoles.indexOf(role) >= 0)
}

const whiteList = ['/login', '/authredirect']// no redirect whitelist
const whiteList = ['/login', '/auth-redirect']// no redirect whitelist

router.beforeEach((to, from, next) => {
NProgress.start() // start progress bar
Expand Down
6 changes: 3 additions & 3 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import chartsRouter from './modules/charts'
import tableRouter from './modules/table'
import nestedRouter from './modules/nested'

/** note: submenu only apppear when children.length>=1
/** note: Submenu only appear when children.length>=1
* detail see https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
**/

Expand All @@ -21,7 +21,7 @@ import nestedRouter from './modules/nested'
* alwaysShow: true if set true, will always show the root menu, whatever its child routes length
* if not set alwaysShow, only more than one route under the children
* it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect if `redirect:noredirect` will no redirct in the breadcrumb
* redirect: noredirect if `redirect:noredirect` will no redirect in the breadcrumb
* name:'router-name' the name is used by <keep-alive> (must set!!!)
* meta : {
roles: ['admin','editor'] will control the page roles (you can set multiple roles)
Expand All @@ -48,7 +48,7 @@ export const constantRouterMap = [
hidden: true
},
{
path: '/authredirect',
path: '/auth-redirect',
component: () => import('@/views/login/authredirect'),
hidden: true
},
Expand Down
6 changes: 3 additions & 3 deletions src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getToken } from '@/utils/auth'

// create an axios instance
const service = axios.create({
baseURL: process.env.BASE_API, // api的base_url
baseURL: process.env.BASE_API, // api 的 base_url
timeout: 5000 // request timeout
})

Expand All @@ -26,13 +26,13 @@ service.interceptors.request.use(
}
)

// respone interceptor
// response interceptor
service.interceptors.response.use(
response => response,
/**
* 下面的注释为通过在response里,自定义code来标示请求状态
* 当code返回如下情况则说明权限有问题,登出并返回到登录页
* 如想通过xmlhttprequest来状态码标识 逻辑可写在下面error中
* 如想通过 xmlhttprequest 来状态码标识 逻辑可写在下面error中
* 以下代码均为样例,请结合自生需求加以修改,若不需要,则可删除
*/
// response => {
Expand Down
6 changes: 3 additions & 3 deletions src/views/dashboard/admin/components/BarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ export default {
},
mounted() {
this.initChart()
this.__resizeHanlder = debounce(() => {
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHanlder)
window.addEventListener('resize', this.__resizeHandler)
},
beforeDestroy() {
if (!this.chart) {
return
}
window.removeEventListener('resize', this.__resizeHanlder)
window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose()
this.chart = null
},
Expand Down
10 changes: 5 additions & 5 deletions src/views/dashboard/admin/components/LineChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,28 @@ export default {
mounted() {
this.initChart()
if (this.autoResize) {
this.__resizeHanlder = debounce(() => {
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHanlder)
window.addEventListener('resize', this.__resizeHandler)
}
// 监听侧边栏的变化
const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
sidebarElm.addEventListener('transitionend', this.__resizeHanlder)
sidebarElm.addEventListener('transitionend', this.__resizeHandler)
},
beforeDestroy() {
if (!this.chart) {
return
}
if (this.autoResize) {
window.removeEventListener('resize', this.__resizeHanlder)
window.removeEventListener('resize', this.__resizeHandler)
}
const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
sidebarElm.removeEventListener('transitionend', this.__resizeHanlder)
sidebarElm.removeEventListener('transitionend', this.__resizeHandler)
this.chart.dispose()
this.chart = null
Expand Down
6 changes: 3 additions & 3 deletions src/views/dashboard/admin/components/PieChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ export default {
},
mounted() {
this.initChart()
this.__resizeHanlder = debounce(() => {
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHanlder)
window.addEventListener('resize', this.__resizeHandler)
},
beforeDestroy() {
if (!this.chart) {
return
}
window.removeEventListener('resize', this.__resizeHanlder)
window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose()
this.chart = null
},
Expand Down
6 changes: 3 additions & 3 deletions src/views/dashboard/admin/components/RaddarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ export default {
},
mounted() {
this.initChart()
this.__resizeHanlder = debounce(() => {
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHanlder)
window.addEventListener('resize', this.__resizeHandler)
},
beforeDestroy() {
if (!this.chart) {
return
}
window.removeEventListener('resize', this.__resizeHanlder)
window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose()
this.chart = null
},
Expand Down
2 changes: 1 addition & 1 deletion src/views/dashboard/admin/components/TransactionTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</el-table-column>
<el-table-column label="Price" width="195" align="center">
<template slot-scope="scope">
¥{{ scope.row.price | toThousandslsFilter }}
¥{{ scope.row.price | toThousandFilter }}
</template>
</el-table-column>
<el-table-column label="Status" width="100" align="center">
Expand Down
1 change: 0 additions & 1 deletion src/views/documentation/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default {
.document-btn {
float: left;
margin-left: 50px;
vertical-align: middle;
display: block;
cursor: pointer;
background: black;
Expand Down
2 changes: 1 addition & 1 deletion src/views/login/authredirect.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
export default {
name: 'Authredirect',
name: 'AuthRedirect',
created() {
const hash = window.location.search.slice(1)
window.opener.location.href = window.location.origin + '/login#' + hash
Expand Down
4 changes: 2 additions & 2 deletions src/views/login/socialsignin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export default {
wechatHandleClick(thirdpart) {
this.$store.commit('SET_AUTH_TYPE', thirdpart)
const appid = 'xxxxx'
const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/authredirect')
const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect')
const url = 'https://open.weixin.qq.com/connect/qrconnect?appid=' + appid + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_login#wechat_redirect'
openWindow(url, thirdpart, 540, 540)
},
tencentHandleClick(thirdpart) {
this.$store.commit('SET_AUTH_TYPE', thirdpart)
const client_id = 'xxxxx'
const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/authredirect')
const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect')
const url = 'https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=' + client_id + '&redirect_uri=' + redirect_uri
openWindow(url, thirdpart, 540, 540)
}
Expand Down

0 comments on commit 2938e33

Please sign in to comment.