|
@@ -1,4 +1,4 @@
|
|
|
-import { PropType, computed, defineComponent, nextTick, onBeforeMount, onMounted, onUnmounted, reactive, ref } from "vue";
|
|
|
+import { PropType, computed, defineComponent, nextTick, onBeforeMount, onMounted, onUnmounted, reactive, ref,toRef } from "vue";
|
|
|
import styles from "./index.module.less";
|
|
|
import icons from "./image/icons.json";
|
|
|
import { FIGNER_INSTRUMENT_DATA, FIGNER_INSTRUMENT_REALKEY, IFIGNER_INSTRUMENT_Note } from "/src/view/figner-preview";
|
|
@@ -18,6 +18,8 @@ import state, { IPlatform } from "/src/state";
|
|
|
import { api_musicalInstrumentList, api_subjectList, getSubjectList } from "../api";
|
|
|
import ChangeSubject from "./change-subject";
|
|
|
import { Tabs,Tab } from "vant"
|
|
|
+import useDrag from '/src/hooks/useDrag';
|
|
|
+import Dragbom from '/src/hooks/useDrag/dragbom';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "viewFigner",
|
|
@@ -994,6 +996,18 @@ export default defineComponent({
|
|
|
value:"2"
|
|
|
}
|
|
|
]
|
|
|
+ // 切换乐器弹窗
|
|
|
+ let changeSubjectShowBoxDragData: any;
|
|
|
+ let changeSubjectShowBoxClass: string;
|
|
|
+ if (query.platform==="pc") {
|
|
|
+ changeSubjectShowBoxClass = 'changeSubjectShowBoxClass_drag';
|
|
|
+ changeSubjectShowBoxDragData = useDrag(
|
|
|
+ [`${changeSubjectShowBoxClass} .dragTopBox`, `${changeSubjectShowBoxClass} .dragbomBox`],
|
|
|
+ changeSubjectShowBoxClass,
|
|
|
+ toRef(data, 'changeSubjectShow'),
|
|
|
+ storeData.user.id as string
|
|
|
+ );
|
|
|
+ }
|
|
|
return () => {
|
|
|
const relationship = fingerData.subject?.relationship?.[data.realKey] || [];
|
|
|
const rs: number[] = Array.isArray(relationship[1]) ? relationship[fingerData.relationshipIndex] : relationship;
|
|
@@ -1696,8 +1710,11 @@ export default defineComponent({
|
|
|
</Popup>
|
|
|
|
|
|
<Popup
|
|
|
+ style={
|
|
|
+ query.platform==="pc" ? changeSubjectShowBoxDragData.styleDrag.value : {}
|
|
|
+ }
|
|
|
v-model:show={data.changeSubjectShow}
|
|
|
- class={styles.changeSubjectPopup}
|
|
|
+ class={[styles.changeSubjectPopup,changeSubjectShowBoxClass]}
|
|
|
onClick={(e: any) => {
|
|
|
e.stopPropagation();
|
|
|
}}
|
|
@@ -1735,6 +1752,12 @@ export default defineComponent({
|
|
|
}, 100);
|
|
|
}}
|
|
|
/>
|
|
|
+ {query.platform==="pc" && <>
|
|
|
+ <div class={[styles.dragTopBox,"dragTopBox"]}></div>
|
|
|
+ <div class={[styles.dragbomBox,"dragbomBox"]}>
|
|
|
+ <Dragbom></Dragbom>
|
|
|
+ </div>
|
|
|
+ </>}
|
|
|
</Popup>
|
|
|
|
|
|
{props.show && !data.loading && !data.loadingSoundFonts && <GuideIndex fingeringMode={data.fingeringMode} showGuide={false} list={["finger"]} />}
|