From 2938e33d0eac6b3dbbe842e08c367551e6565b07 Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 3 Sep 2018 15:03:00 +0800 Subject: [PATCH] tweak spelling mistake --- README.md | 2 +- README.zh-CN.md | 4 ++-- build/webpack.prod.conf.js | 2 +- src/components/Charts/mixins/resize.js | 6 +++--- src/directive/clipboard/clipboard.js | 2 +- src/directive/el-dragDialog/drag.js | 4 ++-- src/directive/waves/waves.js | 2 +- src/filters/index.js | 2 +- src/permission.js | 2 +- src/router/index.js | 6 +++--- src/utils/request.js | 6 +++--- src/views/dashboard/admin/components/BarChart.vue | 6 +++--- src/views/dashboard/admin/components/LineChart.vue | 10 +++++----- src/views/dashboard/admin/components/PieChart.vue | 6 +++--- src/views/dashboard/admin/components/RaddarChart.vue | 6 +++--- .../dashboard/admin/components/TransactionTable.vue | 2 +- src/views/documentation/index.vue | 1 - src/views/login/authredirect.vue | 2 +- src/views/login/socialsignin.vue | 4 ++-- 19 files changed, 37 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index d45c342e..b0aa00ea 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index bc114c3d..90438eee 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -140,7 +140,7 @@ - 错误日志 - Dashboard - 引导页 -- Echarts 图表 +- ECharts 图表 - Clipboard(剪贴复制) - Markdown2html ``` @@ -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 # 启动服务 diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 6220cc6b..01f85732 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -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, diff --git a/src/components/Charts/mixins/resize.js b/src/components/Charts/mixins/resize.js index 254e9052..8497ebdc 100644 --- a/src/components/Charts/mixins/resize.js +++ b/src/components/Charts/mixins/resize.js @@ -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) } } diff --git a/src/directive/clipboard/clipboard.js b/src/directive/clipboard/clipboard.js index 49c9b391..514aad20 100644 --- a/src/directive/clipboard/clipboard.js +++ b/src/directive/clipboard/clipboard.js @@ -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 { diff --git a/src/directive/el-dragDialog/drag.js b/src/directive/el-dragDialog/drag.js index 68e08523..58e29110 100644 --- a/src/directive/el-dragDialog/drag.js +++ b/src/directive/el-dragDialog/drag.js @@ -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 @@ -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') diff --git a/src/directive/waves/waves.js b/src/directive/waves/waves.js index 83070113..a77f876e 100644 --- a/src/directive/waves/waves.js +++ b/src/directive/waves/waves.js @@ -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 diff --git a/src/filters/index.js b/src/filters/index.js index 47ef2aa2..b164513a 100644 --- a/src/filters/index.js +++ b/src/filters/index.js @@ -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, ',')) } diff --git a/src/permission.js b/src/permission.js index 22522832..a20ceff6 100644 --- a/src/permission.js +++ b/src/permission.js @@ -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 diff --git a/src/router/index.js b/src/router/index.js index 5490185b..ab328c46 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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 **/ @@ -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 (must set!!!) * meta : { roles: ['admin','editor'] will control the page roles (you can set multiple roles) @@ -48,7 +48,7 @@ export const constantRouterMap = [ hidden: true }, { - path: '/authredirect', + path: '/auth-redirect', component: () => import('@/views/login/authredirect'), hidden: true }, diff --git a/src/utils/request.js b/src/utils/request.js index 5ce53933..50f9ecec 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -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 }) @@ -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 => { diff --git a/src/views/dashboard/admin/components/BarChart.vue b/src/views/dashboard/admin/components/BarChart.vue index a694f2b9..28e0aef9 100644 --- a/src/views/dashboard/admin/components/BarChart.vue +++ b/src/views/dashboard/admin/components/BarChart.vue @@ -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 }, diff --git a/src/views/dashboard/admin/components/LineChart.vue b/src/views/dashboard/admin/components/LineChart.vue index 6c6637a8..390c25a4 100644 --- a/src/views/dashboard/admin/components/LineChart.vue +++ b/src/views/dashboard/admin/components/LineChart.vue @@ -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 diff --git a/src/views/dashboard/admin/components/PieChart.vue b/src/views/dashboard/admin/components/PieChart.vue index 02999cd3..edb17d54 100644 --- a/src/views/dashboard/admin/components/PieChart.vue +++ b/src/views/dashboard/admin/components/PieChart.vue @@ -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 }, diff --git a/src/views/dashboard/admin/components/RaddarChart.vue b/src/views/dashboard/admin/components/RaddarChart.vue index e30b9770..11fde329 100644 --- a/src/views/dashboard/admin/components/RaddarChart.vue +++ b/src/views/dashboard/admin/components/RaddarChart.vue @@ -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 }, diff --git a/src/views/dashboard/admin/components/TransactionTable.vue b/src/views/dashboard/admin/components/TransactionTable.vue index bcbfbb43..07417523 100644 --- a/src/views/dashboard/admin/components/TransactionTable.vue +++ b/src/views/dashboard/admin/components/TransactionTable.vue @@ -7,7 +7,7 @@ diff --git a/src/views/documentation/index.vue b/src/views/documentation/index.vue index d40c2b67..4c7afc9d 100644 --- a/src/views/documentation/index.vue +++ b/src/views/documentation/index.vue @@ -35,7 +35,6 @@ export default { .document-btn { float: left; margin-left: 50px; - vertical-align: middle; display: block; cursor: pointer; background: black; diff --git a/src/views/login/authredirect.vue b/src/views/login/authredirect.vue index 52eb1aec..e749412b 100644 --- a/src/views/login/authredirect.vue +++ b/src/views/login/authredirect.vue @@ -1,6 +1,6 @@