fix: 移除选项默认选中

This commit is contained in:
sudoooooo 2024-07-15 18:00:07 +08:00
parent 8740685a4d
commit 3227a799f9

View File

@ -14,7 +14,6 @@
<RichEditor
:modelValue="element.text"
@change="(value) => handleChange(index, value)"
@created="handleCreated"
/>
</div>
@ -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()
}
}
}
}