移动端浏览器处理吊坠报警。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.5KB

  1. <template>
  2. <div id="app">
  3. <van-nav-bar v-if="path !== '/login'" :title="navTitle" fixed />
  4. <router-view />
  5. <van-tabbar v-model="active" v-if="path !== '/login'" @change="handleChangeTabbar">
  6. <van-tabbar-item icon="wap-home" :to="{ path: '/' }">首页</van-tabbar-item>
  7. <van-tabbar-item icon="setting" :to="{ path: '/setting' }">设置</van-tabbar-item>
  8. </van-tabbar>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. navTitle: '警报列表'
  16. }
  17. },
  18. computed: {
  19. path() {
  20. return this.$route.path
  21. },
  22. active: {
  23. get: function() {
  24. return this.$route.path === '/' ? 0 : 1
  25. },
  26. set: function() {}
  27. }
  28. },
  29. mounted() {
  30. const navTitle = localStorage.getItem('navTitle')
  31. if (navTitle) {
  32. this.navTitle = navTitle
  33. } else {
  34. localStorage.setItem('navTitle', this.navTitle)
  35. }
  36. },
  37. methods: {
  38. handleChangeTabbar(active) {
  39. this.navTitle = active === 0 ? '警报列表': '设置中心'
  40. localStorage.setItem('navTitle', this.navTitle)
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="less">
  46. #app {
  47. font-family: "Avenir", Helvetica, Arial, sans-serif;
  48. -webkit-font-smoothing: antialiased;
  49. -moz-osx-font-smoothing: grayscale;
  50. //text-align: center;
  51. color: #2c3e50;
  52. overflow: hidden;
  53. }
  54. a:-webkit-any-link {
  55. text-decoration: none;
  56. }
  57. input:-webkit-autofill {
  58. -webkit-box-shadow: 0 0 0px 1000px white inset;
  59. }
  60. input {
  61. filter: none !important;
  62. }
  63. </style>