Skip to content

Commit e8837d0

Browse files
committed
uview update to 20220126
1 parent dac039d commit e8837d0

16 files changed

Lines changed: 162 additions & 140 deletions

File tree

‎node_modules/apifm-uniapp/index.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎store/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const store = new Vuex.Store({
3737
},
3838
app_show_pic_version: lifeData.app_show_pic_version ? lifeData.app_show_pic_version : '',
3939
referrer: lifeData.referrer ? lifeData.referrer : '',
40-
token: lifeData.token ? lifeData.token : 'b400aa9a-231a-4e4d-91f1-31787d706648',
40+
token: lifeData.token ? lifeData.token : '2830961b-8da6-446a-86fb-5d44e159d8aa',
4141
uid: lifeData.uid ? lifeData.uid : '2518576',
4242
cartNumber: 0
4343
},

‎uni_modules/uview-ui/changelog.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
## 2.0.24(2022-01-25)
2+
# uView2.0重磅发布,利剑出鞘,一统江湖
3+
4+
1. 修复swiper在current指定非0时缩放有误
5+
2. 修复u-icon添加stop属性的时候报错
6+
3. 优化遗留的通过正则判断rpx单位的问题
7+
4. 优化Layout布局 vue使用gutter时,会超出固定区域
8+
5. 优化search组件高度单位问题(rpx -> px)
9+
6. 修复u-image slot 加载和错误的图片失去了高度
10+
7. 修复u-index-list中footer插槽与header插槽存在性判断错误
11+
8. 修复部分机型下u-popup关闭时会闪烁
12+
9. 修复u-image在nvue-app下失去宽高
13+
10. 修复u-popup运行报错
14+
11. 修复u-tooltip报错
15+
12. 修复box-sizing在app下的警告
16+
13. 修复u-navbar在小程序中报运行时错误
17+
14. 其他修复
18+
## 2.0.23(2022-01-24)
19+
# uView2.0重磅发布,利剑出鞘,一统江湖
20+
21+
1. 修复image组件在hx3.3.9的nvue下可能会显示异常的问题
22+
2. 修复col组件gutter参数带rpx单位处理不正确的问题
23+
3. 修复text组件单行时无法显示省略号的问题
24+
4. navbar添加titleStyle参数
25+
5. 升级到hx3.3.9可消除nvue下控制台样式警告的问题
126
## 2.0.22(2022-01-19)
227
# uView2.0重磅发布,利剑出鞘,一统江湖
328

