App.vue 1.43 KB
<!--
 * @Author: 前端 qianduan01@didihu.com.cn
 * @Date: 2023-06-08 10:20:23
 * @LastEditors: 前端 qianduan01@didihu.com.cn
 * @LastEditTime: 2024-03-04 11:16:55
 * @FilePath: \dj-scrm-wx-work-attachment-psd\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div id="app">
    <template>
      <transition name="fade">
        <keep-alive v-if="$route.meta.keepAlive">
          <router-view></router-view>
        </keep-alive>
      </transition>
      <transition name="fade">
        <router-view v-if="!$route.meta.keepAlive"></router-view>
      </transition>
      <template v-if="$route.meta.isTab && entry != 'normal'">
        <tab-bar :data="tabList"></tab-bar>
      </template>
    </template>
  </div>
</template>
<script>
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
export default {
  name: 'App',
  data() {
    return {
      entry: IS_PROD ? 'normal' : 'chat_attachment',
    }
  },
  watch: {
    watchFlag: {
      immediate: true,
      handler(newval) {
        this.showWindow = newval
        this.hideLoading()
      }
    }
  },
  computed: {
    watchFlag() {
      return this.$store.state.app.showWindow
    }
  },
  mounted() {},

  methods: {}
}
</script>
<style lang="scss" scoped>
.isTab {
  padding-bottom: 50px;
  box-sizing: border-box;
}
</style>