-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(allProject): 同步本地最新代码,全部项目迁移typescript + vue class component
同步本地,项目全部重构,优化表单设计表格设计等
- Loading branch information
Showing
317 changed files
with
17,820 additions
and
10,828 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,3 @@ | ||
> 1% | ||
last 2 versions | ||
not ie <= 8 |
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,7 @@ | ||
[*.{js,jsx,ts,tsx,vue}] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 100 |
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,17 @@ | ||
#开发环境 | ||
NODE_ENV=development | ||
|
||
#系统标题 | ||
VUE_APP_NAME=BoBo"s Vue Admin | ||
|
||
#后端接口地址 | ||
VUE_APP_API_URL=http://xxx.xx.xx.xxx:8080/api/ | ||
|
||
#后台webSocket地址 | ||
VUE_APP_WS_URL=ws://xxx.xx.xx.xxx:8080/api/websocket | ||
|
||
#开发服务端口 | ||
PORT=1024 | ||
|
||
#公共组件使用cdn加速 | ||
VUE_APP_CDN=false |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
#生产环境 | ||
NODE_ENV=production | ||
|
||
#是否为公网演示环境 | ||
VUE_APP_ISPUBLIC=false | ||
|
||
#项目打包名称 | ||
VUE_APP_OUTPUTDIR=dist | ||
|
||
#系统标题 | ||
VUE_APP_NAME=BoBo"s Vue Admin | ||
|
||
#公共组件使用cdn加速 | ||
VUE_APP_CDN=true | ||
|
||
#后端接口地址 | ||
VUE_APP_API_URL=http://xxx.xx.xx.xxx:8080/api/ | ||
|
||
#后台webSocket地址 | ||
VUE_APP_WS_URL=ws://xxx.xx.xx.xxx:8080/api/websocket |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
#生产环境 | ||
NODE_ENV=production | ||
|
||
#是否导出分析报告 | ||
IS_REPORT=true | ||
|
||
#项目打包名称 | ||
VUE_APP_OUTPUTDIR=dist | ||
|
||
#公共组件使用cdn加速 | ||
VUE_APP_CDN=true | ||
|
||
#使用本文件输出的编译文件不用于部署,所以后端接口地址不用配置 | ||
VUE_APP_API_URL= |
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 |
---|---|---|
@@ -1,37 +1,48 @@ | ||
/** | ||
* @file airbnb eslint http://airbnb.io/javascript/ | ||
* @author BoBo | ||
* @copyright BoBo | ||
* @createDate 2018年11月13日11:21:51 | ||
*/ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
|
||
}, | ||
extends: [ | ||
'plugin:vue/essential', | ||
'@vue/airbnb', | ||
'@vue/typescript', | ||
], | ||
plugins: [ | ||
'vue' | ||
], | ||
|
||
// 修改airbnb部分变态规则 | ||
rules: { | ||
"semi": "off", //去掉分号检查 | ||
'linebreak-style': 'off', | ||
'no-param-reassign': 0, //允许改变形参 | ||
'no-plusplus': 0, // ++ --允许使用 | ||
'no-underscore-dangle': 0, //允许类似 const _this=this 下划线命名 | ||
'import/no-unresolved': 'off', //允许alias import | ||
'import/no-duplicates': 'off', //允许alias import | ||
'no-restricted-syntax': 0, // 允许for-of, | ||
'vue/require-prop-types': 0, //props允许不指定type | ||
'consistent-return': 'off', // | ||
'max-len': 'off', | ||
'import/extensions': 'off', | ||
'vue/require-valid-default-prop': 'off', | ||
'max-len': ['error', { code: 200 }], | ||
// 允许修改形参 | ||
'no-param-reassign': 0, | ||
// 允许使用 for-of,https://github.com/airbnb/javascript#iterators--nope | ||
'no-restricted-syntax': 0, | ||
// 允许v-if和v-for同时使用,https://vuejs.github.io/eslint-plugin-vue/rules/no-use-v-if-with-v-for.html | ||
'vue/no-use-v-if-with-v-for': ['error', { | ||
allowUsingIterationVar: true, | ||
}], | ||
// 允许循环引入 | ||
'import/no-cycle': 0, | ||
// fix unresolved bug | ||
'import/no-unresolved': 0, | ||
// file extension | ||
'import/extensions': 0, | ||
'no-unused-vars': 0, | ||
// import named | ||
'import/named': 0, | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
// 允许class中方法不使用this | ||
'class-methods-use-this': 'off', | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint', | ||
parser: '@typescript-eslint/parser', | ||
ecmaFeatures: { | ||
"legacyDecorators": 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
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
{ | ||
"printWidth": 200, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"arrowParens": "always" | ||
} |
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 |
---|---|---|
@@ -1,34 +1,52 @@ | ||
# dev框架板项目 | ||
本项目基于 [Vue CLI 3](https://cli.vuejs.org/config/) 构建。 | ||
|
||
技术栈主要使用vue-cli3.0+vue+elementUI+vuex+axios。<br> | ||
这是一个基于手摸手系列,<a target="_blank" href="https://github.com/PanJiaChen/vueAdmin-template">vueadmin-template</a>进行改造的版本----感谢作者风骚花裤衩。 | ||
|
||
由于是基于vue-cli3.0为基础进行的开发,所以同比vue-cli2会有区别:<br> | ||
1、项目的目录结构发生了变化,vue-cli3.0隐藏了webpack的配置文件,目录看起来非常的清爽简洁,在目标上追求0配置进行开发,将大部分时间用在开发上,避免在配置上浪费过多时间。但是个人风格配置无法避免,这里提供了一个<a href="https://github.com/vuejs/vue-docs-zh-cn/blob/master/vue-cli/webpack.md">vue.config.js</a>进行项目的配置;<br><br> | ||
|
||
2、使用vue ui命令就可以呼唤出vue的图形化界面,可以直接在页面上操控项目的配置,这逼格一下上了天。123 <br> | ||
![Image text](https://randy168.com/屏幕快照%202018-08-15%20下午11.04.14.png) <br><br> | ||
|
||
项目文档 https://wiki.anshare.com.cn/frameworks 。 | ||
|
||
<strong>如果这个项目对你工作和学习有帮助,别忘了右上角的star哦😊</strong> | ||
|
||
|
||
### Project setup | ||
## 0. 拉取代码时注意事项 | ||
本项目基于airbnb的eslint规范,所以无论你用Windows、Mac OS还是UNIX,请使用0x0A(LF)换行符。 | ||
Git提供了一个“换行符自动转换”功能,默认处于自动模式,Windows环境必须做如下设置: | ||
``` | ||
npm install | ||
提交时转换为LF,检出时不转换 | ||
git config --global core.autocrlf input | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
由于vue大小写敏感,请修改Git默认设置 | ||
``` | ||
npm run dev | ||
设置为区分大小写 | ||
git config core.ignorecase false | ||
``` | ||
|
||
### Compiles and minifies for production | ||
## 1、开始使用 | ||
* 使用npm安装依赖包 | ||
``` | ||
npm run build | ||
npm i | ||
``` | ||
* 开发环境编译启动及部署 | ||
``` | ||
npm start | ||
```` | ||
### Compiles and minifies for production to analyze the component percent | ||
## 2、git commit lint规范 | ||
``` | ||
npm run analyze | ||
参考angularJs标准提交规范 | ||
输入git cz 提交 | ||
``` | ||
## 3、eslint规范 | ||
默认采用airbnb规范,规则详见 .eslintrc.js | ||
## 4、内置装饰器 | ||
有些场景使用装饰器比在代码里面硬编码显得更简单,比如防抖节流,确认提示等等,当前框架内置了一小部分装饰器,更多装饰器正在完善中。 | ||
详见 @/decorator | ||
``` javascript | ||
使用方法 eq: | ||
@confirm('请输入内容','提示') | ||
confirmCallBack(){ | ||
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ module.exports = { | |
presets: [ | ||
'@vue/app', | ||
], | ||
} | ||
}; |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
extends: ['./lib/lint'], | ||
extends: ['./node_modules/vue-cli-plugin-commitlint/lib/lint'], | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.