|
@@ -52,10 +52,10 @@ export const PractiseDriver = defineComponent({
|
|
|
// 初始化部分引导位置
|
|
|
const driverInitialPosition = (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
|
options.config.stageRadius = 5;
|
|
|
- options.config.stagePadding = 4;
|
|
|
+ options.config.stagePadding = 8;
|
|
|
try {
|
|
|
const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
- popover.wrapper.style.marginLeft = -(rect?.width || 0) / 2 + 4 + "px";
|
|
|
+ popover.wrapper.style.marginLeft = (rect?.width || 0) / 2 + 4 + "px";
|
|
|
} catch {}
|
|
|
};
|
|
|
|
|
@@ -71,9 +71,9 @@ export const PractiseDriver = defineComponent({
|
|
|
}
|
|
|
|
|
|
// 显示指法
|
|
|
- // if (!state.setting.displayFingering) {
|
|
|
- // length -= 1;
|
|
|
- // }
|
|
|
+ if (!state.setting.displayFingering) {
|
|
|
+ length -= 1;
|
|
|
+ }
|
|
|
|
|
|
// 声部
|
|
|
if (!props.statusAll.subjectStatus) {
|
|
@@ -85,7 +85,7 @@ export const PractiseDriver = defineComponent({
|
|
|
|
|
|
// pc端不显示标题和模式切换引导
|
|
|
if (state.platform === IPlatform.PC) {
|
|
|
- // length -= 2;
|
|
|
+ length -= 2;
|
|
|
} else {
|
|
|
// 判断是否有标题
|
|
|
if (!props.statusAll.backTitle || props.statusAll.titleType === "NONE") {
|
|
@@ -96,9 +96,6 @@ export const PractiseDriver = defineComponent({
|
|
|
length -= 1;
|
|
|
}
|
|
|
}
|
|
|
- if (!props.statusAll.showSwitchList) {
|
|
|
- length -= 1;
|
|
|
- }
|
|
|
console.log(props.statusAll, "statusAll", length, state.setting.displayFingering);
|
|
|
|
|
|
let options: Config = {
|
|
@@ -137,24 +134,6 @@ export const PractiseDriver = defineComponent({
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- if (props.statusAll.modelTypeStatus) {
|
|
|
- options.steps?.push({
|
|
|
- element: ".driver-9",
|
|
|
- popover: {
|
|
|
- title: "",
|
|
|
- description: "",
|
|
|
- popoverClass: "popoverClass popoverClass9",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
- nextBtnText: `下一步 (2/${length})`,
|
|
|
- showButtons: ["next"],
|
|
|
- onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
|
- driverInitialPosition(popover, options);
|
|
|
- },
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
if (props.statusAll.playType) {
|
|
|
options.steps?.push({
|
|
|
element: ".driver-2",
|
|
@@ -180,8 +159,8 @@ export const PractiseDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: props.statusAll.originPlayType ? "popoverClass popoverClass3" : "popoverClass popoverClass11",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${options.steps.length + 1}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -197,8 +176,8 @@ export const PractiseDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass4",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${options.steps.length + 1}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -212,8 +191,8 @@ export const PractiseDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass5",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${options.steps.length + 2}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -222,6 +201,7 @@ export const PractiseDriver = defineComponent({
|
|
|
},
|
|
|
}
|
|
|
);
|
|
|
+
|
|
|
if (props.statusAll.subjectStatus) {
|
|
|
options.steps?.push({
|
|
|
element: ".driver-10",
|
|
@@ -229,8 +209,8 @@ export const PractiseDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass10",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${options.steps.length + 1}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -238,15 +218,16 @@ export const PractiseDriver = defineComponent({
|
|
|
},
|
|
|
},
|
|
|
});
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
options.steps?.push({
|
|
|
element: ".driver-5-1",
|
|
|
popover: {
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass5-1",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${options.steps.length + 1}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -261,9 +242,9 @@ export const PractiseDriver = defineComponent({
|
|
|
popover: {
|
|
|
title: "",
|
|
|
description: "",
|
|
|
- popoverClass: "popoverClass popoverClass6-end popoverClose",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ popoverClass: "popoverClass popoverClass6 popoverClose",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
prevBtnText: "再看一遍",
|
|
|
doneBtnText: "完成",
|
|
|
showButtons: ["next", "previous"],
|
|
@@ -310,8 +291,8 @@ export const PractiseDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass6",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${options.steps.length + 1}/${length})`, //"下一步6/" + length,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -326,8 +307,8 @@ export const PractiseDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass6",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${options.steps.length + 1}/${length})`, //"下一步6/" + length,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -348,34 +329,17 @@ export const PractiseDriver = defineComponent({
|
|
|
doneBtnText: "完成",
|
|
|
showButtons: ["next", "previous"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
|
- driverInitialPosition(popover, options);
|
|
|
- const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
- popover.wrapper.style.marginLeft = (rect?.width || 0) / 2 + "px";
|
|
|
- },
|
|
|
- onPrevClick: () => {
|
|
|
- driverObj.drive(0);
|
|
|
- },
|
|
|
- onNextClick: () => {
|
|
|
- onDriverClose();
|
|
|
- },
|
|
|
- },
|
|
|
- });
|
|
|
- } else if (!props.statusAll.showSwitchList) {
|
|
|
- options.steps?.push({
|
|
|
- element: ".driver-6",
|
|
|
- popover: {
|
|
|
- title: "",
|
|
|
- description: "",
|
|
|
- popoverClass: "popoverClass popoverClass6-end popoverClose",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
- prevBtnText: "再看一遍",
|
|
|
- doneBtnText: "完成",
|
|
|
- showButtons: ["next", "previous"],
|
|
|
- onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
|
- driverInitialPosition(popover, options);
|
|
|
- // const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
- // popover.wrapper.style.marginLeft = -(rect?.width || 0) / 2 + 4 + "px";
|
|
|
+ if (props.statusAll.titleType === "TEXT") {
|
|
|
+ options.config.stageRadius = 5;
|
|
|
+ options.config.stagePadding = 5;
|
|
|
+ } else {
|
|
|
+ options.config.stageRadius = 1000;
|
|
|
+ options.config.stagePadding = 0;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
+ popover.wrapper.style.marginLeft = (rect?.width || 0) / 2 - 4 + "px";
|
|
|
+ } catch {}
|
|
|
},
|
|
|
onPrevClick: () => {
|
|
|
driverObj.drive(0);
|
|
@@ -392,8 +356,8 @@ export const PractiseDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass6",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${options.steps.length + 1}/${length})`, //"下一步6/" + length,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -411,27 +375,55 @@ export const PractiseDriver = defineComponent({
|
|
|
popover: {
|
|
|
title: "",
|
|
|
description: "",
|
|
|
- popoverClass: "popoverClass popoverClass8 popoverClose",
|
|
|
+ popoverClass: "popoverClass popoverClass8",
|
|
|
align: "start",
|
|
|
side: "bottom",
|
|
|
- prevBtnText: "再看一遍",
|
|
|
- doneBtnText: "完成",
|
|
|
- showButtons: ["next", "previous"],
|
|
|
+ nextBtnText: `下一步 (${options.steps.length + 1}/${length})`,
|
|
|
+ showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
|
- driverInitialPosition(popover, options);
|
|
|
- const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
- popover.wrapper.style.marginLeft = (rect?.width || 0) / 2 + "px";
|
|
|
- },
|
|
|
- onPrevClick: () => {
|
|
|
- driverObj.drive(0);
|
|
|
- },
|
|
|
- onNextClick: () => {
|
|
|
- onDriverClose();
|
|
|
+ if (props.statusAll.titleType === "TEXT") {
|
|
|
+ options.config.stageRadius = 5;
|
|
|
+ options.config.stagePadding = 5;
|
|
|
+ } else {
|
|
|
+ options.config.stageRadius = 1000;
|
|
|
+ options.config.stagePadding = 0;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
+ popover.wrapper.style.marginLeft = (rect?.width || 0) / 2 - 4 + "px";
|
|
|
+ } catch {}
|
|
|
},
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ options.steps?.push({
|
|
|
+ element: ".driver-9",
|
|
|
+ popover: {
|
|
|
+ title: "",
|
|
|
+ description: "",
|
|
|
+ popoverClass: "popoverClass popoverClass9 popoverClose",
|
|
|
+ align: "end",
|
|
|
+ side: "bottom",
|
|
|
+ prevBtnText: "再看一遍",
|
|
|
+ doneBtnText: "完成",
|
|
|
+ showButtons: ["next", "previous"],
|
|
|
+ onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
|
+ options.config.stageRadius = 1000;
|
|
|
+ options.config.stagePadding = 0;
|
|
|
+ try {
|
|
|
+ const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
+ popover.wrapper.style.marginLeft = -((rect?.width || 0) / 2 - 8) + "px";
|
|
|
+ } catch {}
|
|
|
+ },
|
|
|
+ onPrevClick: () => {
|
|
|
+ driverObj.drive(0);
|
|
|
+ },
|
|
|
+ onNextClick: () => {
|
|
|
+ onDriverClose();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -528,15 +520,15 @@ export const FollowDriver = defineComponent({
|
|
|
// 初始化部分引导位置
|
|
|
const driverInitialPosition = (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
|
options.config.stageRadius = 5;
|
|
|
- options.config.stagePadding = 4;
|
|
|
+ options.config.stagePadding = 8;
|
|
|
try {
|
|
|
const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
- popover.wrapper.style.marginLeft = -(rect?.width || 0) / 2 + 4 + "px";
|
|
|
+ popover.wrapper.style.marginLeft = (rect?.width || 0) / 2 + 4 + "px";
|
|
|
} catch {}
|
|
|
};
|
|
|
|
|
|
// 声部
|
|
|
- let length = props.statusAll.subjectStatus ? 5 : 4;
|
|
|
+ let length = props.statusAll.subjectStatus ? 4 : 3;
|
|
|
const driverOptions: Config = {
|
|
|
showProgress: false,
|
|
|
allowClose: false,
|
|
@@ -574,8 +566,8 @@ export const FollowDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClassF2",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (2/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -593,8 +585,8 @@ export const FollowDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass10",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${driverOptions.steps.length + 1}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -610,8 +602,8 @@ export const FollowDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass5-1",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${driverOptions.steps.length + 1}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -626,8 +618,8 @@ export const FollowDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClassF3 popoverClose",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
prevBtnText: "再看一遍",
|
|
|
doneBtnText: "完成",
|
|
|
showButtons: ["next", "previous"],
|
|
@@ -733,15 +725,15 @@ export const EvaluatingDriver = defineComponent({
|
|
|
// 初始化部分引导位置
|
|
|
const driverInitialPosition = (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
|
options.config.stageRadius = 5;
|
|
|
- options.config.stagePadding = 4;
|
|
|
+ options.config.stagePadding = 8;
|
|
|
try {
|
|
|
const rect = options.state.activeElement?.getBoundingClientRect();
|
|
|
- popover.wrapper.style.marginLeft = -(rect?.width || 0) / 2 + 4 + "px";
|
|
|
+ popover.wrapper.style.marginLeft = (rect?.width || 0) / 2 + 4 + "px";
|
|
|
} catch {}
|
|
|
};
|
|
|
|
|
|
// 声部
|
|
|
- let length = props.statusAll.subjectStatus ? 6 : 5;
|
|
|
+ let length = props.statusAll.subjectStatus ? 5 : 4;
|
|
|
|
|
|
const driverOptions: Config = {
|
|
|
showProgress: false,
|
|
@@ -780,8 +772,8 @@ export const EvaluatingDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClassE2",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (2/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -795,8 +787,8 @@ export const EvaluatingDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClassE3",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (3/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -814,8 +806,8 @@ export const EvaluatingDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass10",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${driverOptions.steps.length + 1}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -831,8 +823,8 @@ export const EvaluatingDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClass5-1",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
nextBtnText: `下一步 (${driverOptions.steps.length + 1}/${length})`,
|
|
|
showButtons: ["next"],
|
|
|
onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
|
|
@@ -847,8 +839,8 @@ export const EvaluatingDriver = defineComponent({
|
|
|
title: "",
|
|
|
description: "",
|
|
|
popoverClass: "popoverClass popoverClassE4 popoverClose",
|
|
|
- align: "end",
|
|
|
- side: "bottom",
|
|
|
+ align: "start",
|
|
|
+ side: "top",
|
|
|
prevBtnText: "再看一遍",
|
|
|
doneBtnText: "完成",
|
|
|
showButtons: ["next", "previous"],
|