@pocketprep/ui-kit 3.4.15 → 3.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -822,8 +822,11 @@ export default class Question extends Vue {
|
|
|
822
822
|
&& this.swipeStart.x !== null
|
|
823
823
|
&& Math.abs(swipeEnd.x - this.swipeStart.x) > 80
|
|
824
824
|
) {
|
|
825
|
-
const
|
|
826
|
-
|
|
825
|
+
const choicesContainerComp = this.$refs[
|
|
826
|
+
'uikit-question__choices-container'
|
|
827
|
+
] as ComponentPublicInstance | undefined
|
|
828
|
+
const choiceEls = choicesContainerComp?.$refs.choices as HTMLElement[] | undefined
|
|
829
|
+
const parent = choiceEls?.find(choiceEl => choiceEl.contains(targetEl))
|
|
827
830
|
const finalElement = document.elementFromPoint(swipeEnd.x, swipeEnd.y)
|
|
828
831
|
if (parent?.contains(finalElement)) {
|
|
829
832
|
this.clickChoiceStrike(choiceKey)
|
|
@@ -1119,6 +1122,11 @@ export default class Question extends Vue {
|
|
|
1119
1122
|
} as Study.Cloud.IQuizAnswer)
|
|
1120
1123
|
}
|
|
1121
1124
|
|
|
1125
|
+
@Watch('showExplanation')
|
|
1126
|
+
showExplanationChanged () {
|
|
1127
|
+
this.emitUpdateShowExplanation()
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1122
1130
|
@Emit('close')
|
|
1123
1131
|
emitClose () {
|
|
1124
1132
|
return true
|
|
@@ -1148,6 +1156,11 @@ export default class Question extends Vue {
|
|
|
1148
1156
|
emitCheckAnswer (answer: Study.Cloud.IQuizAnswer) {
|
|
1149
1157
|
return answer
|
|
1150
1158
|
}
|
|
1159
|
+
|
|
1160
|
+
@Emit('update:showExplanation')
|
|
1161
|
+
emitUpdateShowExplanation () {
|
|
1162
|
+
return this.showExplanation
|
|
1163
|
+
}
|
|
1151
1164
|
}
|
|
1152
1165
|
</script>
|
|
1153
1166
|
|