liuyifan 4 年之前
父节点
当前提交
17188a5f68

+ 2 - 2
anyangWebAPP/config/constData.config.js

@@ -51,7 +51,7 @@ export default {
51 51
         imagePath: "../../static/icon_already.png",
52 52
         imageBg: "#1ccd8d",
53 53
         text: "已办待回访",
54
-        navigateToUrl: "/pages/workOrderList/workOrderList?workOrderListType=3&tab=0&state=6&jianhang=0&phoneType=2&segmenter=0&db=0",
54
+        navigateToUrl: "/pages/workOrderList/workOrderList?workOrderListType=3&tab=0&state=6&jianhang=0&phoneType=2&segmenter=0&db=0&tobereply=1",
55 55
       },
56 56
       {
57 57
         id: "6",
@@ -137,7 +137,7 @@ export default {
137 137
         imagePath: "../../static/icon_already.png",
138 138
         imageBg: "#1ccd8d",
139 139
         text: "已办待回访",
140
-        navigateToUrl: "/pages/workOrderList/workOrderList?workOrderListType=3&tab=0&state=6&jianhang=0&phoneType=2&segmenter=0&db=0",
140
+        navigateToUrl: "/pages/workOrderList/workOrderList?workOrderListType=3&tab=0&state=6&jianhang=0&phoneType=2&segmenter=0&db=0&tobereply=1",
141 141
       },
142 142
       {
143 143
         id: "6",

+ 22 - 14
anyangWebAPP/pages/transferWorkOrder/transferWorkOrder.vue

@@ -58,7 +58,7 @@
58 58
             </view>
59 59
           </view>
60 60
         </view>
61
-        <view class="uni-form-item uni-column" v-if="!(isDisplay.urgentOrOrdinary)">
61
+        <view class="uni-form-item uni-column" v-if="!isDisplay.urgentOrOrdinary">
62 62
           <view class="uni-title uni-common-pl">紧急程度:</view>
63 63
           <view class="uni-list">
64 64
             <view class="test">
@@ -78,6 +78,9 @@
78 78
           <button form-type="submit" class="mini-btn" size="mini" type="default">保存</button>
79 79
         </view>
80 80
       </form>
81
+      <view>
82
+        <button form-type="submit" class="mini-btn" size="mini" type="default" @click="returnPage">返回</button>
83
+      </view>
81 84
     </view>
82 85
   </view>
83 86
 </template>
@@ -103,7 +106,7 @@ export default {
103 106
         deptId: "", // 部门id
104 107
         processingTimeLimit: "1", // 普通时限
105 108
         schedulingOpinions: "请于1小时内与来电人取得联系(匿名除外),并于7个工作日内将办理情况反馈来电人,并将办理结果报市长便民公开电话受理中心,同时做好来电人信息保密工作。(若超期将进行通报;若无故不回复,将转交市委市政府督查局。)", // 调度意见
106
-        emergencyTimeFrame: "2020-01-01 00:00:00",  // 紧急时限
109
+        emergencyTimeFrame: "2020-01-01 00:00:00", // 紧急时限
107 110
       },
108 111
       pickerIndex: {
109 112
         indexProcessingTimeLimit: 0, // 来源index
@@ -163,15 +166,20 @@ export default {
163 166
         .post("/WorkOrder/AssignWorkOrderNew", params)
164 167
         .then((response) => {
165 168
           if (response.state.toLowerCase() === "success") {
166
-            uni.navigateBack({
167
-              delta: 2
168
-            });
169
+            this.returnPage()
169 170
           }
170 171
         })
171 172
         .catch((e) => {
172 173
           console.log(e)
173 174
         })
174 175
     },
176
+    // 返回列表页
177
+    returnPage() {
178
+      uni.$emit("updateList",{});
179
+      uni.navigateBack({
180
+        delta: 2,
181
+      })
182
+    },
175 183
 
176 184
     //获取详情
177 185
     getDetail(type) {
@@ -261,18 +269,18 @@ export default {
261 269
     },
262 270
     timeFormat(date) {
263 271
       let year = date.getFullYear()
264
-      let month = date.getMonth() + 1;
265
-      month = month < 10 ? ("0" + month) : month
272
+      let month = date.getMonth() + 1
273
+      month = month < 10 ? "0" + month : month
266 274
       let day = date.getDate()
267
-      day = day < 10 ? ("0" + day) : day
275
+      day = day < 10 ? "0" + day : day
268 276
       let hours = date.getHours()
269
-      hours = hours < 10 ? ("0" + hours) : hours
277
+      hours = hours < 10 ? "0" + hours : hours
270 278
       let minute = date.getMinutes()
271
-      minute = minute < 10 ? ("0" + minute) : minute
279
+      minute = minute < 10 ? "0" + minute : minute
272 280
       let seconds = date.getSeconds()
273
-      seconds = seconds < 10 ? ("0" + seconds) : seconds
281
+      seconds = seconds < 10 ? "0" + seconds : seconds
274 282
       let time = `${year}-${month}-${day} ${hours}:${minute}:${seconds}`
275
-      this.formData.emergencyTimeFrame = time;
283
+      this.formData.emergencyTimeFrame = time
276 284
     },
277 285
   },
278 286
 }
@@ -319,9 +327,9 @@ export default {
319 327
     .uni-btn-v {
320 328
       margin: 15px 0 0 0;
321 329
       text-align: center;
322
-      button{
330
+      button {
323 331
         background: #1e90ff;
324
-        color: #eee
332
+        color: #eee;
325 333
       }
326 334
     }
327 335
   }

+ 19 - 6
anyangWebAPP/pages/workOrderList/workOrderList.vue

@@ -45,8 +45,8 @@
45 45
 <script>
46 46
 const urlData = ["WorkOrder/GetList", "WorkOrder/GetLDDealList", "WorkOrder/GetDWDealList", "WorkOrder/GetZXDealList", "WorkOrder/GetTimeOutList", "workorder/GetSupervList"]
47 47
 const segmenterData = {
48
-  "0" : ["热线件", "督办件"], // 已办待回访
49
-  "1" : ["未追加回复", "已追加回复"], // 已办待回访
48
+  0: ["热线件", "督办件"], // 已办待回访
49
+  1: ["未追加回复", "已追加回复"], // 已办待回访
50 50
 }
51 51
 export default {
52 52
   data() {
@@ -62,7 +62,7 @@ export default {
62 62
       isDisplay: {
63 63
         displaySegmentedControl: false, // 分段器
64 64
         displayCallContent: true, // 来电内容
65
-      }
65
+      },
66 66
     }
67 67
   },
68 68
   onLoad(optioin) {
@@ -84,6 +84,18 @@ export default {
84 84
     if (String(optioin.displayCallContent) === "1") {
85 85
       this.isDisplay.displayCallContent = false
86 86
     }
87
+    // 页面
88
+    uni.$on("updateList", (res) => {
89
+      this.listData = []
90
+      this.paramsData.page = 1
91
+      this.paramsData.pagesize = 10
92
+      this.getList(this.paramsData)
93
+      console.log(res)
94
+    })
95
+  },
96
+  onUnload() {
97
+    // 移除监听事件
98
+    uni.$off("updateList")
87 99
   },
88 100
   methods: {
89 101
     getList(optioin) {
@@ -96,6 +108,7 @@ export default {
96 108
         phoneType: optioin.phoneType == undefined ? "" : optioin.phoneType,
97 109
         db: optioin.db == undefined ? "" : optioin.db,
98 110
         isproresult: optioin.isproresult == undefined ? "" : optioin.isproresult,
111
+        tobereply: optioin.tobereply == undefined ? "" : optioin.tobereply,
99 112
         token: uni.getStorageSync("token"),
100 113
       }
101 114
       let workOrderListType = Number(optioin.workOrderListType)
@@ -138,7 +151,8 @@ export default {
138 151
           break
139 152
       }
140 153
       this.getList(this.paramsData)
141
-    }
154
+    },
155
+    refreshPages() {},
142 156
   },
143 157
   filters: {
144 158
     // 工单状态过滤
@@ -229,8 +243,7 @@ export default {
229 243
 <style lang="scss">
230 244
 .wrapper {
231 245
   padding: 5px 0 0 0;
232
-  .segmentedControlWrapper { 
233
-    
246
+  .segmentedControlWrapper {
234 247
   }
235 248
   .tableWrapper {
236 249
     margin: 15px 0 0 0;

+ 11 - 0
anyangWebAPP/uni_modules/uni-pagination/changelog.md

@@ -0,0 +1,11 @@
1
+## 1.1.0(2021-07-30)
2
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
3
+## 1.0.7(2021-05-12)
4
+- 新增 组件示例地址
5
+## 1.0.6(2021-04-12)
6
+- 新增 PC 和 移动端适配不同的 ui 
7
+## 1.0.5(2021-02-05)
8
+- 优化 组件引用关系,通过uni_modules引用组件
9
+
10
+## 1.0.4(2021-02-05)
11
+- 调整为uni_modules目录规范

+ 404 - 0
anyangWebAPP/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue

@@ -0,0 +1,404 @@
1
+<template>
2
+	<view class="uni-pagination">
3
+		<!-- #ifndef APP-NVUE -->
4
+		<view class="uni-pagination__total is-phone-hide">共 {{ total }} 条</view>
5
+		<!-- #endif -->
6
+		<view
7
+			class="uni-pagination__btn"
8
+			:class="currentIndex === 1 ? 'uni-pagination--disabled' : 'uni-pagination--enabled'"
9
+			:hover-class="currentIndex === 1 ? '' : 'uni-pagination--hover'"
10
+			:hover-start-time="20"
11
+			:hover-stay-time="70"
12
+			@click="clickLeft"
13
+		>
14
+			<template v-if="showIcon === true || showIcon === 'true'">
15
+				<uni-icons color="#666" size="16" type="arrowleft" />
16
+			</template>
17
+			<template v-else>
18
+				<text class="uni-pagination__child-btn">{{ prevText }}</text>
19
+			</template>
20
+		</view>
21
+		<view class="uni-pagination__num uni-pagination__num-flex-none">
22
+			<view class="uni-pagination__num-current">
23
+				<text class="uni-pagination__num-current-text is-pc-hide" style="color:#409EFF">{{ currentIndex }}</text>
24
+				<text class="uni-pagination__num-current-text is-pc-hide">/{{ maxPage || 0 }}</text>
25
+				<!-- #ifndef APP-NVUE -->
26
+				<view
27
+					v-for="(item, index) in paper"
28
+					:key="index"
29
+					:class="{ 'page--active': item === currentIndex }"
30
+					class="uni-pagination__num-tag tag--active is-phone-hide"
31
+					@click.top="selectPage(item, index)"
32
+				>
33
+					<text>{{ item }}</text>
34
+				</view>
35
+				<!-- #endif -->
36
+				
37
+			</view>
38
+		</view>
39
+		<view
40
+			class="uni-pagination__btn"
41
+			:class="currentIndex >= maxPage ? 'uni-pagination--disabled' : 'uni-pagination--enabled'"
42
+			:hover-class="currentIndex === maxPage ? '' : 'uni-pagination--hover'"
43
+			:hover-start-time="20"
44
+			:hover-stay-time="70"
45
+			@click="clickRight"
46
+		>
47
+			<template v-if="showIcon === true || showIcon === 'true'">
48
+				<uni-icons color="#666" size="16" type="arrowright" />
49
+			</template>
50
+			<template v-else>
51
+				<text class="uni-pagination__child-btn">{{ nextText }}</text>
52
+			</template>
53
+		</view>
54
+	</view>
55
+</template>
56
+
57
+<script>
58
+/**
59
+ * Pagination 分页器
60
+ * @description 分页器组件,用于展示页码、请求数据等
61
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=32
62
+ * @property {String} prevText 左侧按钮文字
63
+ * @property {String} nextText 右侧按钮文字
64
+ * @property {Number} current 当前页
65
+ * @property {Number} total 数据总量
66
+ * @property {Number} pageSize 每页数据量
67
+ * @property {Number} showIcon = [true|false] 是否以 icon 形式展示按钮
68
+ * @event {Function} change 点击页码按钮时触发 ,e={type,current} current为当前页,type值为:next/prev,表示点击的是上一页还是下一个
69
+ */
70
+
71
+export default {
72
+	name: 'UniPagination',
73
+	emits:['update:modelValue','input','change'],
74
+	props: {
75
+		value: {
76
+			type: [Number, String],
77
+			default: 1
78
+		},
79
+		modelValue: {
80
+			type: [Number, String],
81
+			default: 1
82
+		},
83
+		prevText: {
84
+			type: String,
85
+			default: '上一页'
86
+		},
87
+		nextText: {
88
+			type: String,
89
+			default: '下一页'
90
+		},
91
+		current: {
92
+			type: [Number, String],
93
+			default: 1
94
+		},
95
+		total: {
96
+			// 数据总量
97
+			type: [Number, String],
98
+			default: 0
99
+		},
100
+		pageSize: {
101
+			// 每页数据量
102
+			type: [Number, String],
103
+			default: 10
104
+		},
105
+		showIcon: {
106
+			// 是否以 icon 形式展示按钮
107
+			type: [Boolean, String],
108
+			default: false
109
+		},
110
+		pagerCount: {
111
+			type: Number,
112
+			default: 7
113
+		}
114
+	},
115
+	data() {
116
+		return {
117
+			currentIndex: 1,
118
+			paperData: []
119
+		}
120
+	},
121
+	computed: {
122
+		maxPage() {
123
+			let maxPage = 1
124
+			let total = Number(this.total)
125
+			let pageSize = Number(this.pageSize)
126
+			if (total && pageSize) {
127
+				maxPage = Math.ceil(total / pageSize)
128
+			}
129
+			return maxPage
130
+		},
131
+		paper() {
132
+			const num = this.currentIndex
133
+			// TODO 最大页数
134
+			const pagerCount = this.pagerCount
135
+			// const total = 181
136
+			const total = this.total
137
+			const pageSize = this.pageSize
138
+			let totalArr = []
139
+			let showPagerArr = []
140
+			let pagerNum = Math.ceil(total / pageSize)
141
+			for (let i = 0; i < pagerNum; i++) {
142
+				totalArr.push(i + 1)
143
+			}
144
+			showPagerArr.push(1)
145
+			const totalNum = totalArr[totalArr.length - (pagerCount + 1) / 2]
146
+			totalArr.forEach((item, index) => {
147
+				if ((pagerCount + 1) / 2 >= num) {
148
+					if (item < pagerCount + 1 && item > 1) {
149
+						showPagerArr.push(item)
150
+					}
151
+				} else if (num + 2 <= totalNum) {
152
+					if (item > num - (pagerCount + 1) / 2 && item < num + (pagerCount + 1) / 2) {
153
+						showPagerArr.push(item)
154
+					}
155
+				} else {
156
+					if ((item > num - (pagerCount + 1) / 2 || pagerNum - pagerCount < item) && item < totalArr[totalArr.length - 1]) {
157
+						showPagerArr.push(item)
158
+					}
159
+				}
160
+			})
161
+			if (pagerNum > pagerCount) {
162
+				if ((pagerCount + 1) / 2 >= num) {
163
+					showPagerArr[showPagerArr.length - 1] = '...'
164
+				} else if (num + 2 <= totalNum) {
165
+					showPagerArr[1] = '...'
166
+					showPagerArr[showPagerArr.length - 1] = '...'
167
+				} else {
168
+					showPagerArr[1] = '...'
169
+				}
170
+				showPagerArr.push(totalArr[totalArr.length - 1])
171
+			} else {
172
+				if ((pagerCount + 1) / 2 >= num) {
173
+				} else if (num + 2 <= totalNum) {
174
+				} else {
175
+					showPagerArr.shift()
176
+					showPagerArr.push(totalArr[totalArr.length - 1])
177
+				}
178
+			}
179
+
180
+			return showPagerArr
181
+		}
182
+	},
183
+	watch: {
184
+		current(val) {
185
+			this.currentIndex = val
186
+		},
187
+		value(val) {
188
+			if (val < 1) {
189
+				this.currentIndex = 1
190
+			} else {
191
+				this.currentIndex = val
192
+			}
193
+		},
194
+		modelValue(val) {
195
+			if (val < 1) {
196
+				this.currentIndex = 1
197
+			} else {
198
+				this.currentIndex = val
199
+			}
200
+		}
201
+	},
202
+	created() {
203
+		this.currentIndex = +this.value
204
+	},
205
+	methods: {
206
+		// 选择标签
207
+		selectPage(e, index) {
208
+			if (parseInt(e)) {
209
+				this.currentIndex = e
210
+				this.change('current')
211
+			} else {
212
+				let pagerNum = Math.ceil(this.total / this.pageSize)
213
+				// let pagerNum = Math.ceil(181 / this.pageSize)
214
+				// 上一页
215
+				if (index <= 1) {
216
+					if (this.currentIndex - 5 > 1) {
217
+						this.currentIndex -= 5
218
+					} else {
219
+						this.currentIndex = 1
220
+					}
221
+					return
222
+				}
223
+				// 下一页
224
+				if (index >= 6) {
225
+					if (this.currentIndex + 5 > pagerNum) {
226
+						this.currentIndex = pagerNum
227
+					} else {
228
+						this.currentIndex += 5
229
+					}
230
+					return
231
+				}
232
+			}
233
+		},
234
+		clickLeft() {
235
+			if (Number(this.currentIndex) === 1) {
236
+				return
237
+			}
238
+			this.currentIndex -= 1
239
+			this.change('prev')
240
+		},
241
+		clickRight() {
242
+			if (Number(this.currentIndex) >= this.maxPage) {
243
+				return
244
+			}
245
+			this.currentIndex += 1
246
+			this.change('next')
247
+		},
248
+		change(e) {
249
+			this.$emit('input', this.currentIndex)
250
+			this.$emit('update:modelValue', this.currentIndex)
251
+			this.$emit('change', {
252
+				type: e,
253
+				current: this.currentIndex
254
+			})
255
+		}
256
+	}
257
+}
258
+</script>
259
+
260
+<style lang="scss" scoped>
261
+.uni-pagination {
262
+	/* #ifndef APP-NVUE */
263
+	display: flex;
264
+	/* #endif */
265
+	position: relative;
266
+	overflow: hidden;
267
+	flex-direction: row;
268
+	justify-content: center;
269
+	align-items: center;
270
+}
271
+
272
+.uni-pagination__total {
273
+	font-size: 14px;
274
+	color: #999;
275
+	margin-right: 15px;
276
+}
277
+
278
+.uni-pagination__btn {
279
+	/* #ifndef APP-NVUE */
280
+	display: flex;
281
+	cursor: pointer;
282
+	/* #endif */
283
+	padding: 0 8px;
284
+	line-height: 30px;
285
+	font-size: $uni-font-size-base;
286
+	position: relative;
287
+	background-color: #f4f4f5;
288
+	flex-direction: row;
289
+	justify-content: center;
290
+	align-items: center;
291
+	text-align: center;
292
+	// border-width: 1px;
293
+	// border-style: solid;
294
+	// border-color: $uni-border-color;
295
+}
296
+
297
+.uni-pagination__child-btn {
298
+	/* #ifndef APP-NVUE */
299
+	display: flex;
300
+	/* #endif */
301
+	font-size: $uni-font-size-base;
302
+	position: relative;
303
+	flex-direction: row;
304
+	justify-content: center;
305
+	align-items: center;
306
+	text-align: center;
307
+}
308
+
309
+.uni-pagination__num {
310
+	/* #ifndef APP-NVUE */
311
+	display: flex;
312
+	/* #endif */
313
+	flex: 1;
314
+	flex-direction: row;
315
+	justify-content: center;
316
+	align-items: center;
317
+	height: 30px;
318
+	line-height: 30px;
319
+	font-size: $uni-font-size-base;
320
+	color: $uni-text-color;
321
+	margin: 0 5px;
322
+}
323
+
324
+.uni-pagination__num-tag {
325
+	/* #ifdef H5 */
326
+	cursor: pointer;
327
+	min-width: 30px;
328
+	/* #endif */
329
+	margin: 0 5px;
330
+	height: 30px;
331
+	text-align: center;
332
+	line-height: 30px;
333
+	// border: 1px red solid;
334
+	color: #666;
335
+	// border-width: 1px;
336
+	// border-style: solid;
337
+	// border-color: $uni-border-color;
338
+}
339
+
340
+.uni-pagination__num-current {
341
+	/* #ifndef APP-NVUE */
342
+	display: flex;
343
+	/* #endif */
344
+	flex-direction: row;
345
+}
346
+
347
+.uni-pagination__num-current-text {
348
+	font-size: 15px;
349
+}
350
+
351
+.uni-pagination--enabled {
352
+	color: #333333;
353
+	opacity: 1;
354
+}
355
+
356
+.uni-pagination--disabled {
357
+	opacity: 0.5;
358
+	/* #ifdef H5 */
359
+	cursor: default;
360
+	/* #endif */
361
+}
362
+
363
+.uni-pagination--hover {
364
+	color: rgba(0, 0, 0, 0.6);
365
+	background-color: $uni-bg-color-hover;
366
+}
367
+
368
+.tag--active:hover {
369
+	color: $uni-color-primary;
370
+}
371
+
372
+.page--active {
373
+	color: #fff;
374
+	background-color: $uni-color-primary;
375
+}
376
+
377
+.page--active:hover {
378
+	color: #fff;
379
+}
380
+
381
+/* #ifndef APP-NVUE */
382
+.is-pc-hide {
383
+	display: block;
384
+}
385
+
386
+.is-phone-hide {
387
+	display: none;
388
+}
389
+
390
+@media screen and (min-width: 450px) {
391
+	.is-pc-hide {
392
+		display: none;
393
+	}
394
+
395
+	.is-phone-hide {
396
+		display: block;
397
+	}
398
+
399
+	.uni-pagination__num-flex-none {
400
+		flex: none;
401
+	}
402
+}
403
+/* #endif */
404
+</style>

+ 82 - 0
anyangWebAPP/uni_modules/uni-pagination/package.json

@@ -0,0 +1,82 @@
1
+{
2
+  "id": "uni-pagination",
3
+  "displayName": "uni-pagination 分页器",
4
+  "version": "1.1.0",
5
+  "description": "Pagination 分页器组件,用于展示页码、请求数据等。",
6
+  "keywords": [
7
+    "uni-ui",
8
+    "uniui",
9
+    "分页器",
10
+    "页码"
11
+],
12
+  "repository": "https://github.com/dcloudio/uni-ui",
13
+  "engines": {
14
+    "HBuilderX": ""
15
+  },
16
+  "directories": {
17
+    "example": "../../temps/example_temps"
18
+  },
19
+  "dcloudext": {
20
+    "category": [
21
+      "前端组件",
22
+      "通用组件"
23
+    ],
24
+    "sale": {
25
+      "regular": {
26
+        "price": "0.00"
27
+      },
28
+      "sourcecode": {
29
+        "price": "0.00"
30
+      }
31
+    },
32
+    "contact": {
33
+      "qq": ""
34
+    },
35
+    "declaration": {
36
+      "ads": "无",
37
+      "data": "无",
38
+      "permissions": "无"
39
+    },
40
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
41
+  },
42
+  "uni_modules": {
43
+    "dependencies": ["uni-icons"],
44
+    "encrypt": [],
45
+    "platforms": {
46
+      "cloud": {
47
+        "tcb": "y",
48
+        "aliyun": "y"
49
+      },
50
+      "client": {
51
+        "App": {
52
+          "app-vue": "y",
53
+          "app-nvue": "y"
54
+        },
55
+        "H5-mobile": {
56
+          "Safari": "y",
57
+          "Android Browser": "y",
58
+          "微信浏览器(Android)": "y",
59
+          "QQ浏览器(Android)": "y"
60
+        },
61
+        "H5-pc": {
62
+          "Chrome": "y",
63
+          "IE": "y",
64
+          "Edge": "y",
65
+          "Firefox": "y",
66
+          "Safari": "y"
67
+        },
68
+        "小程序": {
69
+          "微信": "y",
70
+          "阿里": "y",
71
+          "百度": "y",
72
+          "字节跳动": "y",
73
+          "QQ": "y"
74
+        },
75
+        "快应用": {
76
+          "华为": "u",
77
+          "联盟": "u"
78
+        }
79
+      }
80
+    }
81
+  }
82
+}

+ 48 - 0
anyangWebAPP/uni_modules/uni-pagination/readme.md

@@ -0,0 +1,48 @@
1
+
2
+
3
+## Pagination 分页器
4
+> **组件名:uni-pagination**
5
+> 代码块: `uPagination`
6
+
7
+
8
+分页器组件,用于展示页码、请求数据等。
9
+
10
+### 安装方式
11
+
12
+本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
13
+
14
+如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
15
+
16
+### 基本用法
17
+
18
+在 ``template`` 中使用组件
19
+
20
+```html
21
+<uni-pagination title="标题文字" total="20"></uni-pagination>
22
+<uni-pagination title="标题文字" show-icon="true" total="50" current="2"></uni-pagination>
23
+```
24
+
25
+## API
26
+
27
+### Pagination Props
28
+
29
+|属性名		|类型	|默认值	|说明						|
30
+|:-:		|:-:	|:-:	|:-:						|
31
+|prevText	|String	|上一页	|左侧按钮文字				|
32
+|nextText	|String	|下一页	|右侧按钮文字				|
33
+|current	|Number	|1		|当前页						|
34
+|total		|Number	|0		|数据总量					|
35
+|pageSize	|Number	|10		|每页数据量					|
36
+|showIcon	|Boolean|false	|是否以 icon 形式展示按钮	|
37
+
38
+
39
+### Pagination Events
40
+
41
+|事件称名	|说明				|返回值																		|
42
+|:-:		|:-:				|:-:																				|
43
+|@change|点击页码按钮时触发	|e={type,current} current为当前页,type值为:next/prev,表示点击的是上一页还是下一个	|
44
+
45
+
46
+## 组件示例
47
+
48
+点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/pagination/pagination](https://hellouniapp.dcloud.net.cn/pages/extUI/pagination/pagination)