|
@@ -1,394 +1,449 @@
|
1
|
1
|
<template>
|
2
|
|
- <div class="bgColor">
|
3
|
|
- <div slot="content" class="scroll-wrapper">
|
4
|
|
- <div class="demo">
|
5
|
|
- <div class="scroll-list-wrap">
|
6
|
|
- <cube-scroll ref="scroll" :data="items" :options="options" @pulling-down="onPullingDown" @pulling-up="onPullingUp">
|
7
|
|
- <div class="search">
|
8
|
|
- <input type="text" placeholder="搜索" v-model="search" @input="searchFn()">
|
9
|
|
- </div>
|
10
|
|
- <ul class="foods-wrapper">
|
11
|
|
- <li v-for="data in items" class="food-item border-1px" @click="toKnowDetails(data)">
|
12
|
|
- <div class="food-content">
|
13
|
|
- <div class="title">
|
14
|
|
- <div>
|
15
|
|
- <i class="iconfont icon-changjianwenti1"></i>
|
16
|
|
- </div>
|
17
|
|
- <div>主题:{{data.title}}</div>
|
18
|
|
- </div>
|
19
|
|
- <div class="content" v-html="data.content">
|
20
|
|
- </div>
|
21
|
|
- <div class="timeBox">
|
22
|
|
- <div class="time">{{data.createtime.substring(0,data.createtime.length-3)}}</div>
|
23
|
|
- <div class="good">
|
24
|
|
- <i class="iconfont icon-dianzan"></i> <span>{{data.star}}</span>
|
25
|
|
- </div>
|
26
|
|
- </div>
|
27
|
|
- </div>
|
28
|
|
- </li>
|
29
|
|
- <div class="wushuju" v-show="wushuju">
|
30
|
|
- <img src="./../../static/images/wushuju.svg" alt="">
|
31
|
|
- <div class="noDataFont">暂无数据</div>
|
32
|
|
- </div>
|
33
|
|
- </ul>
|
34
|
|
- <template v-if="customPullDown" slot="pulldown" slot-scope="props">
|
35
|
|
- <div v-if="props.pullDownRefresh" class="cube-pulldown-wrapper" :style="props.pullDownStyle">
|
36
|
|
- <div v-show="props.beforePullDown" class="before-trigger" :style="{paddingTop: props.bubbleY + 'px'}">
|
37
|
|
- <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 40}">↓</span>
|
38
|
|
- </div>
|
39
|
|
- <div class="after-trigger" v-show="!props.beforePullDown">
|
40
|
|
- <div v-show="props.isPullingDown" class="loading">
|
41
|
|
- <cube-loading></cube-loading>
|
42
|
|
- </div>
|
43
|
|
- <div v-show="!props.isPullingDown" class="text">
|
44
|
|
- <span class="refresh-text">更新成功</span>
|
45
|
|
- </div>
|
46
|
|
- </div>
|
47
|
|
- </div>
|
48
|
|
- </template>
|
49
|
|
- </cube-scroll>
|
50
|
|
- </div>
|
|
2
|
+ <div class="bgColor">
|
|
3
|
+ <div slot="content" class="scroll-wrapper">
|
|
4
|
+ <div class="demo">
|
|
5
|
+ <div class="scroll-list-wrap">
|
|
6
|
+ <cube-scroll
|
|
7
|
+ ref="scroll"
|
|
8
|
+ :data="items"
|
|
9
|
+ :options="options"
|
|
10
|
+ @pulling-down="onPullingDown"
|
|
11
|
+ @pulling-up="onPullingUp"
|
|
12
|
+ >
|
|
13
|
+ <div class="search">
|
|
14
|
+ <input
|
|
15
|
+ type="text"
|
|
16
|
+ placeholder="搜索"
|
|
17
|
+ v-model="search"
|
|
18
|
+ @input="searchFnDebounce()"
|
|
19
|
+ />
|
51
|
20
|
</div>
|
|
21
|
+ <ul class="foods-wrapper">
|
|
22
|
+ <li
|
|
23
|
+ v-for="data in items"
|
|
24
|
+ class="food-item border-1px"
|
|
25
|
+ @click="toKnowDetails(data)"
|
|
26
|
+ >
|
|
27
|
+ <div class="food-content">
|
|
28
|
+ <div class="title">
|
|
29
|
+ <div>
|
|
30
|
+ <i class="iconfont icon-changjianwenti1"></i>
|
|
31
|
+ </div>
|
|
32
|
+ <div>主题:{{ data.title }}</div>
|
|
33
|
+ </div>
|
|
34
|
+ <div class="content" v-html="data.content"></div>
|
|
35
|
+ <div class="timeBox">
|
|
36
|
+ <div class="time">
|
|
37
|
+ {{
|
|
38
|
+ data.createtime.substring(0, data.createtime.length - 3)
|
|
39
|
+ }}
|
|
40
|
+ </div>
|
|
41
|
+ <div class="good">
|
|
42
|
+ <i class="iconfont icon-dianzan"></i> <span>{{
|
|
43
|
+ data.star
|
|
44
|
+ }}</span>
|
|
45
|
+ </div>
|
|
46
|
+ </div>
|
|
47
|
+ </div>
|
|
48
|
+ </li>
|
|
49
|
+ <div class="wushuju" v-show="wushuju">
|
|
50
|
+ <img src="./../../static/images/wushuju.svg" alt="" />
|
|
51
|
+ <div class="noDataFont">暂无数据</div>
|
|
52
|
+ </div>
|
|
53
|
+ </ul>
|
|
54
|
+ <template v-if="customPullDown" slot="pulldown" slot-scope="props">
|
|
55
|
+ <div
|
|
56
|
+ v-if="props.pullDownRefresh"
|
|
57
|
+ class="cube-pulldown-wrapper"
|
|
58
|
+ :style="props.pullDownStyle"
|
|
59
|
+ >
|
|
60
|
+ <div
|
|
61
|
+ v-show="props.beforePullDown"
|
|
62
|
+ class="before-trigger"
|
|
63
|
+ :style="{ paddingTop: props.bubbleY + 'px' }"
|
|
64
|
+ >
|
|
65
|
+ <span
|
|
66
|
+ :class="{
|
|
67
|
+ rotate: props.bubbleY > pullDownRefreshThreshold - 40
|
|
68
|
+ }"
|
|
69
|
+ >↓</span
|
|
70
|
+ >
|
|
71
|
+ </div>
|
|
72
|
+ <div class="after-trigger" v-show="!props.beforePullDown">
|
|
73
|
+ <div v-show="props.isPullingDown" class="loading">
|
|
74
|
+ <cube-loading></cube-loading>
|
|
75
|
+ </div>
|
|
76
|
+ <div v-show="!props.isPullingDown" class="text">
|
|
77
|
+ <span class="refresh-text">更新成功</span>
|
|
78
|
+ </div>
|
|
79
|
+ </div>
|
|
80
|
+ </div>
|
|
81
|
+ </template>
|
|
82
|
+ </cube-scroll>
|
52
|
83
|
</div>
|
53
|
|
- <load-ing v-show="loadShow"></load-ing>
|
|
84
|
+ </div>
|
54
|
85
|
</div>
|
|
86
|
+ <load-ing v-show="loadShow"></load-ing>
|
|
87
|
+ </div>
|
55
|
88
|
</template>
|
56
|
89
|
<script>
|
57
|
|
-import Vue from 'vue'
|
58
|
|
-import CubePage from '../components/cube-page.vue'
|
59
|
|
-import SwitchOption from '../components/switch-option'
|
60
|
|
-import InputOption from '../components/input-option'
|
61
|
|
-import SelectOption from '../components/select-option'
|
62
|
|
-import LoadIng from './../views/loading.vue'
|
|
90
|
+import Vue from "vue";
|
|
91
|
+import debounce from "lodash/debounce";
|
|
92
|
+import CubePage from "../components/cube-page.vue";
|
|
93
|
+import SwitchOption from "../components/switch-option";
|
|
94
|
+import InputOption from "../components/input-option";
|
|
95
|
+import SelectOption from "../components/select-option";
|
|
96
|
+import LoadIng from "./../views/loading.vue";
|
63
|
97
|
export default {
|
64
|
|
- data() {
|
|
98
|
+ data() {
|
65
|
99
|
return {
|
66
|
|
- // items: _foods,
|
67
|
|
- items:[],
|
68
|
|
- pullDownRefresh: true,
|
69
|
|
- pullDownRefreshThreshold: 60,
|
70
|
|
- pullDownRefreshStop: 40,
|
71
|
|
- pullDownRefreshTxt: 'Refresh success',
|
72
|
|
- pullUpLoad: true,
|
73
|
|
- pullUpLoadThreshold: 0,
|
74
|
|
- pullUpLoadMoreTxt: 'Load more',
|
75
|
|
- pullUpLoadNoMoreTxt: '没有更多数据',
|
76
|
|
- wushuju:false,
|
77
|
|
- customPullDown: true,
|
78
|
|
- search:"",
|
79
|
|
- sum:10,
|
80
|
|
- idx:0,
|
81
|
|
- loadShow:true
|
82
|
|
- }
|
83
|
|
- },
|
84
|
|
- components: {
|
85
|
|
- CubePage,
|
86
|
|
- SwitchOption,
|
87
|
|
- InputOption,
|
88
|
|
- SelectOption,
|
89
|
|
- LoadIng
|
90
|
|
- },
|
91
|
|
- computed: {
|
|
100
|
+ // items: _foods,
|
|
101
|
+ items: [],
|
|
102
|
+ pullDownRefresh: true,
|
|
103
|
+ pullDownRefreshThreshold: 60,
|
|
104
|
+ pullDownRefreshStop: 40,
|
|
105
|
+ pullDownRefreshTxt: "Refresh success",
|
|
106
|
+ pullUpLoad: true,
|
|
107
|
+ pullUpLoadThreshold: 0,
|
|
108
|
+ pullUpLoadMoreTxt: "Load more",
|
|
109
|
+ pullUpLoadNoMoreTxt: "没有更多数据",
|
|
110
|
+ wushuju: false,
|
|
111
|
+ customPullDown: true,
|
|
112
|
+ search: "",
|
|
113
|
+ sum: 10,
|
|
114
|
+ idx: 0,
|
|
115
|
+ loadShow: true,
|
|
116
|
+ lastSearchKey: "",
|
|
117
|
+ searchFnDebounce: null
|
|
118
|
+ };
|
|
119
|
+ },
|
|
120
|
+ components: {
|
|
121
|
+ CubePage,
|
|
122
|
+ SwitchOption,
|
|
123
|
+ InputOption,
|
|
124
|
+ SelectOption,
|
|
125
|
+ LoadIng
|
|
126
|
+ },
|
|
127
|
+ computed: {
|
92
|
128
|
options() {
|
93
|
|
- return {
|
|
129
|
+ return {
|
94
|
130
|
pullDownRefresh: this.pullDownRefreshObj,
|
95
|
131
|
pullUpLoad: this.pullUpLoadObj,
|
96
|
132
|
scrollbar: true
|
97
|
|
- }
|
|
133
|
+ };
|
98
|
134
|
},
|
99
|
135
|
pullDownRefreshObj: function() {
|
100
|
|
- return this.pullDownRefresh ? {
|
101
|
|
- threshold: parseInt(this.pullDownRefreshThreshold),
|
102
|
|
- txt: this.pullDownRefreshTxt
|
103
|
|
- } : false
|
|
136
|
+ return this.pullDownRefresh
|
|
137
|
+ ? {
|
|
138
|
+ threshold: parseInt(this.pullDownRefreshThreshold),
|
|
139
|
+ txt: this.pullDownRefreshTxt
|
|
140
|
+ }
|
|
141
|
+ : false;
|
104
|
142
|
},
|
105
|
143
|
pullUpLoadObj: function() {
|
106
|
|
- return this.pullUpLoad ? {
|
107
|
|
- threshold: parseInt(this.pullUpLoadThreshold),
|
108
|
|
- txt: {
|
109
|
|
- more: this.pullUpLoadMoreTxt,
|
110
|
|
- noMore: this.pullUpLoadNoMoreTxt
|
111
|
|
- }
|
112
|
|
- } : false
|
|
144
|
+ return this.pullUpLoad
|
|
145
|
+ ? {
|
|
146
|
+ threshold: parseInt(this.pullUpLoadThreshold),
|
|
147
|
+ txt: {
|
|
148
|
+ more: this.pullUpLoadMoreTxt,
|
|
149
|
+ noMore: this.pullUpLoadNoMoreTxt
|
|
150
|
+ }
|
|
151
|
+ }
|
|
152
|
+ : false;
|
113
|
153
|
}
|
|
154
|
+ },
|
|
155
|
+ methods: {
|
|
156
|
+ getParams() {
|
|
157
|
+ if (this.$route.params.keword) {
|
|
158
|
+ this.search = this.$route.params.keword;
|
|
159
|
+ }
|
114
|
160
|
},
|
115
|
|
- methods: {
|
116
|
|
- getParams(){
|
117
|
|
- if(this.$route.params.keword){
|
118
|
|
- this.search=this.$route.params.keword
|
119
|
|
- }
|
|
161
|
+ searchFn() {
|
|
162
|
+ var that = this;
|
|
163
|
+ that.loadShow = true;
|
|
164
|
+ this.idx = 0;
|
|
165
|
+ this.lastSearchKey = that.search;
|
|
166
|
+ this.$http
|
|
167
|
+ .post("service/solution/fetchDataList/solution", {
|
|
168
|
+ idx: 0,
|
|
169
|
+ sum: 10,
|
|
170
|
+ solution: {
|
|
171
|
+ title: that.search,
|
|
172
|
+ status: { id: 72 },
|
|
173
|
+ solutionRange: 1
|
|
174
|
+ }
|
|
175
|
+ })
|
|
176
|
+ .then(function(res) {
|
|
177
|
+ if (that.lastSearchKey == that.search) {
|
|
178
|
+ if (res.data.list.length > 0) {
|
|
179
|
+ that.items = res.data.list;
|
|
180
|
+ that.wushuju = false;
|
|
181
|
+ } else {
|
|
182
|
+ that.wushuju = true;
|
|
183
|
+ that.items = [];
|
|
184
|
+ }
|
|
185
|
+ that.loadShow = false;
|
|
186
|
+ }
|
|
187
|
+ });
|
120
|
188
|
},
|
121
|
|
- searchFn(){
|
122
|
|
- var that=this;
|
123
|
|
- that.loadShow=true;
|
124
|
|
- this.idx=0;
|
125
|
|
- this.$http.post('service/solution/fetchDataList/solution',{
|
126
|
|
- 'idx':0,
|
127
|
|
- 'sum':10,
|
128
|
|
- 'solution':{
|
129
|
|
- 'title':that.search,
|
130
|
|
- 'status':{'id':72},
|
131
|
|
- 'solutionRange':1
|
132
|
|
- }
|
133
|
|
- }).then(function(res){
|
134
|
|
- if(res.data.list.length>0){
|
135
|
|
- that.items=res.data.list;
|
136
|
|
- that.wushuju=false
|
137
|
|
- }else{
|
138
|
|
- that.wushuju=true;
|
139
|
|
- that.items=[]
|
|
189
|
+ toKnowDetails(data) {
|
|
190
|
+ // this.$router.push({path:'/knowDetails'})
|
|
191
|
+ this.$router.push({
|
|
192
|
+ name: "KnowDetails",
|
|
193
|
+ params: {
|
|
194
|
+ data: JSON.stringify(data)
|
140
|
195
|
}
|
141
|
|
- that.loadShow=false
|
142
|
|
- })
|
143
|
|
- },
|
144
|
|
- toKnowDetails(data){
|
145
|
|
- // this.$router.push({path:'/knowDetails'})
|
146
|
|
- this.$router.push({
|
147
|
|
- name:'KnowDetails',
|
148
|
|
- params:{
|
149
|
|
- data:JSON.stringify(data)
|
150
|
|
- }
|
151
|
|
- })
|
|
196
|
+ });
|
152
|
197
|
},
|
153
|
198
|
onPullingDown() {
|
154
|
|
- // 模拟更新数据
|
155
|
|
- this.idx=0;
|
156
|
|
- setTimeout(() => {
|
157
|
|
- var that=this;
|
158
|
|
- this.$http.post('service/solution/fetchDataList/solution',{
|
159
|
|
- 'idx':0,
|
160
|
|
- 'sum':10,
|
161
|
|
- 'solution':{
|
162
|
|
- 'title':that.search,
|
163
|
|
- 'status':{'id':72},
|
164
|
|
- 'solutionRange':1
|
|
199
|
+ // 模拟更新数据
|
|
200
|
+ this.idx = 0;
|
|
201
|
+ setTimeout(() => {
|
|
202
|
+ var that = this;
|
|
203
|
+ this.$http
|
|
204
|
+ .post("service/solution/fetchDataList/solution", {
|
|
205
|
+ idx: 0,
|
|
206
|
+ sum: 10,
|
|
207
|
+ solution: {
|
|
208
|
+ title: that.search,
|
|
209
|
+ status: { id: 72 },
|
|
210
|
+ solutionRange: 1
|
165
|
211
|
}
|
166
|
|
- }).then(function(res){
|
167
|
|
- if(res.data.list.length>0){
|
168
|
|
- that.items=res.data.list;
|
169
|
|
- that.wushuju=false
|
170
|
|
- }else{
|
171
|
|
- that.$refs.scroll.forceUpdate();
|
172
|
|
- that.wushuju=true
|
|
212
|
+ })
|
|
213
|
+ .then(function(res) {
|
|
214
|
+ if (res.data.list.length > 0) {
|
|
215
|
+ that.items = res.data.list;
|
|
216
|
+ that.wushuju = false;
|
|
217
|
+ } else {
|
|
218
|
+ that.$refs.scroll.forceUpdate();
|
|
219
|
+ that.wushuju = true;
|
173
|
220
|
}
|
174
|
|
- })
|
175
|
|
- }, 1000)
|
|
221
|
+ });
|
|
222
|
+ }, 1000);
|
176
|
223
|
},
|
177
|
|
- getData(idx,sum){
|
178
|
|
- var that=this;
|
179
|
|
- this.$http.post('service/solution/fetchDataList/solution',{
|
180
|
|
- 'idx':idx,
|
181
|
|
- 'sum':sum,
|
182
|
|
- 'solution':{
|
183
|
|
- 'title':that.search,
|
184
|
|
- 'status':{'id':72},
|
185
|
|
- 'solutionRange':1
|
186
|
|
- }
|
187
|
|
- }).then(function(res){
|
188
|
|
- if(res.data.list.length>0){
|
189
|
|
- that.items=res.data.list;
|
190
|
|
- that.wushuju=false
|
191
|
|
- }else{
|
192
|
|
- that.wushuju=true
|
193
|
|
- }
|
194
|
|
- that.loadShow=false
|
|
224
|
+ getData(idx, sum) {
|
|
225
|
+ var that = this;
|
|
226
|
+ this.$http
|
|
227
|
+ .post("service/solution/fetchDataList/solution", {
|
|
228
|
+ idx: idx,
|
|
229
|
+ sum: sum,
|
|
230
|
+ solution: {
|
|
231
|
+ title: that.search,
|
|
232
|
+ status: { id: 72 },
|
|
233
|
+ solutionRange: 1
|
|
234
|
+ }
|
195
|
235
|
})
|
|
236
|
+ .then(function(res) {
|
|
237
|
+ if (res.data.list.length > 0) {
|
|
238
|
+ that.items = res.data.list;
|
|
239
|
+ that.wushuju = false;
|
|
240
|
+ } else {
|
|
241
|
+ that.wushuju = true;
|
|
242
|
+ }
|
|
243
|
+ that.loadShow = false;
|
|
244
|
+ });
|
196
|
245
|
},
|
197
|
246
|
onPullingUp() {
|
198
|
|
- var that=this;
|
199
|
|
- that.idx=that.idx+1;
|
200
|
|
- this.$http.post('service/solution/fetchDataList/solution',{
|
201
|
|
- 'idx':that.idx,
|
202
|
|
- 'sum':that.sum,
|
203
|
|
- 'solution':{
|
204
|
|
- 'title':that.search,
|
205
|
|
- 'status':{'id':72},
|
206
|
|
- 'solutionRange':1
|
207
|
|
- }
|
208
|
|
- }).then(function(res){
|
209
|
|
- setTimeout(() => {
|
210
|
|
- if(res.data.list.length>0){
|
211
|
|
- that.items=that.items.concat(res.data.list);
|
212
|
|
- }else{
|
213
|
|
- that.$refs.scroll.forceUpdate()
|
214
|
|
- }
|
215
|
|
- }, 1000)
|
|
247
|
+ var that = this;
|
|
248
|
+ that.idx = that.idx + 1;
|
|
249
|
+ this.$http
|
|
250
|
+ .post("service/solution/fetchDataList/solution", {
|
|
251
|
+ idx: that.idx,
|
|
252
|
+ sum: that.sum,
|
|
253
|
+ solution: {
|
|
254
|
+ title: that.search,
|
|
255
|
+ status: { id: 72 },
|
|
256
|
+ solutionRange: 1
|
|
257
|
+ }
|
216
|
258
|
})
|
|
259
|
+ .then(function(res) {
|
|
260
|
+ setTimeout(() => {
|
|
261
|
+ if (res.data.list.length > 0) {
|
|
262
|
+ that.items = that.items.concat(res.data.list);
|
|
263
|
+ } else {
|
|
264
|
+ that.$refs.scroll.forceUpdate();
|
|
265
|
+ }
|
|
266
|
+ }, 1000);
|
|
267
|
+ });
|
217
|
268
|
},
|
218
|
269
|
updatePullDownRefresh(val) {
|
219
|
|
- this.pullDownRefresh = val
|
|
270
|
+ this.pullDownRefresh = val;
|
220
|
271
|
},
|
221
|
272
|
updatePullDownRefreshThreshold(val) {
|
222
|
|
- this.pullDownRefreshThreshold = val
|
|
273
|
+ this.pullDownRefreshThreshold = val;
|
223
|
274
|
},
|
224
|
275
|
updatePullDownRefreshTxt(val) {
|
225
|
|
- this.pullDownRefreshTxt = val
|
|
276
|
+ this.pullDownRefreshTxt = val;
|
226
|
277
|
},
|
227
|
278
|
updatePullUpLoad(val) {
|
228
|
|
- this.pullUpLoad = val
|
|
279
|
+ this.pullUpLoad = val;
|
229
|
280
|
},
|
230
|
281
|
updatePullUpLoadThreshold(val) {
|
231
|
|
- this.pullUpLoadThreshold = val
|
|
282
|
+ this.pullUpLoadThreshold = val;
|
232
|
283
|
},
|
233
|
284
|
updatePullUpLoadMoreTxt(val) {
|
234
|
|
- this.pullUpLoadMoreTxt = val
|
|
285
|
+ this.pullUpLoadMoreTxt = val;
|
235
|
286
|
},
|
236
|
287
|
updatePullUpLoadNoMoreTxt(val) {
|
237
|
|
- this.pullUpLoadNoMoreTxt = val
|
|
288
|
+ this.pullUpLoadNoMoreTxt = val;
|
238
|
289
|
},
|
239
|
290
|
updateCustomPullDown(val) {
|
240
|
|
- this.customPullDown = val
|
|
291
|
+ this.customPullDown = val;
|
241
|
292
|
},
|
242
|
293
|
rebuildScroll() {
|
243
|
|
- Vue.nextTick(() => {
|
244
|
|
- this.$refs.scroll.destroy()
|
245
|
|
- this.$refs.scroll.initScroll()
|
246
|
|
- })
|
|
294
|
+ Vue.nextTick(() => {
|
|
295
|
+ this.$refs.scroll.destroy();
|
|
296
|
+ this.$refs.scroll.initScroll();
|
|
297
|
+ });
|
247
|
298
|
}
|
248
|
|
- },
|
249
|
|
- created(){
|
250
|
|
- this.getParams();
|
251
|
|
- this.getData(this.idx,this.sum)
|
252
|
|
- }
|
253
|
|
-}
|
|
299
|
+ },
|
|
300
|
+ created() {
|
|
301
|
+ this.searchFnDebounce = debounce(this.searchFn, 500);
|
|
302
|
+ this.getParams();
|
|
303
|
+ this.getData(this.idx, this.sum);
|
|
304
|
+ },
|
|
305
|
+ beforeDestroy() {
|
|
306
|
+ this.searchFnDebounce.cancel();
|
|
307
|
+ }
|
|
308
|
+};
|
254
|
309
|
</script>
|
255
|
|
- <style lang="stylus" rel="stylesheet/stylus" scoped>
|
256
|
|
- .scroll-list-wrap
|
257
|
|
- /* height: 350px */
|
258
|
|
- height:100vh
|
259
|
|
- /* border: 1px solid rgba(0, 0, 0, 0.1) */
|
260
|
|
- border-radius: 5px
|
261
|
|
- transform: rotate(0deg) // fix 子元素超出边框圆角部分不隐藏的问题
|
262
|
|
- overflow: hidden
|
|
310
|
+<style lang="stylus" rel="stylesheet/stylus" scoped>
|
|
311
|
+.scroll-list-wrap
|
|
312
|
+ /* height: 350px */
|
|
313
|
+ height:100vh
|
|
314
|
+ /* border: 1px solid rgba(0, 0, 0, 0.1) */
|
|
315
|
+ border-radius: 5px
|
|
316
|
+ transform: rotate(0deg) // fix 子元素超出边框圆角部分不隐藏的问题
|
|
317
|
+ overflow: hidden
|
263
|
318
|
|
264
|
|
- .foods-wrapper
|
265
|
|
- .food-item
|
266
|
|
- display: flex
|
267
|
|
- /* min-width: 0 */
|
268
|
|
- /* padding: 18px
|
269
|
|
- border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
|
|
319
|
+.foods-wrapper
|
|
320
|
+ .food-item
|
|
321
|
+ display: flex
|
|
322
|
+ /* min-width: 0 */
|
|
323
|
+ /* padding: 18px
|
|
324
|
+ border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
|
270
|
325
|
|
271
|
|
- &:last-child
|
272
|
|
- border-none()
|
273
|
|
- margin-bottom: 0
|
|
326
|
+ &:last-child
|
|
327
|
+ border-none()
|
|
328
|
+ margin-bottom: 0
|
274
|
329
|
|
275
|
|
- .food-content
|
276
|
|
- flex: 1
|
277
|
|
- min-width: 0;
|
278
|
|
- .cartcontrol-wrapper
|
279
|
|
- position: absolute
|
280
|
|
- right: 0
|
281
|
|
- bottom: 12px
|
282
|
|
- .scroll-wrapper{
|
283
|
|
- .cube-pulldown-wrapper{
|
284
|
|
- .before-trigger{
|
285
|
|
- font-size: 30px;
|
286
|
|
- line-height: 30px;
|
287
|
|
- align-self: flex-end;
|
288
|
|
- span{
|
289
|
|
- display: inline-block;
|
290
|
|
- transition: all 0.3s;
|
291
|
|
- color: #666;
|
292
|
|
- &.rotate{
|
293
|
|
- transform: rotate(180deg)
|
294
|
|
- }
|
295
|
|
- }
|
296
|
|
- }
|
297
|
|
- .after-trigger{
|
298
|
|
- .refresh-text{
|
299
|
|
- color: grey
|
|
330
|
+ .food-content
|
|
331
|
+ flex: 1
|
|
332
|
+ min-width: 0;
|
|
333
|
+ .cartcontrol-wrapper
|
|
334
|
+ position: absolute
|
|
335
|
+ right: 0
|
|
336
|
+ bottom: 12px
|
|
337
|
+ .scroll-wrapper{
|
|
338
|
+ .cube-pulldown-wrapper{
|
|
339
|
+ .before-trigger{
|
|
340
|
+ font-size: 30px;
|
|
341
|
+ line-height: 30px;
|
|
342
|
+ align-self: flex-end;
|
|
343
|
+ span{
|
|
344
|
+ display: inline-block;
|
|
345
|
+ transition: all 0.3s;
|
|
346
|
+ color: #666;
|
|
347
|
+ &.rotate{
|
|
348
|
+ transform: rotate(180deg)
|
300
|
349
|
}
|
301
|
|
- }
|
302
|
|
- }
|
|
350
|
+ }
|
|
351
|
+ }
|
|
352
|
+ .after-trigger{
|
|
353
|
+ .refresh-text{
|
|
354
|
+ color: grey
|
|
355
|
+ }
|
303
|
356
|
}
|
304
|
|
- </style>
|
|
357
|
+ }
|
|
358
|
+}
|
|
359
|
+</style>
|
305
|
360
|
<style scoped>
|
306
|
|
-.bgColor{
|
307
|
|
- background-color: white
|
|
361
|
+.bgColor {
|
|
362
|
+ background-color: white;
|
308
|
363
|
}
|
309
|
|
-.search{
|
310
|
|
- padding: .16rem .24rem;
|
311
|
|
- height: .6rem;
|
312
|
|
- background-color: #eeeeee;
|
313
|
|
- border-bottom: .01rem #999999 solid
|
|
364
|
+.search {
|
|
365
|
+ padding: 0.16rem 0.24rem;
|
|
366
|
+ height: 0.6rem;
|
|
367
|
+ background-color: #eeeeee;
|
|
368
|
+ border-bottom: 0.01rem #999999 solid;
|
314
|
369
|
}
|
315
|
|
-.search input{
|
316
|
|
- width: 100%;
|
317
|
|
- height: .56rem;
|
318
|
|
- border-radius: 4px;
|
319
|
|
- text-align: center;
|
320
|
|
- font-size: .28rem
|
|
370
|
+.search input {
|
|
371
|
+ width: 100%;
|
|
372
|
+ height: 0.56rem;
|
|
373
|
+ border-radius: 4px;
|
|
374
|
+ text-align: center;
|
|
375
|
+ font-size: 0.28rem;
|
321
|
376
|
}
|
322
|
|
-.search:focus{
|
323
|
|
- outline:none
|
|
377
|
+.search:focus {
|
|
378
|
+ outline: none;
|
324
|
379
|
}
|
325
|
|
-.food-item{
|
326
|
|
- border-top: .16rem rgb(238,238,238) solid;
|
|
380
|
+.food-item {
|
|
381
|
+ border-top: 0.16rem rgb(238, 238, 238) solid;
|
327
|
382
|
}
|
328
|
|
-.food-content{
|
329
|
|
- border-top: .01rem rgb(223, 222, 222) solid;
|
330
|
|
- border-bottom: .01rem rgb(223, 222, 222) solid;
|
|
383
|
+.food-content {
|
|
384
|
+ border-top: 0.01rem rgb(223, 222, 222) solid;
|
|
385
|
+ border-bottom: 0.01rem rgb(223, 222, 222) solid;
|
331
|
386
|
}
|
332
|
|
-.title{
|
333
|
|
- display: flex;
|
334
|
|
- min-width: 0;
|
335
|
|
- padding: .2rem .24rem;
|
336
|
|
- line-height: .45rem;
|
337
|
|
- border-bottom: .01rem rgb(223, 222, 222) solid;
|
|
387
|
+.title {
|
|
388
|
+ display: flex;
|
|
389
|
+ min-width: 0;
|
|
390
|
+ padding: 0.2rem 0.24rem;
|
|
391
|
+ line-height: 0.45rem;
|
|
392
|
+ border-bottom: 0.01rem rgb(223, 222, 222) solid;
|
338
|
393
|
}
|
339
|
|
-.title div:nth-child(1){
|
340
|
|
- width: 6%;
|
|
394
|
+.title div:nth-child(1) {
|
|
395
|
+ width: 6%;
|
341
|
396
|
}
|
342
|
|
-.title div:nth-child(1) i{
|
343
|
|
- font-size: .32rem;
|
344
|
|
- color: #005395;
|
345
|
|
- line-height: .49rem
|
|
397
|
+.title div:nth-child(1) i {
|
|
398
|
+ font-size: 0.32rem;
|
|
399
|
+ color: #005395;
|
|
400
|
+ line-height: 0.49rem;
|
346
|
401
|
}
|
347
|
|
-.title div:nth-child(2){
|
348
|
|
- width: 94%;
|
349
|
|
- font-size: .32rem;
|
350
|
|
- overflow: hidden;
|
351
|
|
- white-space: nowrap;
|
352
|
|
- text-overflow: ellipsis;
|
|
402
|
+.title div:nth-child(2) {
|
|
403
|
+ width: 94%;
|
|
404
|
+ font-size: 0.32rem;
|
|
405
|
+ overflow: hidden;
|
|
406
|
+ white-space: nowrap;
|
|
407
|
+ text-overflow: ellipsis;
|
353
|
408
|
}
|
354
|
|
-.content{
|
355
|
|
- font-size: .28rem;
|
356
|
|
- /* margin-top: .3rem; */
|
357
|
|
- line-height: .39rem;
|
358
|
|
- overflow: hidden;
|
359
|
|
- display: -webkit-box;
|
360
|
|
- -webkit-line-clamp: 2;
|
361
|
|
- -webkit-box-orient: vertical;
|
362
|
|
- word-break: break-all;
|
363
|
|
- padding: 0 .64rem;
|
364
|
|
- margin: .24rem 0;
|
365
|
|
- max-height:0.78rem;
|
|
409
|
+.content {
|
|
410
|
+ font-size: 0.28rem;
|
|
411
|
+ /* margin-top: .3rem; */
|
|
412
|
+ line-height: 0.39rem;
|
|
413
|
+ overflow: hidden;
|
|
414
|
+ display: -webkit-box;
|
|
415
|
+ -webkit-line-clamp: 2;
|
|
416
|
+ -webkit-box-orient: vertical;
|
|
417
|
+ word-break: break-all;
|
|
418
|
+ padding: 0 0.64rem;
|
|
419
|
+ margin: 0.24rem 0;
|
|
420
|
+ max-height: 0.78rem;
|
366
|
421
|
}
|
367
|
|
-.timeBox{
|
368
|
|
- display: flex;
|
369
|
|
- justify-content:space-between;
|
370
|
|
- /* margin-top: .3rem; */
|
371
|
|
- border-top: .01rem rgb(223, 222, 222) solid;
|
372
|
|
- padding: .2rem .64rem
|
|
422
|
+.timeBox {
|
|
423
|
+ display: flex;
|
|
424
|
+ justify-content: space-between;
|
|
425
|
+ /* margin-top: .3rem; */
|
|
426
|
+ border-top: 0.01rem rgb(223, 222, 222) solid;
|
|
427
|
+ padding: 0.2rem 0.64rem;
|
373
|
428
|
}
|
374
|
|
-.timeBox .time{
|
375
|
|
- color:#999999;
|
376
|
|
- font-size: .24rem
|
|
429
|
+.timeBox .time {
|
|
430
|
+ color: #999999;
|
|
431
|
+ font-size: 0.24rem;
|
377
|
432
|
}
|
378
|
|
-.timeBox .good i{
|
379
|
|
- font-size: .3rem;
|
380
|
|
- color: #A37200
|
|
433
|
+.timeBox .good i {
|
|
434
|
+ font-size: 0.3rem;
|
|
435
|
+ color: #a37200;
|
381
|
436
|
}
|
382
|
|
-.timeBox .good span{
|
383
|
|
- color: #A37200;
|
384
|
|
- font-size: .24rem
|
|
437
|
+.timeBox .good span {
|
|
438
|
+ color: #a37200;
|
|
439
|
+ font-size: 0.24rem;
|
385
|
440
|
}
|
386
|
|
-.wushuju{
|
387
|
|
- margin-top: 2.4rem;
|
388
|
|
- text-align: center;
|
|
441
|
+.wushuju {
|
|
442
|
+ margin-top: 2.4rem;
|
|
443
|
+ text-align: center;
|
389
|
444
|
}
|
390
|
|
-.wushuju img{
|
391
|
|
- width: 5.12rem;
|
392
|
|
- height: 2.84rem;
|
|
445
|
+.wushuju img {
|
|
446
|
+ width: 5.12rem;
|
|
447
|
+ height: 2.84rem;
|
393
|
448
|
}
|
394
|
449
|
</style>
|