Skip to content

Commit 8968a8e

Browse files
committed
完善
1 parent 37fa38a commit 8968a8e

File tree

9 files changed

+159
-12
lines changed

9 files changed

+159
-12
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全
1919

2020
## [官方文档:https://www.uviewui.com](https://www.uviewui.com)
2121

22-
### [点击加群交流反馈:863820668](https://jq.qq.com/?_wv=1027&k=uyZUkSlo)
22+
### [点击加群交流反馈:1129077272](https://qm.qq.com/cgi-bin/qm/qr?k=1FfucLpozYbnb7FWo_KsqAdEi1mE3Qrf&jump_from=webapi)
2323

2424
## 特性
2525

@@ -78,7 +78,6 @@ Vue.use(uView);
7878
```css
7979
/* App.vue */
8080
<style lang="scss">
81-
/* 注意声明lang="scss"! */
8281
@import "uview-ui/index.scss";
8382
</style>
8483
```
@@ -124,7 +123,7 @@ Vue.use(uView);
124123

125124
## 捐赠uView的研发
126125

127-
uView文档和源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
126+
uView文档内容和框架源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
128127

129128
<img src="https://uviewui.com/common/wechat.png" width="220" >
130129
<img style="margin-left: 100px;" src="https://uviewui.com/common/alipay.png" width="220" >

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name" : "uView",
33
"appid" : "__UNI__60F4B81",
44
"description" : "多平台快速开发的UI框架",
5-
"versionName" : "1.8.2",
5+
"versionName" : "1.8.3",
66
"versionCode" : "100",
77
"transformPx" : false,
88
"app-plus" : {

uview-ui/components/u-calendar/u-calendar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
* @property {Boolean} change-year 是否显示顶部的切换年份方向的按钮(默认true)
6969
* @property {Boolean} change-month 是否显示顶部的切换月份方向的按钮(默认true)
7070
* @property {String Number} max-year 可切换的最大年份(默认2050)
71-
* @property {String Number} min-year 最小可选日期(默认1950)
72-
* @property {String Number} min-date 可切换的最小年份(默认1950-01-01)
71+
* @property {String Number} min-year 可切换的最小年份(默认1950)
72+
* @property {String Number} min-date 最小可选日期(默认1950-01-01)
7373
* @property {String Number} max-date 最大可选日期(默认当前日期)
7474
* @property {String Number} 弹窗顶部左右两边的圆角值,单位rpx(默认20)
7575
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭日历(默认true)
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
<template>
2+
<view class="u-progress" :style="{
3+
borderRadius: round ? '100rpx' : 0,
4+
height: height + 'rpx',
5+
backgroundColor: inactiveColor
6+
}">
7+
<view :class="[
8+
type ? `u-type-${type}-bg` : '',
9+
striped ? 'u-striped' : '',
10+
striped && stripedActive ? 'u-striped-active' : ''
11+
]" class="u-active" :style="[progressStyle]">
12+
<slot v-if="$slots.default || $slots.$default" />
13+
<block v-else-if="showPercent">
14+
{{percent + '%'}}
15+
</block>
16+
</view>
17+
</view>
18+
</template>
19+
20+
<script>
21+
/**
22+
* lineProgress 线型进度条
23+
* @description 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
24+
* @tutorial https://www.uviewui.com/components/lineProgress.html
25+
* @property {String Number} percent 进度条百分比值,为数值类型,0-100
26+
* @property {Boolean} round 进度条两端是否为半圆(默认true)
27+
* @property {String} type 如设置,active-color值将会失效
28+
* @property {String} active-color 进度条激活部分的颜色(默认#19be6b)
29+
* @property {String} inactive-color 进度条的底色(默认#ececec)
30+
* @property {Boolean} show-percent 是否在进度条内部显示当前的百分比值数值(默认true)
31+
* @property {String Number} height 进度条的高度,单位rpx(默认28)
32+
* @property {Boolean} striped 是否显示进度条激活部分的条纹(默认false)
33+
* @property {Boolean} striped-active 条纹是否具有动态效果(默认false)
34+
* @example <u-line-progress :percent="70" :show-percent="true"></u-line-progress>
35+
*/
36+
export default {
37+
name: "u-line-progress",
38+
props: {
39+
// 两端是否显示半圆形
40+
round: {
41+
type: Boolean,
42+
default: true
43+
},
44+
// 主题颜色
45+
type: {
46+
type: String,
47+
default: ''
48+
},
49+
// 激活部分的颜色
50+
activeColor: {
51+
type: String,
52+
default: '#19be6b'
53+
},
54+
inactiveColor: {
55+
type: String,
56+
default: '#ececec'
57+
},
58+
// 进度百分比,数值
59+
percent: {
60+
type: Number,
61+
default: 0
62+
},
63+
// 是否在进度条内部显示百分比的值
64+
showPercent: {
65+
type: Boolean,
66+
default: true
67+
},
68+
// 进度条的高度,单位rpx
69+
height: {
70+
type: [Number, String],
71+
default: 28
72+
},
73+
// 是否显示条纹
74+
striped: {
75+
type: Boolean,
76+
default: false
77+
},
78+
// 条纹是否显示活动状态
79+
stripedActive: {
80+
type: Boolean,
81+
default: false
82+
}
83+
},
84+
data() {
85+
return {
86+
87+
}
88+
},
89+
computed: {
90+
progressStyle() {
91+
let style = {};
92+
style.width = this.percent + '%';
93+
if(this.activeColor) style.backgroundColor = this.activeColor;
94+
return style;
95+
}
96+
},
97+
methods: {
98+
99+
}
100+
}
101+
</script>
102+
103+
<style lang="scss" scoped>
104+
@import "../../libs/css/style.components.scss";
105+
106+
.u-progress {
107+
overflow: hidden;
108+
height: 15px;
109+
/* #ifndef APP-NVUE */
110+
display: inline-flex;
111+
/* #endif */
112+
align-items: center;
113+
width: 100%;
114+
border-radius: 100rpx;
115+
}
116+
117+
.u-active {
118+
width: 0;
119+
height: 100%;
120+
align-items: center;
121+
@include vue-flex;
122+
justify-items: flex-end;
123+
justify-content: space-around;
124+
font-size: 20rpx;
125+
color: #ffffff;
126+
transition: all 0.4s ease;
127+
}
128+
129+
.u-striped {
130+
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
131+
background-size: 39px 39px;
132+
}
133+
134+
.u-striped-active {
135+
animation: progress-stripes 2s linear infinite;
136+
}
137+
138+
@keyframes progress-stripes {
139+
0% {
140+
background-position: 0 0;
141+
}
142+
143+
100% {
144+
background-position: 39px 0;
145+
}
146+
}
147+
</style>

