diff --git a/public/static/ueditorPlus/ueditor.config.js b/public/static/ueditorPlus/ueditor.config.js
index 7c9cfd1..f555c0e 100644
--- a/public/static/ueditorPlus/ueditor.config.js
+++ b/public/static/ueditorPlus/ueditor.config.js
@@ -59,7 +59,7 @@
".gif",
".bmp"
],
-
+ fontfamily: [],
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
toolbars: [
["fullscreen", "source", "|", "bold", "italic", "underline", "forecolor", "fontfamily", "fontsize", "|", "justifyleft", "justifycenter", "justifyright", "justifyjustify", "|", "insertimage", "inserttable", 'formula', "gapfilling", 'combox']
@@ -101,7 +101,7 @@
// 禁止本地上传
disableUpload: false,
}
- , zIndex: 2000
+ , zIndex: 2500
, fullscreen: false
, rgb2Hex: true,
diff --git a/src/pages/ques/detail/index.vue b/src/pages/ques/detail/index.vue
index 26d6490..2d4ab6d 100644
--- a/src/pages/ques/detail/index.vue
+++ b/src/pages/ques/detail/index.vue
@@ -57,7 +57,12 @@
选项{{
numToLetter(i)
}}
-
+
+ optReady(editor, item)" />
@@ -66,7 +71,6 @@
-
@@ -228,6 +232,7 @@ export default {
answerIsCorrect: '',
optionNumber: '',
optionText: '',
+ focus: 0,
},
answerAnalysis: '',
originFillBlank: {},
@@ -331,6 +336,7 @@ export default {
// this.questionBankCategory = r.questionBankCategory
}
+ opts.map(e => e.focus = 0)
this.form = {
questionId: r.questionId,
questionType: r.questionType,
@@ -477,6 +483,20 @@ export default {
delOpt (i) {
this.form.questionAnswerVersions.length > 2 && this.form.questionAnswerVersions.splice(i, 1)
},
+ // 移除选项
+ optFocus (e) {
+ const opts = this.form.questionAnswerVersions
+ opts.map(n => n.focus = 0)
+ e.focus = 1
+ },
+ // 选项富文本加载完毕回调
+ optReady (editor, opt) {
+ editor.setContent(opt.optionText)
+ editor.addListener('blur', () => {
+ opt.optionText = editor.getContent()
+ })
+ editor.focus()
+ },
editorReady (instance) {
console.log("🚀 ~ editorReady ~ instance:", instance)
@@ -721,6 +741,24 @@ export default {
margin-right: 15px;
}
+ .opt-input {
+ width: 100%;
+ min-height: 32px;
+ padding: 0 15px;
+ font-size: 13px;
+ border: 1px solid #DCDEE0;
+ border-radius: 2px;
+ cursor: text;
+ }
+
+ .default {
+ color: #8f8f8f;
+ }
+
+ .opt-editor {
+ width: calc(100% - 132px);
+ }
+
.icon {
margin-left: 10px;
font-size: 18px;
diff --git a/src/pages/testPaper/detail/template.vue b/src/pages/testPaper/detail/template.vue
index bc559d2..ba627ef 100644
--- a/src/pages/testPaper/detail/template.vue
+++ b/src/pages/testPaper/detail/template.vue
@@ -240,6 +240,7 @@ export default {
// 使用模板
async useTemplate (row) {
const data = await this.getDetail(row.templateId)
+ data.paperOutline.map(e => e.examQuestions = [])
this.$parent.form.paperOutline = data.paperOutline
this.listVisible = false
},