- 动态左侧菜单获取
- 左侧菜单有子菜单和无子菜单的处理
- 权限管理 -> 资源列表 - 完成
- 权限管理 -> 菜单列表 - 完成
- 权限管理 -> 角色列表 - (菜单分配和资源分配 未完成)
说明一下,平时工作就是vue的业务,所以有些CRUD的业务就不写了. 把时间花在更有意义的事情上.
## Project setupnpm install
npm run serve
npm run build
npm run lint
vue-class-component
提供使用Class
语法写 Vue 组件vue-property-decorator
在Class
语法基础之上提供一些辅助装饰器@typescript-eslint/eslint-plugin
使用EsLint
校验TypeScript
代码@typescript-eslint/parser
将TypeScript
转为AST
供ESLint
校验使用@vue/cli-plugin-typescript
使用TypeScript
+ts-loader
+fork-ts-checker-webpack-plugin
进行更快的类型检查@vue/eslint-config-typescript
: 兼容ESLint
的TypeScript
校验规则typescript
:TypeScript
编译器,提供类型校验和转换JavaScript
功能
装饰器
就是一个函数, 扩展类型的属性和功能
// 方式1: OptionsAPIs --- Vue.extend
import Vue from 'vue'
export default Vue.extend({
// 使用 Vue.extend({})的方式才能有类型注解和校验才会有效果
data() {
return {
person: {
name: 'lelsie',
age: 18
}
}
},
methods: {
handle(): string {
console.info(this.person.name)
return this.person.name
}
}
})
// 方式2: ClassAPIs: extends Vue
import Vue from 'vue'
import Component from 'vue-class-component'
// Define the component in class-style
@Component
export default class App extends Vue {
// class properties will be component data
count = 0
// methods will be component methods
handle() {
console.info(this.count)
}
}
// 方式3: ClassAPIs + decorator
import { Vue, Component, Prop } from 'vue-property-decorator'
@Component
export default class App extends Vue {
@Prop(Number) readonly propA: number | undefined
@Prop({default: 'default value'}) readonly propB!: string
@Prop([String,Boolean]) readonly propC: string | boolean | undefined
}
/**
* props: {
propA: {
type: Number,
},
propB: {
default: 'default value',
},
propC: {
type: [String, Boolean],
},
}
*/
- 1.完成视频中老师提出的作业要求
- 2.100% 还原视频中所讲到的内容
- 3.完成剩下的几个模块
- 作业接口文档地址
- http://113.31.104.154:8081/doc.html#/home
- http://113.31.104.154:8010/doc.html#/home