|
@@ -4,7 +4,7 @@
|
|
<h2 v-if="curQue.title">{{ curQue.title }}</h2>
|
|
<h2 v-if="curQue.title">{{ curQue.title }}</h2>
|
|
<ul>
|
|
<ul>
|
|
<li v-for="(items, indexs) in curQue.option" :key="indexs">
|
|
<li v-for="(items, indexs) in curQue.option" :key="indexs">
|
|
- <b v-if="items.number">{{ items.number }}</b>
|
|
|
|
|
|
+ <b class="xuhao" v-if="items.number">{{ items.number }}</b>
|
|
<p
|
|
<p
|
|
:class="[oldsrc == items.mp3_list[0].id ? palyClass : '']"
|
|
:class="[oldsrc == items.mp3_list[0].id ? palyClass : '']"
|
|
@click="handlePlayVoice(items.mp3_list[0].id)"
|
|
@click="handlePlayVoice(items.mp3_list[0].id)"
|
|
@@ -91,15 +91,25 @@
|
|
<template v-if="items.detail.pyPosition == 'top'">
|
|
<template v-if="items.detail.pyPosition == 'top'">
|
|
<div
|
|
<div
|
|
v-if="conent.pinyin == '__'"
|
|
v-if="conent.pinyin == '__'"
|
|
- contenteditable
|
|
|
|
|
|
+ contenteditable="true"
|
|
class="input pinyin"
|
|
class="input pinyin"
|
|
|
|
+ v-html="answerList[indexs].pinyin"
|
|
|
|
+ @change="changeAnswerList($event, indexs, 'pinyin')"
|
|
></div>
|
|
></div>
|
|
|
|
+ <!--
|
|
|
|
+ v-model="answerList[indexs].pinyin"
|
|
|
|
+ -->
|
|
<p class="pinyin" v-else>
|
|
<p class="pinyin" v-else>
|
|
{{ conent.pinyin }}
|
|
{{ conent.pinyin }}
|
|
</p>
|
|
</p>
|
|
</template>
|
|
</template>
|
|
<template v-if="conent.chs == '__'">
|
|
<template v-if="conent.chs == '__'">
|
|
- <div contenteditable class="input chs"></div>
|
|
|
|
|
|
+ <div
|
|
|
|
+ contenteditable="true"
|
|
|
|
+ class="input chs"
|
|
|
|
+ v-html="answerList[indexs].chs"
|
|
|
|
+ @change="changeAnswerList($event, indexs, 'chs')"
|
|
|
|
+ ></div>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<p class="chs">
|
|
<p class="chs">
|
|
@@ -112,8 +122,10 @@
|
|
>
|
|
>
|
|
<div
|
|
<div
|
|
v-if="conent.pinyin == '__'"
|
|
v-if="conent.pinyin == '__'"
|
|
- contenteditable
|
|
|
|
|
|
+ contenteditable="true"
|
|
class="input pinyin"
|
|
class="input pinyin"
|
|
|
|
+ v-html="answerList[indexs].pinyin"
|
|
|
|
+ @change="changeAnswerList($event, indexs, 'pinyin')"
|
|
></div>
|
|
></div>
|
|
<p class="pinyin" v-else>
|
|
<p class="pinyin" v-else>
|
|
{{ conent.pinyin }}
|
|
{{ conent.pinyin }}
|
|
@@ -184,6 +196,7 @@ export default {
|
|
dataType: [], // 题型
|
|
dataType: [], // 题型
|
|
chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
|
|
chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
|
|
noFont: ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")"], // 对应不要拼音字体
|
|
noFont: ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")"], // 对应不要拼音字体
|
|
|
|
+ answerList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -272,10 +285,27 @@ export default {
|
|
let resArr = type == "hanzi" ? str.split("") : str.split(/\s+/);
|
|
let resArr = type == "hanzi" ? str.split("") : str.split(/\s+/);
|
|
return resArr;
|
|
return resArr;
|
|
},
|
|
},
|
|
|
|
+ changeAnswerList(e, index, type) {
|
|
|
|
+ if (type == "pinyin") {
|
|
|
|
+ this.answerList[index].pinyin += e.target.innerHTML;
|
|
|
|
+ } else {
|
|
|
|
+ this.answerList[index].chs += e.target.innerHTML;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
created() {
|
|
created() {
|
|
this.handleData();
|
|
this.handleData();
|
|
|
|
+ if (this.dataType.indexOf("sentence_input_chs") != -1) {
|
|
|
|
+ this.curQue.option.forEach((item) => {
|
|
|
|
+ item.answer.forEach((it) => {
|
|
|
|
+ this.answerList.push({
|
|
|
|
+ chs: "",
|
|
|
|
+ pinyin: "",
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
mounted() {
|
|
mounted() {
|
|
@@ -329,12 +359,13 @@ export default {
|
|
width: 24px;
|
|
width: 24px;
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
- text-align: right;
|
|
|
|
|
|
+ text-align: center;
|
|
margin-right: 8px;
|
|
margin-right: 8px;
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
- color: #000000;
|
|
|
|
|
|
+ color: #ffffff;
|
|
// margin-top: 4px;
|
|
// margin-top: 4px;
|
|
font-family: "FZJCGFKTK";
|
|
font-family: "FZJCGFKTK";
|
|
|
|
+ border-radius: 50%;
|
|
}
|
|
}
|
|
> p {
|
|
> p {
|
|
width: 24px;
|
|
width: 24px;
|
|
@@ -476,4 +507,18 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.NPC-Big-Book-preview-green {
|
|
|
|
+ .Big-Book-prev-Textdes {
|
|
|
|
+ b.xuhao {
|
|
|
|
+ background: #24b99e;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.NPC-Big-Book-preview-brown {
|
|
|
|
+ .Big-Book-prev-Textdes {
|
|
|
|
+ b.xuhao {
|
|
|
|
+ background: #bd8865;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|