mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
文档细节优化,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:
@@ -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>
|
||||
|
@@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user