From 3227a799f9386a87d96ca2bc946efc7b32fb1c06 Mon Sep 17 00:00:00 2001 From: sudoooooo Date: Mon, 15 Jul 2024 18:00:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EditOptions/Options/OptionEdit.vue | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/web/src/materials/questions/widgets/EditOptions/Options/OptionEdit.vue b/web/src/materials/questions/widgets/EditOptions/Options/OptionEdit.vue index d8eb8aff..8025a528 100644 --- a/web/src/materials/questions/widgets/EditOptions/Options/OptionEdit.vue +++ b/web/src/materials/questions/widgets/EditOptions/Options/OptionEdit.vue @@ -14,7 +14,6 @@ @@ -42,7 +41,6 @@ import draggable from 'vuedraggable' import { cloneDeep as _cloneDeep } from 'lodash-es' import RichEditor from '@/common/Editor/RichEditor.vue' -import { mapGetters, mapState } from 'vuex' export default { name: 'OptionEdit', @@ -60,14 +58,6 @@ export default { draggable, RichEditor }, - data() { - return { - // 编辑器创建完成数量 - createdEditorCount: 0, - // 编辑器实例列表 - editorList: [] - } - }, mounted() { // 选项hash兜底 const hashMap = {} @@ -111,29 +101,6 @@ export default { optionSortChange() { const optionList = _cloneDeep(this.optionList) this.$emit('optionChange', optionList) - }, - // 监听 editor 创建完成 - handleCreated(editor) { - this.createdEditorCount++ - this.editorList.push(editor) - } - }, - computed: { - ...mapGetters({ - moduleConfig: 'edit/moduleConfig' - }), - // 当前题目所有编辑器是否创建完成 - createdAllCurrentEditQuestionEditor() { - return this.createdEditorCount === this.moduleConfig?.options?.length - } - }, - watch: { - // 监听当前编辑选项所有编辑器创建完成 - // 如果所有选项创建完成,则聚焦第一个选项 - createdAllCurrentEditQuestionEditor(bool) { - if (bool) { - this.editorList[0]?.focus() - } } } }