提交 fd45e8b8 编写于 作者: 芊里

首页搜索栏目调整

上级 a73b07da
......@@ -2,7 +2,8 @@
"pages": [{
"path": "pages/list/list",
"style": {
"navigationStyle":"custom"
"navigationStyle":"custom",
"enablePullDownRefresh":true
}
}, {
"path":"pages/grid/grid",
......
<template>
<view style="overflow: hidden;">
<status-bar></status-bar>
<view style="overflow: hidden;">
<!-- 搜索栏 -->
<news-search-title></news-search-title>
<!-- 页面主列表 -->
<news-list ref="newsList" :searchText="searchText"></news-list>
</view>
......@@ -8,11 +9,11 @@
<script>
import newsList from './news-list.vue';
import statusBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue';
import newsSearchTitle from './news-search-title.vue';
export default {
components:{
newsList,
statusBar
newsSearchTitle
},
data() {
return {
......@@ -25,6 +26,13 @@
},
onShow(options) {
this.searchText = getApp().globalData.searchText;
},
/**
* 下拉刷新回调函数
*/
onPullDownRefresh() {
console.log('refresh');
this.$refs.newsList.refresh();
},
methods: {
/**
......@@ -33,17 +41,12 @@
select() {
this.formData.waterfall = !this.formData.waterfall;
},
/**
* 下拉刷新回调函数
*/
onPullDownRefresh() {
this.$refs.newsList.onPullDownRefresh();
},
/**
* 上拉加载回调函数
*/
onReachBottom() {
this.$refs.newsList.onReachBottom();
onReachBottom() {
console.log('load_more');
this.$refs.newsList.loadMore();
}
},
watch: {
......
......@@ -89,7 +89,7 @@
/**
* 下拉刷新回调函数
*/
onPullDownRefresh() {
refresh() {
this.tipShow = true
this.formData.status = 'more'
this.$refs.udb.loadData({
......@@ -102,7 +102,7 @@
/**
* 上拉加载回调函数
*/
onReachBottom() {
loadMore() {
this.$refs.udb.loadMore()
},
load(data, ended) {
......
<template>
<view>
<status-bar></status-bar>
</view>
</template>
<script>
import statusBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue';
export default {
components: {
statusBar
},
}
</script>
<style>
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册