Skip to content

Commit 579937a

Browse files
committed
add hidden checkbox
Signed-off-by: zhangtianli2006 <zhangtianli2006@163.com>
1 parent 8dec0d1 commit 579937a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/problem/edit.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<el-card>
55
<div slot="header" class="clearfix"><i class="el-icon-edit-outline" /> Name</div>
66
<el-input v-model="title" placeholder="Input problem title here"></el-input>
7+
<el-checkbox v-model="enabled" label="Enabled" class="item"></el-checkbox>
78
</el-card>
89
<el-card class="item">
910
<i class="el-icon-menu" /> Limitation
@@ -53,7 +54,8 @@ export default {
5354
contentLoading: true,
5455
buttonLoading: false,
5556
time: 'Unknown',
56-
memery: 'Unknown'
57+
memery: 'Unknown',
58+
enabled: true
5759
};
5860
},
5961
methods: {
@@ -66,6 +68,7 @@ export default {
6668
this.mdContent = data.description;
6769
this.memery = data.memory_limit / 1000;
6870
this.time = data.time_limit;
71+
this.enabled = data.enabled;
6972
this.contentLoading = false;
7073
})
7174
.catch(err => {
@@ -83,7 +86,8 @@ export default {
8386
title: this.title,
8487
description: this.mdContent,
8588
memory_limit: this.memery * 1000,
86-
time_limit: this.time
89+
time_limit: this.time,
90+
enabled: this.enabled
8791
})
8892
.then(() => {
8993
this.$SegmentMessage.success(this, 'Your change has been submited');

0 commit comments

Comments
 (0)