Bläddra i källkod

Небольшие улучшения UI

Book Pauk 2 år sedan
förälder
incheckning
07f5146534
1 ändrade filer med 12 tillägg och 5 borttagningar
  1. 12 5
      client/components/Reader/SearchPage/SearchPage.vue

+ 12 - 5
client/components/Reader/SearchPage/SearchPage.vue

@@ -20,10 +20,10 @@
             </div>
             </div>
             <q-btn-group v-show="!initStep" class="button-group row no-wrap">
             <q-btn-group v-show="!initStep" class="button-group row no-wrap">
                 <q-btn class="button" dense stretch @click="showNext">
                 <q-btn class="button" dense stretch @click="showNext">
-                    <q-icon style="top: -6px" name="la la-angle-down" dense size="22px" />
+                    <q-icon style="top: -2px" name="la la-angle-down" dense size="22px" />
                 </q-btn>
                 </q-btn>
                 <q-btn class="button" dense stretch @click="showPrev">
                 <q-btn class="button" dense stretch @click="showPrev">
-                    <q-icon style="top: -4px" class="icon" name="la la-angle-up" dense size="22px" />
+                    <q-icon name="la la-angle-up" dense size="22px" />
                 </q-btn>
                 </q-btn>
             </q-btn-group>
             </q-btn-group>
         </div>
         </div>
@@ -108,10 +108,15 @@ class SearchPage {
 
 
         this.header = 'Поиск в тексте';
         this.header = 'Поиск в тексте';
         await this.$nextTick();
         await this.$nextTick();
-        this.$refs.input.focus();
+        this.focusInput();
         this.$refs.input.select();
         this.$refs.input.select();
     }
     }
 
 
+    focusInput() {
+        if (!this.$root.isMobileDevice)
+            this.$refs.input.focus();
+    }
+
     get foundText() {
     get foundText() {
         if (this.foundList.length && this.foundCur >= 0)
         if (this.foundList.length && this.foundCur >= 0)
             return `${this.foundCur + 1}/${this.foundList.length}`;
             return `${this.foundCur + 1}/${this.foundList.length}`;
@@ -149,7 +154,8 @@ class SearchPage {
         } else {
         } else {
             this.$emit('stop-text-search');
             this.$emit('stop-text-search');
         }
         }
-        this.$refs.input.focus();
+
+        this.focusInput();
     }
     }
 
 
     showPrev() {
     showPrev() {
@@ -165,7 +171,8 @@ class SearchPage {
         } else {
         } else {
             this.$emit('stop-text-search');
             this.$emit('stop-text-search');
         }
         }
-        this.$refs.input.focus();
+
+        this.focusInput();
     }
     }
 
 
     close() {
     close() {