Skip to content

Commit 2587cd1

Browse files
committed
# **欢迎加群交流反馈:249718512**
1. 【新增】新增精致,可配置性强,带凸起按钮的tabbar组件,详见:[自定义底部导航栏](https://www.uviewui.com/components/tabbar.html) 2. 【新增】modal和popup的中部弹出模式新增negative-top参数,可以将弹出区域往上移,避免与弹出的键盘重合。 3. 【新增】countdown组件新增hide-zero-day参数,当"天"为0时自动隐藏该字段 4. 【新增】input组件添加cursor-spacing参数 5. 【新增】rate评分组件新增v-model双向绑定的形式 6. 【新增numberBox步进器组件新增step支持小数加减,另外新增long-press和press-time用于长按连续加减 7. 【新增】演示项目和空白项目新增.eslintignore,.editorconfig配置文件 8. 【新增】icon组件的lable新增在图标左边和上放的参数lebel-pos=left | top 9. 【优化】image组件允许事件冒泡到外层 10. 【优化】优化cell组件的label数字不会换行的问题 11. 【优化】优化navbar的title为英文时,可能会发生部分字母被竖向截断的问题 12. 【优化】优化picker和select滑动顶部区域,可能会产生报错的问题 13. 【优化】row组件允许flex换行 14. 【优化】优化upload组件的on-list-change事件逻辑 15. 【优化】优化avatar-cropper组件没有选择图片也能点击确定进行裁剪的问题 16. 【优化】重构checkbox组件,加强兼各段兼容性,修复在u-checkbox上size参数无效的问题 17. 【优化】将表单域的设置参数label-position、label-width、label-align等放到u-form组件中 17. 【优化】移除在微信小程序开发工具console中对非法选择器的警告提示 18. 【优化】处理u-input的input-align等于right时,文字可能与清除图标重合的问题 19. 【优化】empty组件图标改由字体图标提供,详见文档说明:empty 内容为空 20. 【优化】avatar头像组件二次加载图片时无效的问题 21. 【优化】image组件图片加载完成时移除背景色,避免png图片能看到底色 22. 【优化】优化line线条组件的length参数单位问题 23. 【优化】优化popup的弹出逻辑,让keyboard,select,picker等与popup弹出有关的组件可以在页面初始化时data中设置show为而弹出组件 24. 【修复】修正image组件的border-radius无法接受带单位的值的问题 25. 【修复】修复u-collapse-item的change事件无效的问题 26. 【修复】修正$u.test.amount()在某些特殊场景可能无法正确识别小数的问题 27. 【修复】修正input和field数值为0时,获得焦点无法显示清除图标的问题 28. 【修复】修正icon组件的label-pos左和右方向颠倒的问题 29. 【修复】修复cell-item组件无法同时显示右箭头和right-icon的slot的问题 30. 【修复】修正radio的shape参数默认为square的问题 31. 【修复】由于deepClone导致null结果为{}而导致http的loading无效的问题
1 parent cae3f55 commit 2587cd1

File tree

29 files changed

+534
-129
lines changed

29 files changed

+534
-129
lines changed

.editorconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ indent_size = 4
77
end_of_line = lf
88
#字符集utf-8
99
charset = utf-8
10-
#是否删除行尾的空格
11-
trim_trailing_whitespace = true
1210

1311

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
unpackage
2+
node_modules
3+
uview-ui

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.4.5",
5+
"versionName" : "1.4.8",
66
"versionCode" : "100",
77
"transformPx" : false,
88
"app-plus" : {

pages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// "current": 0, //当前激活的模式(list 的索引项)
77
// "list": [{
88
// "name": "test", //模式名称
9-
// "path": "pages/componentsB/checkbox/index", //启动页面,必选
9+
// "path": "pages/componentsB/tabbar/index", //启动页面,必选
1010
// "query": "id=1&name=2" //启动参数,在页面的onLoad函数里面得到
1111
// }]
1212
// },

pages/componentsB/checkbox/index.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
<view class="u-demo-title">演示效果</view>
55
<view class="u-demo-area">
66
<view class="">
7-
<u-checkbox-group :size="size" :width="width" :wrap="wrap" :max="max" @change="checkboxGroupChange" :activeColor="activeColor">
7+
<u-checkbox-group :size="size" :width="width"
8+
:wrap="wrap" :max="max"
9+
@change="checkboxGroupChange"
10+
:activeColor="activeColor"
11+
>
812
<u-checkbox @change="checkboxChange"
913
v-model="item.checked" v-for="(item, index) in list"
1014
:key="index" :name="item.name"
11-
:shape="shape" :disabled="item.disabled"
15+
:shape="shape"
16+
:disabled="item.disabled"
1217
>{{item.name}}</u-checkbox>
1318
</u-checkbox-group>
1419
</view>
@@ -140,7 +145,6 @@
140145
// 选中任一checkbox时,由checkbox-group触发
141146
checkboxGroupChange(e) {
142147
this.result = e;
143-
// console.log(this.result);
144148
},
145149
widthChange(index) {
146150
this.width = index == 0 ? '50%' : '';

pages/componentsB/tabbar/index.vue

Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,134 @@
11
<template>
2+
<view class="">
3+
<view class="u-demo">
4+
<view class="u-config-wrap">
5+
<view class="u-config-title u-border-bottom">
6+
参数配置
7+
</view>
8+
<view class="u-config-item">
9+
<view class="u-item-title">状态</view>
10+
<u-subsection vibrateShort :list="['显示', '隐藏']" @change="showChange"></u-subsection>
11+
</view>
12+
<view class="u-config-item">
13+
<view class="u-item-title">凸起按钮</view>
14+
<u-subsection vibrateShort :list="['显示', '隐藏']" @change="minButtonChange"></u-subsection>
15+
</view>
16+
<view class="u-config-item">
17+
<view class="u-item-title">背景色</view>
18+
<u-subsection vibrateShort :list="['#ffffff', '#1f1f1d']" @change="bgColorChange"></u-subsection>
19+
</view>
20+
<view class="u-config-item">
21+
<view class="u-item-title">顶部边框</view>
22+
<u-subsection vibrateShort :list="['显示', '隐藏']" @change="borderTopChange"></u-subsection>
23+
</view>
24+
<view class="u-config-item">
25+
<view class="u-item-title">提示角标</view>
26+
<u-subsection vibrateShort :list="['显示', '隐藏']" @change="badgeChange"></u-subsection>
27+
</view>
28+
</view>
29+
</view>
30+
<u-tabbar
31+
:beforeSwitch="beforeSwitch"
32+
v-model="current"
33+
:show="show"
34+
:bg-color="bgColor"
35+
:border-top="borderTop"
36+
:list="list"
37+
:mid-button="midButton"
38+
:inactive-color="inactiveColor"
39+
:activeColor="activeColor"
40+
></u-tabbar>
41+
</view>
242
</template>
343

444
<script>
45+
export default {
46+
data() {
47+
return {
48+
current: 0,
49+
show: true,
50+
bgColor: '#ffffff',
51+
borderTop: true,
52+
list: [{
53+
iconPath: "home",
54+
selectedIconPath: "home-fill",
55+
text: '首页',
56+
count: 2,
57+
isDot: true,
58+
customIcon: false,
59+
},
60+
{
61+
iconPath: "photo",
62+
selectedIconPath: "photo-fill",
63+
text: '放映厅',
64+
customIcon: false,
65+
},
66+
{
67+
iconPath: "/static/uview/example/min_button.png",
68+
selectedIconPath: "/static/uview/example/min_button_select.png",
69+
text: '发布',
70+
midButton: true,
71+
customIcon: false,
72+
},
73+
{
74+
iconPath: "play-right",
75+
selectedIconPath: "play-right-fill",
76+
text: '直播',
77+
customIcon: false,
78+
},
79+
{
80+
iconPath: "account",
81+
selectedIconPath: "account-fill",
82+
text: '我的',
83+
count: 23,
84+
isDot: false,
85+
customIcon: false,
86+
},
87+
],
88+
midButton: true,
89+
inactiveColor: '#909399',
90+
activeColor: '#5098FF'
91+
}
92+
},
93+
methods: {
94+
beforeSwitch(index) {
95+
return true;
96+
},
97+
showChange(index) {
98+
this.show = !index;
99+
},
100+
bgColorChange(index) {
101+
if(index == 0) {
102+
this.activeColor = '#5098FF';
103+
this.inactiveColor = '#909399';
104+
}
105+
if(index == 1) {
106+
this.activeColor = '#D0D0D0';
107+
this.inactiveColor = '#5A5A5A';
108+
}
109+
this.bgColor = ['#ffffff', '#1f1f1d'][index];
110+
},
111+
borderTopChange(index) {
112+
this.borderTop = !index;
113+
},
114+
badgeChange(index) {
115+
if (index == 1) {
116+
this.config[0].count = 0;
117+
this.config[4].count = 0;
118+
} else {
119+
this.config[0].count = 2;
120+
this.config[4].count = 23;
121+
}
122+
},
123+
minButtonChange(index) {
124+
this.midButton = !index;
125+
}
126+
}
127+
}
5128
</script>
6129

7-
<style>
130+
<style scoped lang="scss">
131+
.u-demo-area {
132+
margin: 0 -40rpx;
133+
}
8134
</style>

pages/componentsC/test/index.vue

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
<template>
2-
<u-checkbox-group>
3-
<u-checkbox v-model="checked">xxxx</u-checkbox>
4-
</u-checkbox-group>
2+
<view class="wrap">
3+
<u-swiper :list="list"></u-swiper>
4+
</view>
55
</template>
66

77
<script>
88
export default {
99
data() {
1010
return {
11-
checked: true,
11+
list: [{
12+
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
13+
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
14+
},
15+
{
16+
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
17+
title: '身无彩凤双飞翼,心有灵犀一点通'
18+
},
19+
{
20+
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
21+
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
22+
}
23+
],
1224
}
25+
},
26+
methods: {
27+
1328
}
1429
}
15-
</script>
16-
17-
<style scoped>
18-
19-
</style>
30+
</script>

static/uview/example/min_button.png

2.89 KB
Loading
2.87 KB
Loading

uview-ui/components/u-cell-item/u-cell-item.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<slot v-else></slot>
3737
</view>
3838
<u-icon v-if="arrow" name="arrow-right" :style="[arrowStyle]" class="u-icon-wrap u-cell__right-icon-wrap"></u-icon>
39-
<view class="u-flex" v-else>
39+
<view class="u-flex" v-if="$slots['right-icon']">
4040
<slot name="right-icon"></slot>
4141
</view>
4242
</view>

uview-ui/components/u-checkbox-group/u-checkbox-group.vue

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@
4545
type: [Boolean, String],
4646
default: ''
4747
},
48+
// 是否禁止点击提示语选中复选框
49+
labelDisabled: {
50+
type: Boolean,
51+
default: false
52+
},
53+
// 形状,square为方形,circle为原型
54+
shape: {
55+
type: String,
56+
default: 'square'
57+
},
4858
// 选中状态下的颜色
4959
activeColor: {
5060
type: String,
@@ -64,12 +74,12 @@
6474
wrap: {
6575
type: Boolean,
6676
default: false
67-
}
68-
},
69-
provide() {
70-
return {
71-
checkboxGroup: this
72-
}
77+
},
78+
// 图标的大小,单位rpx
79+
iconSize: {
80+
type: [String, Number],
81+
default: 20
82+
},
7383
},
7484
data() {
7585
return {

0 commit comments

Comments
 (0)