mirror of
https://github.com/yangzongzhuan/RuoYi-App.git
synced 2025-09-27 22:52:40 +00:00
升级uni-ui到最新版本1.4.23
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
## 1.2.4(2022-09-19)
|
||||
- 修复,未对主题色设置默认色,导致未引入 uni-scss 变量文件报错。
|
||||
- 修复,未对移动端当前页文字做主题色适配。
|
||||
## 1.2.3(2022-09-15)
|
||||
- 修复未使用 uni-scss 主题色的 bug。
|
||||
## 1.2.2(2022-07-06)
|
||||
- 修复 es 语言 i18n 错误
|
||||
## 1.2.1(2021-11-22)
|
||||
- 修复 vue3中某些scss变量无法找到的问题
|
||||
## 1.2.0(2021-11-19)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"uni-pagination.prevText": "prev",
|
||||
"uni-pagination.nextText": "next"
|
||||
"uni-pagination.nextText": "next",
|
||||
"uni-pagination.piecePerPage": "piece/page"
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"uni-pagination.prevText": "anterior",
|
||||
"uni-pagination.nextText": "próxima"
|
||||
"uni-pagination.nextText": "prxima",
|
||||
"uni-pagination.piecePerPage": "Art<72><74>culo/P<><50>gina"
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"uni-pagination.prevText": "précédente",
|
||||
"uni-pagination.nextText": "suivante"
|
||||
"uni-pagination.nextText": "suivante",
|
||||
"uni-pagination.piecePerPage": "Articles/Pages"
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"uni-pagination.prevText": "上一页",
|
||||
"uni-pagination.nextText": "下一页"
|
||||
"uni-pagination.nextText": "下一页",
|
||||
"uni-pagination.piecePerPage": "条/页"
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"uni-pagination.prevText": "上一頁",
|
||||
"uni-pagination.nextText": "下一頁"
|
||||
"uni-pagination.nextText": "下一頁",
|
||||
"uni-pagination.piecePerPage": "條/頁"
|
||||
}
|
||||
|
@@ -1,5 +1,15 @@
|
||||
<template>
|
||||
<view class="uni-pagination">
|
||||
<!-- #ifndef MP -->
|
||||
<picker v-if="showPageSize === true || showPageSize === 'true'" class="select-picker" mode="selector"
|
||||
:value="pageSizeIndex" :range="pageSizeRange" @change="pickerChange" @cancel="pickerClick"
|
||||
@click.native="pickerClick">
|
||||
<button type="default" size="mini" :plain="true">
|
||||
<text>{{pageSizeRange[pageSizeIndex]}} {{piecePerPage}}</text>
|
||||
<uni-icons class="select-picker-icon" type="arrowdown" size="12" color="#999"></uni-icons>
|
||||
</button>
|
||||
</picker>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<view class="uni-pagination__total is-phone-hide">共 {{ total }} 条</view>
|
||||
<!-- #endif -->
|
||||
@@ -16,8 +26,7 @@
|
||||
</view>
|
||||
<view class="uni-pagination__num uni-pagination__num-flex-none">
|
||||
<view class="uni-pagination__num-current">
|
||||
<text class="uni-pagination__num-current-text is-pc-hide"
|
||||
style="color:#409EFF">{{ currentIndex }}</text>
|
||||
<text class="uni-pagination__num-current-text is-pc-hide current-index-text">{{ currentIndex }}</text>
|
||||
<text class="uni-pagination__num-current-text is-pc-hide">/{{ maxPage || 0 }}</text>
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<view v-for="(item, index) in paper" :key="index" :class="{ 'page--active': item === currentIndex }"
|
||||
@@ -49,11 +58,15 @@
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=32
|
||||
* @property {String} prevText 左侧按钮文字
|
||||
* @property {String} nextText 右侧按钮文字
|
||||
* @property {String} piecePerPageText 条/页文字
|
||||
* @property {Number} current 当前页
|
||||
* @property {Number} total 数据总量
|
||||
* @property {Number} pageSize 每页数据量
|
||||
* @property {Number} showIcon = [true|false] 是否以 icon 形式展示按钮
|
||||
* @property {Boolean} showIcon = [true|false] 是否以 icon 形式展示按钮
|
||||
* @property {Boolean} showPageSize = [true|false] 是否展示每页条数
|
||||
* @property {Array} pageSizeRange = [20, 50, 100, 500] 每页条数选框
|
||||
* @event {Function} change 点击页码按钮时触发 ,e={type,current} current为当前页,type值为:next/prev,表示点击的是上一页还是下一个
|
||||
* * @event {Function} pageSizeChange 当前每页条数改变时触发 ,e={pageSize} pageSize 为当前所选的每页条数
|
||||
*/
|
||||
|
||||
import {
|
||||
@@ -65,7 +78,7 @@
|
||||
} = initVueI18n(messages)
|
||||
export default {
|
||||
name: 'UniPagination',
|
||||
emits: ['update:modelValue', 'input', 'change'],
|
||||
emits: ['update:modelValue', 'input', 'change', 'pageSizeChange'],
|
||||
props: {
|
||||
value: {
|
||||
type: [Number, String],
|
||||
@@ -81,6 +94,9 @@
|
||||
nextText: {
|
||||
type: String,
|
||||
},
|
||||
piecePerPageText: {
|
||||
type: String
|
||||
},
|
||||
current: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
@@ -100,18 +116,32 @@
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
showPageSize: {
|
||||
// 是否以 icon 形式展示按钮
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
pagerCount: {
|
||||
type: Number,
|
||||
default: 7
|
||||
},
|
||||
pageSizeRange: {
|
||||
type: Array,
|
||||
default: () => [20, 50, 100, 500]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageSizeIndex: 0,
|
||||
currentIndex: 1,
|
||||
paperData: []
|
||||
paperData: [],
|
||||
pickerShow: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
piecePerPage() {
|
||||
return this.piecePerPageText || t('uni-pagination.piecePerPage')
|
||||
},
|
||||
prevPageText() {
|
||||
return this.prevText || t('uni-pagination.prevText')
|
||||
},
|
||||
@@ -199,9 +229,31 @@
|
||||
this.currentIndex = val
|
||||
}
|
||||
}
|
||||
},
|
||||
pageSizeIndex(val) {
|
||||
this.$emit('pageSizeChange', this.pageSizeRange[val])
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pickerChange(e) {
|
||||
this.pageSizeIndex = e.detail.value
|
||||
this.pickerClick()
|
||||
},
|
||||
pickerClick() {
|
||||
// #ifdef H5
|
||||
const body = document.querySelector('body')
|
||||
if (!body) return
|
||||
|
||||
const className = 'uni-pagination-picker-show'
|
||||
this.pickerShow = !this.pickerShow
|
||||
|
||||
if (this.pickerShow) {
|
||||
body.classList.add(className)
|
||||
} else {
|
||||
setTimeout(() => body.classList.remove(className), 300)
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
// 选择标签
|
||||
selectPage(e, index) {
|
||||
if (parseInt(e)) {
|
||||
@@ -256,8 +308,8 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
$uni-primary: #2979ff;
|
||||
<style lang="scss" scoped>
|
||||
$uni-primary: #2979ff !default;
|
||||
.uni-pagination {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
@@ -350,6 +402,10 @@
|
||||
|
||||
.uni-pagination__num-current-text {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.current-index-text{
|
||||
color: $uni-primary;
|
||||
}
|
||||
|
||||
.uni-pagination--enabled {
|
||||
@@ -406,4 +462,4 @@
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
</style>
|
||||
</style>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "uni-pagination",
|
||||
"displayName": "uni-pagination 分页器",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.4",
|
||||
"description": "Pagination 分页器组件,用于展示页码、请求数据等。",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
@@ -16,11 +16,7 @@
|
||||
"directories": {
|
||||
"example": "../../temps/example_temps"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
],
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
@@ -37,7 +33,8 @@
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||
"type": "component-vue"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": ["uni-scss","uni-icons"],
|
||||
|
@@ -9,5 +9,3 @@
|
||||
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-pagination)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user