uview-ui/components/u-image/u-image.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@load="onLoadHandler"
99
:lazy-load="lazyLoad"
1010
class="u-image__image"
11+
:show-menu-by-longpress="showMenuByLongpress"
1112
:style="{
1213
borderRadius: shape == 'circle' ? '50%' : $u.addUnit(borderRadius)
1314
}"

uview-ui/components/u-rate/u-rate.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@ export default {
178178
// 获取评分组件盒子的布局信息
179179
getElRectById() {
180180
// uView封装的获取节点的方法,详见文档
181-
this.$u.getRect('#' + this.elId).then(res => {
181+
this.$uGetRect('#' + this.elId).then(res => {
182182
this.starBoxLeft = res.left
183183
})
184184
},
185185
// 获取单个星星的尺寸
186186
getElRectByClass() {
187187
// uView封装的获取节点的方法,详见文档
188-
this.$u.getRect('.' + this.elClass).then(res => {
188+
this.$uGetRect('.' + this.elClass).then(res => {
189189
this.starWidth = res.width
190190
// 把每个星星右边到组件盒子左边的距离放入数组中
191191
for (let i = 0; i < this.count; i++) {

uview-ui/components/u-tabbar/u-tabbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:custom-prefix="item.customIcon ? 'custom-icon' : 'uicon'"
2323
></u-icon>
2424
<u-badge :count="item.count" :is-dot="item.isDot"
25-
v-if="item.count"
25+
v-if="item.count || item.isDot"
2626
:offset="[-2, getOffsetRight(item.count, item.isDot)]"
2727
></u-badge>
2828
</view>

uview-ui/libs/config/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// 此版本发布于2020-11-19
2-
let version = '1.8.2';
1+
// 此版本发布于2020-12-17
2+
let version = '1.8.3';
33

44
export default {
55
v: version,

uview-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uview-ui",
3-
"version": "1.8.2",
3+
"version": "1.8.3",
44
"description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
55
"main": "index.js",
66
"keywords": [

0 commit comments

Comments
 (0)