|
@@ -4,8 +4,8 @@
|
|
|
<IconText :text="'题目'" :color="'#2d8cf0'" :icon="'ios-create'" style="margin-bottom:15px;"></IconText>
|
|
|
<div ref="singleEditor" style="text-align:left"></div>
|
|
|
</div>
|
|
|
- <div class="exersices-option">
|
|
|
- <IconText :text="'单选选项'" :color="'#FF871C'" :icon="'md-reorder'"></IconText>
|
|
|
+ <div class="exersices-option" style="margin-top:20px">
|
|
|
+ <IconText :text="'多选选项'" :color="'#FF871C'" :icon="'md-reorder'"></IconText>
|
|
|
<div v-if="options.length">
|
|
|
<div v-for="(item,index) in options" :key="index" class="option-editor-wrap" style="margin-top:10px;display:flex">
|
|
|
<span class="fl-center option-order">{{String.fromCharCode(64 + parseInt(index+1))}}</span>
|
|
@@ -55,9 +55,8 @@
|
|
|
this.stemEditor.txt.clear()
|
|
|
// this.initEditors()
|
|
|
// this.stemContent = ''
|
|
|
- },
|
|
|
+ },
|
|
|
initEditors() {
|
|
|
- // Editor默认配置
|
|
|
if (this.options.length > 0) {
|
|
|
this.options.forEach((item, i) => {
|
|
|
let that = this
|
|
@@ -149,6 +148,7 @@
|
|
|
if (this.options.length > 2) {
|
|
|
this.options.splice(index, 1)
|
|
|
this.optionsContent.splice(index, 1)
|
|
|
+ console.log(this.$refs['singleOption' + index][0]);
|
|
|
// 如果删除了已有选项 后面的code要降1
|
|
|
for (let i in this.optionsContent) {
|
|
|
if (i >= index) {
|
|
@@ -200,7 +200,7 @@
|
|
|
this.initEditors()
|
|
|
|
|
|
if(this.editInfo && this.editInfo.question){
|
|
|
- console.log('进入单选题Mounted编辑')
|
|
|
+ console.log('进入多选题Mounted编辑')
|
|
|
this.editSingleInfo = this.editInfo
|
|
|
this.stemContent = this.editSingleInfo.question
|
|
|
this.optionsContent = this.editSingleInfo.option
|
|
@@ -215,7 +215,7 @@
|
|
|
editInfo: {
|
|
|
handler(newValue, oldValue) {
|
|
|
if (newValue) {
|
|
|
- console.log('单选接收到的数据')
|
|
|
+ console.log('多选接收到的数据')
|
|
|
console.log(newValue)
|
|
|
this.editSingleInfo = newValue
|
|
|
if (Object.keys(newValue).length > 0) {
|