tweak spelling mistake
This commit is contained in:
parent
2fb26525fa
commit
2938e33d0e
|
@ -128,7 +128,7 @@ Understanding and learning this knowledge in advance will greatly help the use o
|
||||||
- Error Log
|
- Error Log
|
||||||
- Dashboard
|
- Dashboard
|
||||||
- Guide Page
|
- Guide Page
|
||||||
- Echarts
|
- ECharts
|
||||||
- Clipboard
|
- Clipboard
|
||||||
- Markdown to html
|
- Markdown to html
|
||||||
```
|
```
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
- 错误日志
|
- 错误日志
|
||||||
- Dashboard
|
- Dashboard
|
||||||
- 引导页
|
- 引导页
|
||||||
- Echarts 图表
|
- ECharts 图表
|
||||||
- Clipboard(剪贴复制)
|
- Clipboard(剪贴复制)
|
||||||
- Markdown2html
|
- Markdown2html
|
||||||
```
|
```
|
||||||
|
|
|
@ -116,7 +116,7 @@ const webpackConfig = merge(baseWebpackConfig, {
|
||||||
test: /[\\/]node_modules[\\/]element-ui[\\/]/
|
test: /[\\/]node_modules[\\/]element-ui[\\/]/
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
name: 'chunk-comomns',
|
name: 'chunk-commons',
|
||||||
test: resolve('src/components'), // 可自定义拓展你的规则
|
test: resolve('src/components'), // 可自定义拓展你的规则
|
||||||
minChunks: 3, // 最小公用次数
|
minChunks: 3, // 最小公用次数
|
||||||
priority: 5,
|
priority: 5,
|
||||||
|
|
|
@ -2,14 +2,14 @@ import { debounce } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.__resizeHanlder = debounce(() => {
|
this.__resizeHandler = debounce(() => {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.resize()
|
this.chart.resize()
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
window.addEventListener('resize', this.__resizeHanlder)
|
window.addEventListener('resize', this.__resizeHandler)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('resize', this.__resizeHanlder)
|
window.removeEventListener('resize', this.__resizeHandler)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Inspired by https://github.com/Inndy/vue-clipboard2
|
// Inspired by https://github.com/Inndy/vue-clipboard2
|
||||||
const Clipboard = require('clipboard')
|
const Clipboard = require('clipboard')
|
||||||
if (!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 {
|
export default {
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default{
|
||||||
const disY = e.clientY - dialogHeaderEl.offsetTop
|
const disY = e.clientY - dialogHeaderEl.offsetTop
|
||||||
|
|
||||||
const dragDomWidth = dragDom.offsetWidth
|
const dragDomWidth = dragDom.offsetWidth
|
||||||
const dragDomheight = dragDom.offsetHeight
|
const dragDomHeight = dragDom.offsetHeight
|
||||||
|
|
||||||
const screenWidth = document.body.clientWidth
|
const screenWidth = document.body.clientWidth
|
||||||
const screenHeight = document.body.clientHeight
|
const screenHeight = document.body.clientHeight
|
||||||
|
@ -29,7 +29,7 @@ export default{
|
||||||
const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth
|
const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth
|
||||||
|
|
||||||
const minDragDomTop = dragDom.offsetTop
|
const minDragDomTop = dragDom.offsetTop
|
||||||
const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight
|
const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight
|
||||||
|
|
||||||
// 获取到的值带px 正则匹配替换
|
// 获取到的值带px 正则匹配替换
|
||||||
let styL = getStyle(dragDom, 'left')
|
let styL = getStyle(dragDom, 'left')
|
||||||
|
|
|
@ -37,6 +37,6 @@ export function numberFormatter(num, digits) {
|
||||||
return num.toString()
|
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, ','))
|
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ function hasPermission(roles, permissionRoles) {
|
||||||
return roles.some(role => permissionRoles.indexOf(role) >= 0)
|
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) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start() // start progress bar
|
NProgress.start() // start progress bar
|
||||||
|
|
|
@ -12,7 +12,7 @@ import chartsRouter from './modules/charts'
|
||||||
import tableRouter from './modules/table'
|
import tableRouter from './modules/table'
|
||||||
import nestedRouter from './modules/nested'
|
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
|
* 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
|
* 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
|
* if not set alwaysShow, only more than one route under the children
|
||||||
* it will becomes nested mode, otherwise not show the root menu
|
* 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!!!)
|
* name:'router-name' the name is used by <keep-alive> (must set!!!)
|
||||||
* meta : {
|
* meta : {
|
||||||
roles: ['admin','editor'] will control the page roles (you can set multiple roles)
|
roles: ['admin','editor'] will control the page roles (you can set multiple roles)
|
||||||
|
@ -48,7 +48,7 @@ export const constantRouterMap = [
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/authredirect',
|
path: '/auth-redirect',
|
||||||
component: () => import('@/views/login/authredirect'),
|
component: () => import('@/views/login/authredirect'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
|
|
@ -26,7 +26,7 @@ service.interceptors.request.use(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// respone interceptor
|
// response interceptor
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
response => response,
|
response => response,
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -31,18 +31,18 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
this.__resizeHanlder = debounce(() => {
|
this.__resizeHandler = debounce(() => {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.resize()
|
this.chart.resize()
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
window.addEventListener('resize', this.__resizeHanlder)
|
window.addEventListener('resize', this.__resizeHandler)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
window.removeEventListener('resize', this.__resizeHanlder)
|
window.removeEventListener('resize', this.__resizeHandler)
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,28 +46,28 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
if (this.autoResize) {
|
if (this.autoResize) {
|
||||||
this.__resizeHanlder = debounce(() => {
|
this.__resizeHandler = debounce(() => {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.resize()
|
this.chart.resize()
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
window.addEventListener('resize', this.__resizeHanlder)
|
window.addEventListener('resize', this.__resizeHandler)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听侧边栏的变化
|
// 监听侧边栏的变化
|
||||||
const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
||||||
sidebarElm.addEventListener('transitionend', this.__resizeHanlder)
|
sidebarElm.addEventListener('transitionend', this.__resizeHandler)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.autoResize) {
|
if (this.autoResize) {
|
||||||
window.removeEventListener('resize', this.__resizeHanlder)
|
window.removeEventListener('resize', this.__resizeHandler)
|
||||||
}
|
}
|
||||||
|
|
||||||
const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
||||||
sidebarElm.removeEventListener('transitionend', this.__resizeHanlder)
|
sidebarElm.removeEventListener('transitionend', this.__resizeHandler)
|
||||||
|
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
|
|
|
@ -29,18 +29,18 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
this.__resizeHanlder = debounce(() => {
|
this.__resizeHandler = debounce(() => {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.resize()
|
this.chart.resize()
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
window.addEventListener('resize', this.__resizeHanlder)
|
window.addEventListener('resize', this.__resizeHandler)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
window.removeEventListener('resize', this.__resizeHanlder)
|
window.removeEventListener('resize', this.__resizeHandler)
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,18 +31,18 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
this.__resizeHanlder = debounce(() => {
|
this.__resizeHandler = debounce(() => {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.resize()
|
this.chart.resize()
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
window.addEventListener('resize', this.__resizeHanlder)
|
window.addEventListener('resize', this.__resizeHandler)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
window.removeEventListener('resize', this.__resizeHanlder)
|
window.removeEventListener('resize', this.__resizeHandler)
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Price" width="195" align="center">
|
<el-table-column label="Price" width="195" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
¥{{ scope.row.price | toThousandslsFilter }}
|
¥{{ scope.row.price | toThousandFilter }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Status" width="100" align="center">
|
<el-table-column label="Status" width="100" align="center">
|
||||||
|
|
|
@ -35,7 +35,6 @@ export default {
|
||||||
.document-btn {
|
.document-btn {
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
vertical-align: middle;
|
|
||||||
display: block;
|
display: block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: black;
|
background: black;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Authredirect',
|
name: 'AuthRedirect',
|
||||||
created() {
|
created() {
|
||||||
const hash = window.location.search.slice(1)
|
const hash = window.location.search.slice(1)
|
||||||
window.opener.location.href = window.location.origin + '/login#' + hash
|
window.opener.location.href = window.location.origin + '/login#' + hash
|
||||||
|
|
|
@ -18,14 +18,14 @@ export default {
|
||||||
wechatHandleClick(thirdpart) {
|
wechatHandleClick(thirdpart) {
|
||||||
this.$store.commit('SET_AUTH_TYPE', thirdpart)
|
this.$store.commit('SET_AUTH_TYPE', thirdpart)
|
||||||
const appid = 'xxxxx'
|
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'
|
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)
|
openWindow(url, thirdpart, 540, 540)
|
||||||
},
|
},
|
||||||
tencentHandleClick(thirdpart) {
|
tencentHandleClick(thirdpart) {
|
||||||
this.$store.commit('SET_AUTH_TYPE', thirdpart)
|
this.$store.commit('SET_AUTH_TYPE', thirdpart)
|
||||||
const client_id = 'xxxxx'
|
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
|
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)
|
openWindow(url, thirdpart, 540, 540)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue