Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
381 views
in Technique[技术] by (71.8m points)

vue.js - Vuetify stop zoom out Website on small displays

I use Vuetify in my webapplication. The whole webapplication is responsive. I have the problem that on smaller screens (Smartphone, Pad) I can zoom out of the website which means that I have a white space on the right of my website.

I don't know how this can happen and it is in every single page of my web application like that. What can I do that I use from beginning the whole space and the user can not zoom out from the website and gets this white space on the left?

Below a short example:

<template>
  <v-app>
    <v-main>
      <v-container>
        <v-row justify="center" align="center">
          <v-col cols="12" xs="10" sm="10" md="10" lg="10" xl="10">
            TEST_COL
          </v-col>
        </v-row>
      </v-container>
    </v-main>
  </v-app>
</template>


<script>

  export default {
    data: () => ({  
    }),
  }

</script>

<style>
</style>

Maybe the problem is in the App.vue file but I don't see any problem there. To be sure I post the app.vue below:

<template>
  <v-app>
    <Navbar />
    <v-main>
      <router-view></router-view>
    </v-main>
    <Footer />
  </v-app>
</template>

I put two screenshots below so you see what i mean.

Thanks! Chris

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I got the answer. I used the <v-navigation-drawer> provided by Vuetify to create a drawer object. I used the following options:

<v-navigation-drawer v-model="drawer" absolute temporary right>

But absolute means it "Applies position: absolute to the component." which means that it takes extra space in the website. The option must be "fixed" instead of "absolute" then it works.

The good settings are:

<v-navigation-drawer v-model="drawer" fixed temporary right>

Now the drawer opens on the right side of the website (better for smartphones) and it doesn't take any absolute space!!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...