Vuejs2 覆盖项不可访问

Vuejs2 覆盖项不可访问,vuejs2,Vuejs2,我正在创建一个全屏导航 单击按钮即可打开此导航。问题是无法访问liand close按钮。我无法点击它们 Html 沙文 <script> import { mapGetters } from "vuex" export default { computed: mapGetters({ isLoggedIn: 'CheckAuth', items: 'GetItems' }), data() { return { clipped: true,

我正在创建一个全屏导航

单击按钮即可打开此导航。问题是无法访问liand close按钮。我无法点击它们

Html

沙文

<script>
import { mapGetters } from "vuex"
export default {
  computed: mapGetters({ isLoggedIn: 'CheckAuth', items: 'GetItems' }),
  data() {
    return {
      clipped: true,
      drawer: true,
      fixed: false,
      miniVariant: true,
      right: true,
      rightDrawer: false,
      title: 'Vuetify.js'
    }
  },
  methods: {
    Login() {
      this.$store.dispatch('ChangeAuth');
    },
    OpenDialog() {
      document.getElementById("myNav").style.width = "100%";
    },
    CloseDialog() {
      document.getElementById("myNav").style.width = "0%";
    }

  }
}
</script>

这是一个纯粹的CSS问题。您可以在伪元素之后添加:并使用它创建背景。或者可以使用指针事件:无;
覆盖元素上的CSS属性。

将相关JavaScript代码添加到问题中请检查我现在已添加Js代码我正在使用VuetifyJs CSS frameworkVuex用于状态管理,您仍然需要为对象添加正常的Vuejs代码,而不是在Vuex中,例如v-on:ClickThank,谢谢您的帮助。但并没有解决我的问题:我可以在codepen或JSFIDLE上看到你的应用程序吗。这很容易修复,但严格取决于您的代码结构。谢谢@El Damielo,但我现在已经完全更改了我的代码
.overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 4;
    top: 0;
    left: 0;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0, 0.9);
    overflow-x: hidden;
    transition: 0.5s;
}

.overlay-content {
  z-index :99;
    position: relative;
    top: 25%;
    width: 100%;
    text-align: center;
    margin-top: 30px;
}

.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 36px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.overlay a:hover, .overlay a:focus {
    color: #f1f1f1;
}

.overlay .closebtn {
    position: absolute;
    top: 40px;
    right: 55px;
    font-size: 80px;
    cursor :pointer
}

@media screen and (max-height: 450px) {
  .overlay a {font-size: 20px}
  .overlay .closebtn {
    font-size: 40px;
    top: 15px;
    right: 35px;
  }
}
<script>
import { mapGetters } from "vuex"
export default {
  computed: mapGetters({ isLoggedIn: 'CheckAuth', items: 'GetItems' }),
  data() {
    return {
      clipped: true,
      drawer: true,
      fixed: false,
      miniVariant: true,
      right: true,
      rightDrawer: false,
      title: 'Vuetify.js'
    }
  },
  methods: {
    Login() {
      this.$store.dispatch('ChangeAuth');
    },
    OpenDialog() {
      document.getElementById("myNav").style.width = "100%";
    },
    CloseDialog() {
      document.getElementById("myNav").style.width = "0%";
    }

  }
}
</script>