标题的内容响应式设计

      title () {
        // this.$route.path 代表了当前的路径,形成header标题的自适应
        switch (this.$route.path.split('/')[1]) {
            case '':
              return "Qu约"
            case 'home':
              return "Qu约"
            case 'sport':
              return "约跑"
            case 'travel':
              return "约行"
            case 'user':
              return "我的"
        }
      },

猜你喜欢

转载自www.cnblogs.com/jack-liu6/p/9116780.html