浏览代码

ipad 兼容跟练大小

黄琪勇 11 月之前
父节点
当前提交
b4405734ac
共有 2 个文件被更改,包括 9 次插入1 次删除
  1. 5 1
      src/view/selection/index.module.less
  2. 4 0
      src/view/selection/index.tsx

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

@@ -212,7 +212,11 @@
         height: 38px;
     }
 }
-
+.isPad{
+    .followTipUp, .followTipDown {
+        transform: translate(-50%) scale(0.7);
+    }
+}
 .followTipUp {
     i {
         font-style: normal;

+ 4 - 0
src/view/selection/index.tsx

@@ -11,6 +11,7 @@ import { getQuery } from "/src/utils/queryString";
 import IntonationDown from "./imgs/pitchLow.png"
 import IntonationUp from "./imgs/pitchHigh.png"
 import MultipleRestMeasures from "./multipleRestMeasures"
+import { browser } from "../../utils";
 
 const selectData = reactive({
 	notes: [] as any[],
@@ -207,6 +208,8 @@ export const recalculateNoteData = () => {
 export default defineComponent({
 	name: "selection",
 	setup() {
+		const browsInfo = browser();
+		const isPad =  navigator?.userAgent?.includes("UAWEIVRD-W09") || browsInfo?.iPad || browsInfo.isTablet;
 		const route = useRoute();
 		const query: any = {
 			...getQuery(),
@@ -282,6 +285,7 @@ export default defineComponent({
 					id="selectionBox"
 					class={[
 						styles.selectionContainer,
+						isPad && styles.isPad
 					]}
 					onClick={(e: Event) => e.stopPropagation()}
 				>