src/layouts/components/AppContent.vue
@@ -1,5 +1,28 @@ <template> <div> <router-view /> <div @click="foldFun" style="height: 100%;"> <keep-alive :include="keepAliveList"> <router-view /> </keep-alive> </div> </template> <script> import { mapState } from 'vuex' export default { name: 'AppContent', data() { return { } }, computed: { ...mapState(['keepAliveList']) }, methods: { foldFun() { if (window.innerWidth < 1000) { this.$store.commit('SET_ISFOLD', true) } } } } </script>