fix: 连续添加题目频繁触发事件导致页面卡顿
This commit is contained in:
parent
fd7cc2ea96
commit
b233023bb3
@ -19,11 +19,14 @@
|
||||
class="qtopic-item"
|
||||
:id="'qtopic' + element.type"
|
||||
@click="onQuestionType({ type: element.type })"
|
||||
>
|
||||
<i
|
||||
class="iconfont"
|
||||
:class="['icon-' + element.icon]"
|
||||
@mouseenter="showPreview(element, 'qtopic' + element.type)"
|
||||
@mouseleave="isShowPreviewImage = false"
|
||||
@mousedown="isShowPreviewImage = false"
|
||||
>
|
||||
<i class="iconfont" :class="['icon-' + element.icon]"></i>
|
||||
></i>
|
||||
<p class="text">{{ element.title }}</p>
|
||||
</div>
|
||||
</template>
|
||||
@ -61,7 +64,6 @@ questionLoader.init({
|
||||
typeList: questionTypeList.map((item) => item.type)
|
||||
})
|
||||
|
||||
|
||||
const onQuestionType = ({ type }) => {
|
||||
const newQuestion = createNewQuestion({ type })
|
||||
addQuestion({ question: newQuestion, index: newQuestionIndex.value })
|
||||
|
Loading…
Reference in New Issue
Block a user