|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
+ <view class="filter-box">
|
|
|
+ <u-search placeholder="请输入关键字" v-model="filterText" @search="setFilterText" @custom="setFilterText"></u-search>
|
|
|
+ </view>
|
|
|
<scroll-view scroll-y class="scroll-box" @scrolltolower="handleLoadMore" :refresher-enabled="true"
|
|
|
:refresher-triggered="triggered" :refresher-threshold="100" refresher-background="white" @refresherrefresh="onRefresh"
|
|
|
@refresherrestore="onRestore">
|
|
@@ -39,6 +42,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ filterText: '',
|
|
|
triggered: false,
|
|
|
isOver: false,
|
|
|
pageIndex: 1,
|
|
@@ -50,6 +54,10 @@
|
|
|
},
|
|
|
onReady() {},
|
|
|
methods: {
|
|
|
+ // 设置过滤字段
|
|
|
+ setFilterText(value) {
|
|
|
+ this.onRefresh()
|
|
|
+ },
|
|
|
// 下拉刷新
|
|
|
onRefresh() {
|
|
|
this.triggered = true
|
|
@@ -73,6 +81,7 @@
|
|
|
// 获取列表数据
|
|
|
getTableList() {
|
|
|
NET.request(API.getExtraLessonsStudentList, {
|
|
|
+ name: this.filterText,
|
|
|
page: this.pageIndex,
|
|
|
size: 10,
|
|
|
}, 'POST').then(res => {
|
|
@@ -118,9 +127,15 @@
|
|
|
width: 100%;
|
|
|
float: left;
|
|
|
|
|
|
+ .filter-box {
|
|
|
+ height: 48px;
|
|
|
+ padding: 10px 15px;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ }
|
|
|
+
|
|
|
.scroll-box {
|
|
|
width: 100%;
|
|
|
- height: calc(100vh - 60px);
|
|
|
+ height: calc(100vh - 108px);
|
|
|
|
|
|
.card-box {
|
|
|
border-bottom: 1px solid #cccccc;
|