|
@@ -136,7 +136,14 @@
|
|
|
@blur="rightBlur"
|
|
|
>
|
|
|
<div
|
|
|
- v-if="activeRightMenuItem"
|
|
|
+ v-if="
|
|
|
+ activeRightMenuItem?.id ==
|
|
|
+ (store.isScoreBoardCollapsed
|
|
|
+ ? props.modal
|
|
|
+ ? ['bq', question.mainNumber, question.subNumber].join('-')
|
|
|
+ : ''
|
|
|
+ : ['bq', question.mainNumber, question.subNumber].join('-'))
|
|
|
+ "
|
|
|
class="tw-fixed right-menu-box"
|
|
|
:style="tmpStyle"
|
|
|
>
|
|
@@ -144,10 +151,14 @@
|
|
|
定位
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="!!question.questionName" @click="positioning(question)">
|
|
|
+ <div
|
|
|
+ v-if="!!question.questionName"
|
|
|
+ class="tihao"
|
|
|
+ @click="positioning(question)"
|
|
|
+ >
|
|
|
{{ question.questionName }}
|
|
|
</div>
|
|
|
- <div v-else @click="positioning(question)">
|
|
|
+ <div v-else class="tihao" @click="positioning(question)">
|
|
|
{{ question.title }} {{ question.mainNumber }}-{{
|
|
|
question.subNumber
|
|
|
}}
|
|
@@ -287,6 +298,17 @@ const tmpStyle = reactive<any>({
|
|
|
top: 0,
|
|
|
zIndex: 300,
|
|
|
});
|
|
|
+function getParentNode(el: any, c: string): any {
|
|
|
+ if (el.className?.includes(c)) {
|
|
|
+ return el;
|
|
|
+ } else {
|
|
|
+ if (el.parentNode) {
|
|
|
+ return getParentNode(el.parentNode, c);
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
const onRightClick = (e: any, index?: any) => {
|
|
|
e.preventDefault();
|
|
|
if (
|
|
@@ -295,7 +317,11 @@ const onRightClick = (e: any, index?: any) => {
|
|
|
) {
|
|
|
tmpStyle.left = e.clientX + "px";
|
|
|
tmpStyle.top = e.clientY + "px";
|
|
|
- activeRightMenuItem.value = e;
|
|
|
+ let parentNode = getParentNode(e.target, "question");
|
|
|
+ if (parentNode) {
|
|
|
+ activeRightMenuItem.value = parentNode;
|
|
|
+ }
|
|
|
+ console.log("activeRightMenuItem:", activeRightMenuItem.value);
|
|
|
}
|
|
|
};
|
|
|
const rightBlur = () => {
|
|
@@ -587,6 +613,11 @@ const buttonHeightForSelective = $computed(() =>
|
|
|
padding: 10px;
|
|
|
background-color: var(--app-container-bg-color);
|
|
|
position: relative;
|
|
|
+ .tihao {
|
|
|
+ &:hover {
|
|
|
+ // font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.current-question {
|