import Vue from 'vue'

// eslint-disable-next-line vue/require-name-property
Vue.mixin({
  beforeCreate() {
    const options = this.$options
    if (options.metaInfo) {
      if (options.name === 'App') return
      // 非routerView，清空metaInfo
      if (!this.$vnode.data.routerView) options.metaInfo = undefined
    }
  },
})