‎uni_modules/uview-ui/components/u-col/u-col.vue‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
colStyle() {
5454
const style = {
5555
// 这里写成"padding: 0 10px"的形式是因为nvue的需要
56-
paddingLeft: uni.$u.addUnit(Number(this.parentData.gutter)/2),
57-
paddingRight: uni.$u.addUnit(Number(this.parentData.gutter)/2),
56+
paddingLeft: uni.$u.addUnit(uni.$u.getPx(this.parentData.gutter)/2),
57+
paddingRight: uni.$u.addUnit(uni.$u.getPx(this.parentData.gutter)/2),
5858
alignItems: this.uAlignItem,
5959
justifyContent: this.uJustify,
6060
textAlign: this.textAlign,
@@ -96,7 +96,9 @@
9696
9797
.u-col {
9898
padding: 0;
99+
/* #ifndef APP-NVUE */
99100
box-sizing:border-box;
101+
/* #endif */
100102
/* #ifdef MP */
101103
display: block;
102104
/* #endif */

‎uni_modules/uview-ui/components/u-form/u-form.vue‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
setRules(rules) {
9191
// 判断是否有规则
9292
if (Object.keys(rules).length === 0) return;
93-
if (Object.keys(this.model).length === 0) {
94-
uni.$u.error('设置rules,model必须设置!');
93+
if (process.env.NODE_ENV === 'development' && Object.keys(this.model).length === 0) {
94+
uni.$u.error('设置rules,model必须设置!如果已经设置,请刷新页面。');
9595
return;
9696
};
9797
this.formRules = rules;
@@ -116,15 +116,16 @@
116116
props = [].concat(props);
117117
this.children.map((child) => {
118118
// 如果u-form-item的prop在props数组中,则清除对应的校验结果信息
119-
if (props.includes(child.props)) {
119+
if (props[0] === undefined || props.includes(child.prop)) {
120120
child.message = null;
121121
}
122122
});
123123
},
124124
// 对部分表单字段进行校验
125125
async validateField(value, callback, event = null) {
126-
if (Object.keys(this.formRules).length === 0) {
127-
uni.$u.error('未设置rules,请看文档说明!');
126+
// 开发环境才提示,生产环境不会提示
127+
if (process.env.NODE_ENV === 'development' && Object.keys(this.formRules).length === 0) {
128+
uni.$u.error('未设置rules,请看文档说明!如果已经设置,请刷新页面。');
128129
return;
129130
}
130131
// $nextTick是必须的,否则model的变更,可能会延后于此方法的执行

‎uni_modules/uview-ui/components/u-navbar/u-navbar.vue‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@
4545
<slot name="center">
4646
<text
4747
class="u-line-1 u-navbar__content__title"
48-
:style="{
48+
:style="[{
4949
width: $u.addUnit(titleWidth),
50-
...$u.addStyle(titleStyle)
51-
}"
50+
}, $u.addStyle(titleStyle)]"
5251
>{{ title }}</text>
5352
</slot>
5453
<view
@@ -177,7 +176,7 @@
177176
&__right {
178177
right: 0;
179178
180-
&__txet {
179+
&__text {
181180
font-size: 15px;
182181
margin-left: 3px;
183182
}

‎uni_modules/uview-ui/components/u-popup/u-popup.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
:show="show"
1313
:customStyle="transitionStyle"
1414
:mode="position"
15-
:duration="duration1"
15+
:duration="duration"
1616
@after-enter="afterEnter"
1717
@click="clickHandler"
1818
>

‎uni_modules/uview-ui/components/u-search/u-search.vue‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
backgroundColor: bgColor,
1313
borderRadius: shape == 'round' ? '100px' : '4px',
1414
borderColor: borderColor,
15-
height: height + 'rpx'
1615
}"
1716
>
1817
<template v-if="$slots.label || label !== null">
@@ -47,6 +46,7 @@
4746
textAlign: inputAlign,
4847
color: color,
4948
backgroundColor: bgColor,
49+
height: $u.addUnit(height)
5050
}, inputStyle]"
5151
/>
5252
<view
@@ -241,6 +241,7 @@ $u-search-action-margin-left: 5px !default;
241241
border-width: 1px;
242242
border-color: transparent;
243243
border-style: solid;
244+
overflow: hidden;
244245
245246
&__icon {
246247
@include flex;

‎uni_modules/uview-ui/components/u-tabs/u-tabs.vue‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,8 @@
165165
let lineOffsetLeft = this.list
166166
.slice(0, this.innerCurrent)
167167
.reduce((total, curr) => total + curr.rect.width, 0);
168-
let lineWidth = this.lineWidth; // 拷贝副本,防止间接修改props中的值
169-
// 如果lineWidth不是数字类型的话
170-
if (typeof lineWidth !== 'number') {
171-
// 判断后缀是否为rpx
172-
if (lineWidth.indexOf('rpx') > -1) {
173-
lineWidth = uni.upx2px(parseFloat(lineWidth)); // rpx -> px
174-
} else {
175-
lineWidth = parseFloat(lineWidth);
176-
}
177-
}
168+
// 获取下划线的数值px表示法
169+
const lineWidth = uni.$u.getPx(this.lineWidth);
178170
this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2
179171
// #ifdef APP-NVUE
180172
// 第一次移动滑块,无需过渡时间

‎uni_modules/uview-ui/components/u-text/u-text.vue‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ export default {
165165
align-items: center;
166166
flex-wrap: nowrap;
167167
flex: 1;
168+
/* #ifndef APP-NVUE */
169+
width: 100%;
170+
/* #endif */
168171
169172
&__price {
170173
font-size: 14px;

0 commit comments

Comments
 (0)