Skip to content

Commit b4740cd

Browse files
authored
Merge pull request #117 from segment-oj/fix-code-style-ztl
[lint] fix code style and spelling
2 parents 0076ae4 + 520c495 commit b4740cd

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/components/user/content.vue

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
</div>
1010

1111
<div id="info">
12-
<el-tabs v-model="activetab" :tab-position="'right'">
12+
<el-tabs v-model="active_tab" :tab-position="'right'">
1313
<el-tab-pane label="Information" name="first">
14-
<userinfo></userinfo>
14+
<userInfo></userInfo>
1515
</el-tab-pane>
16-
<el-tab-pane v-if="canedit" label="Edit" name="second">
17-
<useredit></useredit>
16+
<el-tab-pane v-if="can_edit" label="Edit" name="second">
17+
<userEdit></userEdit>
1818
</el-tab-pane>
19-
<el-tab-pane v-if="ismine" label="Security" name="third">
20-
<usersucure></usersucure>
19+
<el-tab-pane v-if="is_mine" label="Security" name="third">
20+
<userSecure></userSecure>
2121
</el-tab-pane>
2222
</el-tabs>
2323
</div>
@@ -26,17 +26,17 @@
2626

2727
<script>
2828
import apiurl from './../../apiurl';
29-
import userinfo from './information.vue';
30-
import useredit from './edit.vue';
31-
import usersucure from './secure.vue';
29+
import userInfo from './information.vue';
30+
import userEdit from './edit.vue';
31+
import userSecure from './secure.vue';
3232
3333
export default {
3434
name: 'UserHomepage',
3535
data() {
3636
return {
37-
activetab: 'first',
38-
ismine: false,
39-
canedit: false,
37+
active_tab: 'first',
38+
is_mine: false,
39+
can_edit: false,
4040
avatarWidth: 800 < screen.width ? 300 : screen.width - 40,
4141
smallScreen: 700 < screen.width,
4242
};
@@ -50,10 +50,10 @@ export default {
5050
this.userid = data.id;
5151
this.isStaff = data.is_staff;
5252
if (this.userid == String(this.$store.state.user.userid)) {
53-
this.ismine = true;
53+
this.is_mine = true;
5454
}
55-
if (this.$store.state.user.isStaff || this.ismine) {
56-
this.canedit = true;
55+
if (this.$store.state.user.isStaff || this.is_mine) {
56+
this.can_edit = true;
5757
}
5858
})
5959
.catch(err => {
@@ -70,9 +70,9 @@ export default {
7070
this.showHomepage();
7171
},
7272
components: {
73-
userinfo,
74-
useredit,
75-
usersucure
73+
userInfo,
74+
userEdit,
75+
userSecure
7676
}
7777
};
7878
</script>

0 commit comments

Comments
 (0)