文档细节优化,search、咯阿丁和dialog组件样式修复 (#5)

* fix: loading small style, search style and dialog style

* fix: scroll to top

* fix mobile scroll

* fix scroll to top
This commit is contained in:
张敏
2017-04-23 22:38:50 +08:00
committed by GitHub
parent 1725eb6303
commit ce27957133
23 changed files with 95 additions and 60 deletions

View File

@@ -5,7 +5,7 @@
<div class="mobile-navs">
<template v-for="item in data">
<div class="mobile-nav-item" v-if="item.showInMobile">
<mobile-nav v-for="group in item.groups" :group="group" :base="base"></mobile-nav>
<mobile-nav v-for="(group, index) in item.groups" :group="group" :base="base" :nav-key="index"></mobile-nav>
</div>
</template>
</div>

View File

@@ -7,11 +7,7 @@ export default {
computed: {
mobileUrl() {
if (process.env.NODE_ENV === 'production') {
return '/zanui/vue/examples#' + location.pathname.slice(10);
} else {
return '/examples.html#' + location.pathname;
}
return '/zanui/vue/examples' + location.pathname.slice(10);
}
},

View File

@@ -5,7 +5,7 @@
:class="{
'mobile-nav-group__title--open': isOpen
}"
@click="isOpen = !isOpen">
@click="handleNavTitleClick">
{{group.groupName}}
</div>
<div class="mobile-nav-group__list-wrapper" :class="{ 'mobile-nav-group__list-wrapper--open': isOpen }">
@@ -38,13 +38,25 @@ export default {
return [];
}
},
base: String
base: String,
navKey: [String, Number]
},
data() {
return {
isOpen: false
};
},
mounted() {
this.isOpen = JSON.parse(sessionStorage.getItem('mobile-nav-' + this.navKey));
},
methods: {
handleNavTitleClick() {
this.isOpen = !this.isOpen;
sessionStorage.setItem('mobile-nav-' + this.navKey, this.isOpen);
}
}
};
</script>