comment-scroll-view.vue
1.78 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<template>
<div class="comment-scroll-view">
<div class="header">
<div class="back" @click="handleBack">
<i class="iconfont icon-left"></i>
</div>
{{ count > 0 ? count + '条' : '' }}评论
</div>
<CommentList class="scroll-wrapper" :dest-id="destId" :column-type="1001" @on-page-change="onPageChange" v-if="destId"></CommentList>
</div>
</template>
<script>
import {Scroll} from 'cube-ui';
export default {
name: 'CommentScrollView',
props: {
destId: {
type: [Number, String],
default() {
return 0;
}
}
},
components: {
Scroll
},
data() {
return {
list: [],
scrollOptions: {
bounce: false
},
count: 0
};
},
methods: {
handleBack() {
this.$emit('on-back');
},
onPageChange({size}) {
this.count = size;
}
}
};
</script>
<style lang="scss" scoped>
.comment-scroll-view {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.header {
position: relative;
width: 100%;
height: 88px;
border-bottom: 2px solid #e0e0e0;
text-align: center;
line-height: 88px;
font-size: 32px;
}
.iconfont {
height: 100%;
font-size: 20PX;
display: flex;
align-items: center;
justify-content: center;
padding-left: 10PX;
padding-right: 10PX;
}
.back {
position: absolute;
width: 100px;
padding-left: 5PX;
}
.scroll-wrapper {
flex: 1;
}
.item {
background-color: white;
}
.footer {
width: 100%;
height: 100px;
border-top: 2px solid #e0e0e0;
display: flex;
justify-content: center;
align-items: center;
}
.input {
width: 690px;
height: 72px;
background-color: #f0f0f0;
border: 1px solid #e0e0e0;
border-radius: 8px;
font-size: 24px;
color: #b0b0b0;
padding: 18px 0 18px 22px;
}
</style>