liushengqiang 1 سال پیش
والد
کامیت
b215e2722e
3فایلهای تغییر یافته به همراه22 افزوده شده و 10 حذف شده
  1. 3 0
      src/page-instrument/view-figner/index.module.less
  2. 14 5
      src/page-instrument/view-figner/index.tsx
  3. 5 5
      vite.config.ts

+ 3 - 0
src/page-instrument/view-figner/index.module.less

@@ -268,6 +268,9 @@
     align-items: flex-start;
     height: 65px;
     flex-shrink: 0;
+    &.paddingLeft{
+        padding-left: 20Px;
+    }
 
     .noteContent {
         position: relative;

+ 14 - 5
src/page-instrument/view-figner/index.tsx

@@ -78,7 +78,8 @@ export default defineComponent({
 			loadingSoundProgress: 0,
 
 			huaweiPad: navigator?.userAgent?.includes("UAWEIVRD-W09") ? true : false,
-			paddingTop: ''
+			paddingTop: '',
+			paddingLeft:''
 		});
 		const fingerData = reactive({
 			relationshipIndex: 0,
@@ -86,19 +87,27 @@ export default defineComponent({
 			fingeringInfo: subjectFingering(data.subject),
 		});
 
-		const getAPPData = async () => {
+		const getAPPData = async (type: 'top' | 'left') => {
 			const screenData = await isSpecialShapedScreen();
 			if (screenData?.content) {
 				// console.log("🚀 ~ screenData:", screenData.content);
 				const { isSpecialShapedScreen, notchHeight } = screenData.content;
 				if (isSpecialShapedScreen) {
-					data.paddingTop = 25 + "px";
+					if (type === 'top'){
+						data.paddingTop = 25 + "px";
+					}
+					if(type === 'left'){
+						data.paddingLeft = 25 + "px";
+					}
 				}
 			}
 		};
 
 		if (!props.isComponent && !browsInfo.ios && fingerData.fingeringInfo.orientation === 1) {
-			getAPPData();
+			getAPPData('top');
+		}
+		if (!props.isComponent && !browsInfo.ios && fingerData.fingeringInfo.orientation === 0) {
+			getAPPData('left');
 		}
 
 		const getNotes = () => {
@@ -391,7 +400,7 @@ export default defineComponent({
 									</div>
 								</div>
 							</div>
-							<div class={styles.notes}>
+							<div class={[styles.notes, data.paddingLeft && styles.paddingLeft]}>
 								<Button class={styles.noteBtn} onClick={() => scrollNoteBox("left")}>
 									<Icon name="arrow-left" />
 								</Button>

+ 5 - 5
vite.config.ts

@@ -11,11 +11,11 @@ export default defineConfig({
 	resolve: {},
 	plugins: [
 		// mkcert(), // 本地https
-		// legacy({
-		// 	targets: ['Chrome 63'],
-		// 	additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
-		// 	modernPolyfills: true
-		//   }),
+		legacy({
+			targets: ['Chrome 63'],
+			additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
+			modernPolyfills: true
+		  }),
 		vue(),
 		vueJsx(),
 	],