-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
186 changed files
with
15,396 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
> 1% | ||
last 2 versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[*.{js,jsx,ts,tsx,vue}] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
}, | ||
'extends': [ | ||
'plugin:vue/essential', | ||
'@vue/standard' | ||
], | ||
rules: { | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-trailing-spaces': ["error", {"skipBlankLines": true}], | ||
'space-before-function-paren': ['error', 'never'], | ||
'indent': 'off', | ||
'vue/script-indent': [ | ||
'error', | ||
4, | ||
{ | ||
'baseIndent': 1 | ||
} | ||
] | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
/bu | ||
、 | ||
|
||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/app' | ||
], | ||
plugins: [ | ||
[ | ||
'@babel/plugin-transform-modules-commonjs', | ||
{ | ||
allowTopLevelThis: true, | ||
}, | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* 重写console.log方法 | ||
* 通过设置isLog来控制是否输出日志 | ||
* 对于object,array引用类型已进行深拷贝,确保打印出的值是执行时的值 | ||
* 重写后在整个程序的生命周期都有效,在程序的所有地方都可以调用 | ||
* 可在程序的第一行就调用,确保后续的console.log改写后的 | ||
* 如:vue在main.js中引入,小程序可在app.js第一行引入 | ||
* dev: isLog = true | ||
* prod: isLog = false | ||
* console.trace()为打印程序调用的堆栈,因为改写后打印的值是在改写后的堆栈中 | ||
* 如果觉得太长可设置isLogStack = false | ||
*/ | ||
|
||
console.log = (function (logFunc, isLog = true, isLogStack = false) { | ||
return function () { | ||
if (!isLog) { | ||
return | ||
} | ||
try { | ||
let arr = [] | ||
arr.push(...arguments) | ||
arr.forEach((item, index) => { | ||
if (Object.prototype.toString.call(item) === '[object Object]' || | ||
Object.prototype.toString.call(item) === '[object Array]') { | ||
arr[index] = JSON.parse(JSON.stringify(item)) | ||
} | ||
}) | ||
logFunc.call(console, ...arr) | ||
isLogStack ? console.trace() : null | ||
} catch (e) { | ||
console.log(`a log error: ${e}`) | ||
} | ||
} | ||
})(console.log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "cat-mall", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint" | ||
}, | ||
"dependencies": { | ||
"btoa": "^1.2.1", | ||
"btoa-atob": "^0.1.2", | ||
"core-js": "^2.6.5", | ||
"element-china-area-data": "^4.1.2", | ||
"element-ui": "^2.13.0", | ||
"vue": "^2.6.10", | ||
"vue-infinite-scroll": "^2.0.2", | ||
"vue-router": "^3.0.3", | ||
"vuex": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "^3.11.0", | ||
"@vue/cli-plugin-eslint": "^3.11.0", | ||
"@vue/cli-service": "^3.11.0", | ||
"@vue/eslint-config-standard": "^4.0.0", | ||
"axios": "^0.19.0", | ||
"babel-eslint": "^10.0.1", | ||
"eslint": "^5.16.0", | ||
"eslint-plugin-vue": "^5.0.0", | ||
"sass": "^1.18.0", | ||
"sass-loader": "^7.1.0", | ||
"vue-template-compiler": "^2.6.10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
plugins: { | ||
autoprefixer: {} | ||
} | ||
} |
Binary file not shown.
Oops, something went wrong.