Commit 4d7d9208 authored by huanglu's avatar huanglu

feat: 完成基础功能

parent b59c4e9e
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:paintType="paintType" :paintType="paintType"
:drawType="drawType" :drawType="drawType"
class="draw-board" class="draw-board"
paintColor='#F0F'
/> />
<div class="tools-wrap"> <div class="tools-wrap">
<el-button <el-button
...@@ -17,8 +18,8 @@ ...@@ -17,8 +18,8 @@
:key="itm.title" :key="itm.title"
>{{ itm.name }} >{{ itm.name }}
</el-button> </el-button>
<el-button @click="sendAnswer" <el-button @click="sendAnswer"
type="primary" type="primary"
class="itm" class="itm"
:disabled="disabled">提交 :disabled="disabled">提交
</el-button> </el-button>
...@@ -38,10 +39,10 @@ ...@@ -38,10 +39,10 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<el-button v-if="questionType === 3" <el-button v-if="questionType === 3"
type="primary" type="primary"
@click="sendAnswer" @click="sendAnswer"
:disabled="disabled" :disabled="disabled"
class="ans-commit"> class="ans-commit">
提交 提交
</el-button> </el-button>
...@@ -108,7 +109,7 @@ export default { ...@@ -108,7 +109,7 @@ export default {
msg = '' msg = ''
} }
socket.sendGroupMsg( socket.sendGroupMsg(
{ {
type: 'answer', type: 'answer',
payload: { payload: {
type: this.questionType, type: this.questionType,
...@@ -129,10 +130,10 @@ export default { ...@@ -129,10 +130,10 @@ export default {
// 42["msg",{"from":"teacher-1608135771425","type":"question", // 42["msg",{"from":"teacher-1608135771425","type":"question",
// "payload":{"type":0,"title":"选择题"}}] // "payload":{"type":0,"title":"选择题"}}]
if (msg && msg.from && msg.from.indexOf('teacher') > -1 && msg.payload.type > -1) { if (msg && msg.from && msg.from.indexOf('teacher') > -1 && msg.payload.type > -1) {
this.questionType = msg.payload.type this.questionType = msg.payload.type
// if (this.questionType === 3) { // if (this.questionType === 3) {
this.disabled = false this.disabled = false
// } // }
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment