TIANYONG преди 6 месеца
родител
ревизия
2bdc22e69d

+ 9 - 0
src/page-instrument/header-top/index.module.less

@@ -11,6 +11,15 @@
         justify-content: flex-end;
     }
 }
+.headerMid {
+    background: transparent;
+    width: 40%;
+    height: 100%;
+    position: absolute;
+    left: 50%;
+    bottom: 0;
+    transform: translateX(-40%);
+}
 .modeWarn{
     position: fixed;
     left: 30px;

+ 11 - 0
src/page-instrument/header-top/index.tsx

@@ -32,6 +32,7 @@ import ModeView from "./modeView";
 import { smoothAnimationState } from "../view-detail/smoothAnimation";
 import { isMusicList, musicListShow } from "../component/the-music-list";
 import { EvaluatingDriver, FollowDriver, PractiseDriver } from "../custom-plugins/guide-driver";
+import { fingerRef } from "/src/page-instrument/view-detail/index"
 
 /** 头部数据和方法 */
 export const headTopData = reactive({
@@ -415,6 +416,8 @@ export default defineComponent({
     });
     /** 模式切换按钮 */
     const toggleBtn = computed(() => {
+      // 老师端,打击乐&节奏练习不显示
+      if (state.isPercussion && state.platform === IPlatform.PC) return { display: false, disabled: false };
       if(state.isCombineRender) return { display: false, disabled: false };
       // 没有音源不显示
       if(state.noMusicSource) return { display: false, disabled: false };
@@ -874,6 +877,14 @@ export default defineComponent({
           </div>
         </div>
 
+        {/** 指法点击区域 */} 
+        {
+          state.fingeringInfo.direction === "transverse" && state.setting.displayFingering ? 
+          <div class={styles.headerMid} onClick={() => {
+            fingerRef.value?.doubeClick()
+          }}></div>  : null
+        }
+
         {/* 播放按钮 */}
         <div
           id="studnetT-7"

+ 5 - 1
src/page-instrument/header-top/settting/index.tsx

@@ -145,16 +145,20 @@ export default defineComponent({
                                 <div class={[styles.cellBox, state.setting.camera && styles.isCamera]}>
                                     <div class={styles.tit}>摄像头</div>
                                     <Switch 
-                                        v-model={state.setting.camera}
+                                        // v-model={state.setting.camera}
+                                        modelValue={state.setting.camera}
                                         onChange={ async (value) => {
                                             if (value) {
                                                 const res = await api_openCamera();
                                                 // 没有授权
                                                 if (res?.content?.reson) {
                                                     state.setting.camera = false
+                                                } else {
+                                                    state.setting.camera = true
                                                 }
                                             } else {
                                                 api_closeCamera();
+                                                state.setting.camera = false;
                                             }
                                         }}                                
                                     ></Switch>

+ 2 - 0
src/page-instrument/view-detail/index.tsx

@@ -85,6 +85,7 @@ const setNoteHalfTone = (list: any[]) => {
 };
 
 export const musicScoreRef = ref();
+export const fingerRef = ref();
 
 export const headerColumnHide = ref(false); // 是否隐藏功能按钮,播放时自动隐藏
 
@@ -541,6 +542,7 @@ export default defineComponent({
           {state.setting.displayFingering && state.fingeringInfo?.name && !state.isPreView && state.isShowFingering && (
             <div style={{ ...fingerConfig.value.fingerBox }} class={styles.fingeringCon}>
               <Fingering
+                ref={fingerRef}
                 style={{
                   background: state.setting.camera ? `rgba(${state.setting.eyeProtection ? "253,244,229" : "255,255,255"} ,${state.setting.cameraOpacity / 100})` : "",
                 }}

+ 10 - 2
src/view/fingering/index.module.less

@@ -5,9 +5,17 @@
   justify-content: space-evenly;
   align-items: center;
   padding: 0 10px 4px 10px;
-  overflow: hidden;
+  position: relative;
+}
+.emptyDom {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  background: transparent;
+  z-index: 999;
 }
-
 .vertical {
   position: relative;
   padding: 10px 0 10px 0;

+ 4 - 1
src/view/fingering/index.tsx

@@ -8,7 +8,7 @@ import { followData } from "/src/view/follow-practice/index"
 export default defineComponent({
   name: "fingering",
   emits: ["open"],
-  setup(props, { emit }) {
+  setup(props, { emit, expose }) {
     const fingerData = reactive({
       relationshipIndex: 0,
       subject: null as unknown as ITypeFingering,
@@ -47,6 +47,9 @@ export default defineComponent({
       }
       fingerData.delay = nowTime;
     };
+    expose({
+      doubeClick
+    })
     return () => {
       // console.log("音高", realKey.value);
       const relationship = fingerData.subject?.relationship?.[realKey.value] || [];

+ 1 - 1
src/view/selection/index.module.less

@@ -161,7 +161,7 @@
 .followTipUp, .followTipDown {
     display: flex;
     align-items: center;
-    background: rgba(0,0,0,0.7);
+    background: rgba(0,0,0,0.75);
     position: relative;
     padding: 6px 10px;
     border-radius: 16px;