refactor: 将代码规范文档从 docs 目录迁移至 specs 目录
This commit is contained in:
39
specs/vue.base.md
Normal file
39
specs/vue.base.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Vue 基础代码 `[Vue.Base]`
|
||||
|
||||
> - includes `*.vue`
|
||||
|
||||
## Vue 自定义组件命名规则 `[Vue.Base.CustomComponentName]`
|
||||
|
||||
必须使用大驼峰命名并且使用的时候也是,并且至少两个单词。
|
||||
|
||||
### Good
|
||||
|
||||
```vue
|
||||
<!-- UserInfo.vue -->
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "UserInfo",
|
||||
// ...
|
||||
};
|
||||
</script>
|
||||
```
|
||||
|
||||
### Bad
|
||||
|
||||
```vue
|
||||
<!-- userinfo.vue -->
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "userinfo",
|
||||
// ...
|
||||
};
|
||||
</script>
|
||||
```
|
||||
Reference in New Issue
Block a user