We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40a30e9 commit e651e9bCopy full SHA for e651e9b
example/.env.mock example/.envexample/.env.mock renamed to example/.env
example/package.json
@@ -3,7 +3,6 @@
3
"version": "0.1.0",
4
"private": true,
5
"scripts": {
6
- "mock": "vue-cli-service serve --mode mock",
7
"serve": "vue-cli-service serve",
8
"build": "vue-cli-service build",
9
"test:unit": "vue-cli-service test:unit",
example/src/mock/modules/user.ts
@@ -27,10 +27,19 @@ class UserInfo extends LoginClass {
27
28
headImagePath = Mock.Random.image('64x64');
29
30
+ admin = false
31
+
32
+ teacher = false
33
34
+ student = false
35
36
constructor(code: string) {
37
super(code);
38
this.code = code;
39
this.role = code;
40
+ this.admin = code === 'admin';
41
+ this.teacher = code === 'teacher';
42
+ this.student = code === 'student';
43
}
44
45
0 commit comments