Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc55380

Browse files
committed
Merge branch 'master' of
2 parents caffb33 + 188b7bb commit dc55380

File tree

18 files changed

+43
-34
lines changed

18 files changed

+43
-34
lines changed

.eslintrc.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module.exports = {
99
node: true,
1010
es6: true,
1111
},
12+
// https://panjiachen.gitee.io/vue-element-admin-site/zh/guide/advanced/eslint.html#%E9%85%8D%E7%BD%AE%E9%A1%B9
13+
//你可以修改为 extends: ['plugin:vue/essential', 'eslint:recommended']
1214
extends: ['plugin:vue/recommended', 'eslint:recommended'],
1315

1416
// add your custom rules here
@@ -22,7 +24,7 @@ module.exports = {
2224
}
2325
}],
2426
"vue/singleline-html-element-content-newline": "off",
25-
"vue/multiline-html-element-content-newline":"off",
27+
"vue/multiline-html-element-content-newline": "off",
2628
"vue/name-property-casing": ["error", "PascalCase"],
2729
"vue/no-v-html": "off",
2830
'accessor-pairs': 2,
@@ -47,7 +49,7 @@ module.exports = {
4749
'curly': [2, 'multi-line'],
4850
'dot-location': [2, 'property'],
4951
'eol-last': 2,
50-
'eqeqeq': ["error", "always", {"null": "ignore"}],
52+
'eqeqeq': ["error", "always", { "null": "ignore" }],
5153
'generator-star-spacing': [2, {
5254
'before': true,
5355
'after': true

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
99
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
1010
// https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
11-
'plugins': ['dynamic-import-node']
11+
'plugins': ['dynamic-import-node'] // 利用babel的babel-dynamic-import-node插件实现路由懒加载
1212
}
1313
}
1414
}

jsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{
1+
{ //TODO: 什么用?
22
"compilerOptions": {
33
"baseUrl": "./",
44
"paths": {
55
"@/*": ["src/*"]
66
}
77
},
88
"exclude": ["node_modules", "dist"]
9-
}
9+
}

mock/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ const mocks = [
1717
// please use it cautiously, it will redefine XMLHttpRequest,
1818
// which will cause many of your third-party libraries to be invalidated(like progress event).
1919
function mockXHR() {
20-
// mock patch
21-
// https://github.com/nuysoft/Mock/issues/300
20+
// mock补丁 :https://github.com/nuysoft/Mock/issues/300
2221
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
2322
Mock.XHR.prototype.send = function() {
2423
if (this.custom.xhr) {
@@ -31,7 +30,7 @@ function mockXHR() {
3130
this.proxy_send(...arguments)
3231
}
3332

34-
function XHR2ExpressReqWrap(respond) {
33+
function XHR2ExpressReqWrap(respond) { //TODO: 什么用
3534
return function(options) {
3635
let result = null
3736
if (respond instanceof Function) {
@@ -49,7 +48,7 @@ function mockXHR() {
4948
}
5049
}
5150

52-
for (const i of mocks) {
51+
for (const i of mocks) { // NOTE: 遍历模板mock数据
5352
Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response))
5453
}
5554
}

mock/mock-server.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// 由于我们的 mock 是完全基于webpack-dev-serve来实现的,所以在你启动前端服务的同时,mock-server就会自动启动,
2+
// 而且这里还通过 chokidar 来观察 mock 文件夹内容的变化。
3+
// 在发生变化时会清除之前注册的mock-api接口,重新动态挂载新的接口,从而支持热更新
4+
5+
// TODO:mock-server是什么
6+
17
const chokidar = require('chokidar')
28
const bodyParser = require('body-parser')
39
const chalk = require('chalk')

src/components/PanThumb/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item">
2+
<div :style="{zIndex,height,width}" class="pan-item">
33
<div class="pan-info">
44
<div class="pan-info-roles-container">
55
<slot />

src/components/ThemePicker/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</template>
99

1010
<script>
11-
const version = require('element-ui/package.json').version // element-ui version from node_modules
11+
const version = require('element-ui/package.json').version // 获取element-ui的版本号
1212
const ORIGINAL_THEME = '#409EFF' // default color
1313
1414
export default {
@@ -95,7 +95,7 @@ export default {
9595
return newStyle
9696
},
9797
98-
getCSSString(url, variable) {
98+
getCSSString(url, variable) { // TODO: 怎么修改主题色? https://panjiachen.gitee.io/vue-element-admin-site/zh/guide/advanced/theme.html#%E5%A4%9A%E5%A5%97%E4%B8%BB%E9%A2%98%E6%8D%A2%E8%82%A4
9999
return new Promise(resolve => {
100100
const xhr = new XMLHttpRequest()
101101
xhr.onreadystatechange = () => {

src/directive/permission/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const install = function(Vue) {
44
Vue.directive('permission', permission)
55
}
66
if (window.Vue) {
7-
window['permission'] = permission
7+
window['permission'] = permission
88
Vue.use(install); // eslint-disable-line
99
}
1010

src/icons/svgo.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# 用于取出导出的svg的多余信息
2+
13
# replace default config
24

35
# multipass: true

src/layout/components/TagsView/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default {
4242
},
4343
computed: {
4444
visitedViews() {
45-
return this.$store.state.tagsView.visitedViews
45+
return this.$store.state.tagsView.visitedViews // 不用mapState是想要computed的缓存
4646
},
4747
routes() {
4848
return this.$store.state.permission.routes

0 commit comments

Comments
 (0)