瀏覽代碼

fix header background (#1407)

杨奕 8 年之前
父節點
當前提交
2b812d5fe2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/components/header.vue

+ 1 - 1
examples/components/header.vue

@@ -228,7 +228,7 @@
     },
     },
     watch: {
     watch: {
       '$route.path'() {
       '$route.path'() {
-        this.isHome = this.$route.name === 'home';
+        this.isHome = /^home/.test(this.$route.name);
         this.headerStyle.backgroundColor = `rgba(32, 160, 255, ${ this.isHome ? '0' : '1' })`;
         this.headerStyle.backgroundColor = `rgba(32, 160, 255, ${ this.isHome ? '0' : '1' })`;
       }
       }
     },
     },