Mr.Zhang
2023-08-30 05143990efdcad0e57341913480ab1fb112993bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
    <u-popup :show="show" :round="10" closeable @close="show=false">
        <view class="material-content">
            <u-list @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower">
                <u-list-item v-for="(item, index) in list" :key="index">
                    <view class="" style="height: 20px;">{{item}}</view>
                </u-list-item>
            </u-list>
        </view>
    </u-popup>
</template>
 
<script>
    export default {
        name: "selectMaterial",
        data() {
            return {
                show: false,
                pages: {
                    size: 10,
                    index: 1,
                    total: 0
                },
                list: [
                    1,2,3,4,5,6,7,8
                ]
            };
        },
        methods: {
            open(target) {
                this.show = true
                this.workorderId = target.workorderId
                this.deviceId = target.deviceId
                this.list = []
                this.pages = {
                    size: 10,
                    index: 1,
                    total: 0
                }
                this.loadData()
            },
            loadData() {
                this.list = [1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6]
            },
            scrolltoupper() {
                console.log('scrolltoupper');
                this.loadData()
            },
            scrolltolower() {
                console.log('scrolltolower');
                this.loadData()
            },
        }
    }
</script>
 
<style lang="scss" scoped>
    .material-content {
        height: 800rpx;
    }
</style>