|
@@ -1,12 +1,16 @@
|
|
|
-import { defineComponent, reactive, ref, watch } from "vue";
|
|
|
+import { defineComponent, reactive, ref, watch, toRef } from "vue";
|
|
|
import { headImg } from "../image";
|
|
|
import { useClickAway } from "@vant/use";
|
|
|
import { headData } from "..";
|
|
|
import styles from "./index.module.less";
|
|
|
-import state from "/src/state";
|
|
|
+import state, { IPlatform } from "/src/state";
|
|
|
import { Popup } from "@varlet/ui";
|
|
|
import TheComfirm from "../../component/the-comfirm";
|
|
|
import { musicRenderTypeKey, resetRenderMusicScore } from "/src/view/music-score";
|
|
|
+import useDrag from "/src/view/plugins/useDrag/index";
|
|
|
+import Dragbom from "/src/view/plugins/useDrag/dragbom";
|
|
|
+import { storeData } from "/src/store";
|
|
|
+
|
|
|
export default defineComponent({
|
|
|
name: "musicType",
|
|
|
setup(props) {
|
|
@@ -37,6 +41,21 @@ export default defineComponent({
|
|
|
}
|
|
|
musicTypeData.show = false
|
|
|
}
|
|
|
+
|
|
|
+ const parentClassName = "settingBoxClass_drag";
|
|
|
+ const userId = storeData.user?.id ? String(storeData.user?.id) : '';
|
|
|
+ const positionInfo = state.platform !== IPlatform.PC ? {
|
|
|
+ styleDrag: { value: null }
|
|
|
+ } : useDrag(
|
|
|
+ [
|
|
|
+ `${parentClassName} .top_drag`,
|
|
|
+ `${parentClassName} .bom_drag`
|
|
|
+ ],
|
|
|
+ parentClassName,
|
|
|
+ toRef(musicTypeData, 'show'),
|
|
|
+ userId
|
|
|
+ )
|
|
|
+
|
|
|
return () => (
|
|
|
<>
|
|
|
<div ref={musicTypeRef}>
|
|
@@ -55,6 +74,7 @@ export default defineComponent({
|
|
|
</div>
|
|
|
<Popup teleport="body" closeOnClickOverlay={false} defaultStyle={false} v-model:show={musicTypeData.show}>
|
|
|
<TheComfirm tip="设置成功,是否立即重新加载?" onClose={handleResult} />
|
|
|
+ { state.platform === IPlatform.PC && <Dragbom showGuide={headData.showGragGuide} onGuideDone={handleGuide} /> }
|
|
|
</Popup>
|
|
|
</>
|
|
|
);
|