Skip to content

Commit

Permalink
Mod: 累计更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Maorey committed Jan 21, 2020
1 parent d3390cc commit 51f6d0a
Show file tree
Hide file tree
Showing 38 changed files with 1,413 additions and 568 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ module.exports = {
], // 最大列数
'max-params': ['error', 7], // function最大参数数
'max-statements': ['error', 120], // function最大语句数
'curly': 'error', // 控制语句不允许省略大括号
'no-lonely-if': 'error',
'no-dupe-else-if': 'error',
'no-debugger': ENV,
'no-console': [ENV, { allow: ['info', 'warn', 'error'] }],

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/// 代码风格 ///
"vetur.completion.tagCasing": "initial",
"vetur.useWorkspaceDependencies": true,
"vetur.experimental.templateInterpolationService": true,
// "vetur.experimental.templateInterpolationService": true, // 卡
"vetur.format.defaultFormatterOptions": {
"prettier": {
"semi": false, // 不要句尾分号
Expand Down
14 changes: 7 additions & 7 deletions .vscode/vue.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"// import(/* webpackChunkName: \"ihOne\" */ './ModuleOne')",
"// )",
"",
"/// 选项 name,directives,filters,extends,mixins ///",
"/// 选项 name,components,directives,filters,extends,mixins ///",
"@Component // @Component({ components: { ModuleOne } })",
"export default class extends Vue {",
" /// [model] (@Model('change') readonly attr!: string) ///",
Expand All @@ -37,8 +37,8 @@
" /// 非响应式属性 (attr?: string // undefined) ///",
" /// [computed] (get attr() {} set attr(){}) ///",
" // private get STYLE() { return STYLE }",
" /// [watch] (@Watch('attr') onAttrChange(val, oldVal) {}) ///",
" /// [LifeCycle] (private beforeCreate(){}/.../destroyed(){}) ///",
" /// [watch] (@Watch('attr') onAttrChange(val, oldVal) {}) ///",
" /// [methods] (method(){}) ///",
"}",
"</script>",
Expand Down Expand Up @@ -80,7 +80,7 @@
"// import(/* webpackChunkName: \"ihOne\" */ './ModuleOne')",
"// )",
"",
"/// 选项 name,directives,filters,extends,mixins ///",
"/// 选项 name,components,directives,filters,extends,mixins ///",
"@Component // @Component({ components: { ModuleOne } })",
"export default class extends Vue {",
" /// [model] (@Model('change') attr) ///",
Expand All @@ -89,8 +89,8 @@
" /// 非响应式属性 (attr // undefined) ///",
" /// [computed] (get attr() {} set attr(){}) ///",
" // get STYLE() { return STYLE }",
" /// [watch] (@Watch('attr') onAttrChange(val, oldVal) {}) ///",
" /// [LifeCycle] (beforeCreate(){}/.../destroyed(){}) ///",
" /// [watch] (@Watch('attr') onAttrChange(val, oldVal) {}) ///",
" /// [methods] (method(){}) ///",
"}",
"</script>",
Expand All @@ -113,9 +113,9 @@
" * @Author: ${2:作者}",
" * @Date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
" */",
"import { CreateElement } from 'vue'",
"// see: https://github.com/kaorun343/vue-property-decorator",
"import { Component, Vue } from 'vue-property-decorator'",
"import { CreateElement } from 'vue'",
"",
"/// [import] vue组件,其他,CSS Module ///",
"// import { getAsync } from '@/utils/highOrder'",
Expand All @@ -134,8 +134,8 @@
" /// [data] (attr: string = '响应式属性' // 除了 undefined) ///",
" /// 非响应式属性 (attr?: string // undefined) ///",
" /// [computed] (get attr() {} set attr(){}) ///",
" /// [watch] (@Watch('attr') onAttrChange(val, oldVal) {}) ///",
" /// [LifeCycle] (private beforeCreate(){}/.../destroyed(){}) ///",
" /// [watch] (@Watch('attr') onAttrChange(val, oldVal) {}) ///",
" /// [methods] (method(){}) ///",
" // see: https://github.com/vuejs/jsx#installation",
" // eslint-disable-next-line @typescript-eslint/no-unused-vars",
Expand Down Expand Up @@ -185,8 +185,8 @@
" /// [data] (attr = '响应式属性' // 除了 undefined) ///",
" /// 非响应式属性 (attr // undefined) ///",
" /// [computed] (get attr() {} set attr(){}) ///",
" /// [watch] (@Watch('attr') onAttrChange(val, oldVal) {}) ///",
" /// [LifeCycle] (beforeCreate(){}/.../destroyed(){}) ///",
" /// [watch] (@Watch('attr') onAttrChange(val, oldVal) {}) ///",
" /// [methods] (method(){}) ///",
" // see: https://github.com/vuejs/jsx#installation",
" // eslint-disable-next-line @typescript-eslint/no-unused-vars",
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 更新日志

## v 1.1.0

- 细节细节还是细节

## v 1.0.0

- [Breaking] 重命名主题(theme)为皮肤(skin),并调整相关环境变量及目录、文件名
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ yarn vue-cli-service help # [命令] : 比如 yarn vue-cli-service help test:e2e
}
```

- 先定义再`export`(IDE 提示更友好), 并且`export`语句放到最后
- `enum/type/interface` 需要导出的直接 `export` (否则可能会得到 undefined), 其他的除了字典(硬编码)外, 先定义再`export`(IDE 提示更友好), 并且`export`语句放到最后
- 不要使用 `$` 作为组件事件名, 该名字已被[异步组件刷新](src/utils/highOrder.ts)占用
- 路由请**全部**使用异步组件(`@utils/highOrder getAsync`), 以使路由及其**子(异步)组件**可以局部刷新
- CSS Modules class 名使用 `camelCase` (global 可以 kebab-case), 选择器嵌套**不应超过三层**
Expand Down Expand Up @@ -391,7 +391,7 @@ yarn vue-cli-service help # [命令] : 比如 yarn vue-cli-service help test:e2e
</style>
```
- 正确规范简洁优雅适当的各种**注释**, 比如方法注释及必要的变量注释:
- 正确规范([JSDoc](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc))简洁适当的各种**注释**, 比如函数注释及必要的变量注释:
```TypeScript
/** 二维点
Expand Down
Loading

0 comments on commit 51f6d0a

Please sign in to comment.