Skip to content

Commit 80c8033

Browse files
committed
fix(uni-ui): 更新uni-ui
1 parent 28c27fc commit 80c8033

17 files changed

Lines changed: 333 additions & 144 deletions

File tree

‎components/uni-grid-item/uni-grid-item.vue‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737
// this.grid.init()
3838
this.width = this.grid.width
3939
},
40+
beforeDestroy() {
41+
this.grid.children.forEach((item, index) => {
42+
if (item === this) {
43+
this.grid.index -= 1
44+
this.grid.children.splice(index, 1)
45+
}
46+
})
47+
},
4048
methods: {
4149
_onClick() {
4250
// console.log('点击', this.index);
@@ -66,7 +74,8 @@
6674
position: relative;
6775
flex: 1;
6876
flex-direction: column;
69-
/* justify-content: center; */
77+
/* justify-content: center;
78+
*/
7079
/* align-items: center;
7180
*/
7281
}

‎components/uni-list/uni-list.vue‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@
5252
background-color: #ffffff;
5353
position: relative;
5454
flex-direction: column;
55-
/* border-bottom-color: $uni-border-color; */
56-
/* border-bottom-style: solid; */
57-
/* border-bottom-width: 1px; */
55+
/* border-bottom-color: $uni-border-color;
56+
*/
57+
/* border-bottom-style: solid;
58+
*/
59+
/* border-bottom-width: 1px;
60+
*/
5861
}
5962
6063
/* #ifndef APP-NVUE */

‎components/uni-load-more/uni-load-more.vue‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,8 @@
6363
},
6464
data() {
6565
return {
66-
// #ifdef APP-PLUS
6766
webviewHide: false,
6867
platform: platform
69-
// #endif
7068
}
7169
},
7270
// #ifndef APP-NVUE

‎components/uni-nav-bar/uni-nav-bar.vue‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<view class="uni-navbar">
3-
<view :class="{ 'uni-navbar--fixed': fixed, 'uni-navbar--shadow': border, 'uni-navbar--border': border }" :style="{ 'background-color': backgroundColor }" class="uni-navbar__content">
3+
<view :class="{ 'uni-navbar--fixed': fixed, 'uni-navbar--shadow': shadow, 'uni-navbar--border': border }" :style="{ 'background-color': backgroundColor }" class="uni-navbar__content">
44
<uni-status-bar v-if="statusBar" />
55
<view :style="{ color: color,backgroundColor: backgroundColor }" class="uni-navbar__header uni-navbar__content_view">
66
<view @tap="onClickLeft" class="uni-navbar__header-btns uni-navbar__header-btns-left uni-navbar__content_view">
@@ -86,11 +86,11 @@
8686
default: false
8787
},
8888
shadow: {
89-
type: [String, Boolean],
90-
default: true
89+
type: [Boolean, String],
90+
default: false
9191
},
9292
border: {
93-
type: [String, Boolean],
93+
type: [Boolean, String],
9494
default: true
9595
}
9696
},

‎components/uni-notice-bar/uni-notice-bar.vue‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
},
5151
speed: {
5252
// 默认1s滚动100px
53-
type: [String, Number],
53+
type: Number,
5454
default: 100
5555
},
5656
color: {
@@ -63,27 +63,27 @@
6363
},
6464
single: {
6565
// 是否单行
66-
type: [String, Boolean],
66+
type: [Boolean, String],
6767
default: false
6868
},
6969
scrollable: {
7070
// 是否滚动,添加后控制单行效果取消
71-
type: [String, Boolean],
71+
type: [Boolean, String],
7272
default: false
7373
},
7474
showIcon: {
7575
// 是否显示左侧icon
76-
type: [String, Boolean],
76+
type: [Boolean, String],
7777
default: false
7878
},
7979
showGetMore: {
8080
// 是否显示右侧查看更多
81-
type: [String, Boolean],
81+
type: [Boolean, String],
8282
default: false
8383
},
8484
showClose: {
8585
// 是否显示左侧关闭按钮
86-
type: [String, Boolean],
86+
type: [Boolean, String],
8787
default: false
8888
}
8989
},
@@ -136,7 +136,9 @@
136136
textWidth = 0;
137137
let textQuery = new Promise((resolve, reject) => {
138138
uni.createSelectorQuery()
139+
// #ifndef MP-ALIPAY
139140
.in(this)
141+
// #endif
140142
.select(`#${this.elId}`)
141143
.boundingClientRect()
142144
.exec(ret => {
@@ -146,7 +148,9 @@
146148
})
147149
let boxQuery = new Promise((resolve, reject) => {
148150
uni.createSelectorQuery()
151+
// #ifndef MP-ALIPAY
149152
.in(this)
153+
// #endif
150154
.select(`#${this.elIdBox}`)
151155
.boundingClientRect()
152156
.exec(ret => {

‎components/uni-number-box/uni-number-box.vue‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,20 @@
6262
let step = this.step * scale;
6363
if (type === "minus") {
6464
value -= step;
65+
if (value < this.min) {
66+
return;
67+
}
68+
if (value > this.max) {
69+
value = this.max
70+
}
6571
} else if (type === "plus") {
6672
value += step;
67-
}
68-
if (value < this.min || value > this.max) {
69-
return;
73+
if (value > this.max) {
74+
return;
75+
}
76+
if (value < this.min) {
77+
value = this.min
78+
}
7079
}
7180
7281
this.inputValue = String(value / scale);

‎components/uni-pagination/uni-pagination.vue‎

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
<template>
22
<view class="uni-pagination">
3-
<view class="uni-pagination__btns">
4-
<view class="uni-pagination__btn" :class="currentIndex === 1 ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :hover-class="currentIndex === 1 ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-stay-time="70" @click="clickLeft">
5-
<template v-if="showIcon===true || showIcon === 'true'">
6-
<uni-icons color="#000" size="20" type="arrowleft" />
7-
</template>
8-
<template v-else><text class="uni-pagination__child-btn">{{ prevText }}</text></template>
9-
</view>
10-
<view class="uni-pagination__btn" :class="currentIndex === maxPage ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :hover-class="currentIndex === maxPage ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-stay-time="70" @click="clickRight">
11-
<template v-if="showIcon===true || showIcon === 'true'">
12-
<uni-icons color="#000" size="20" type="arrowright" />
13-
</template>
14-
<template v-else><text class="uni-pagination__child-btn">{{ nextText }}</text></template>
15-
</view>
3+
<view class="uni-pagination__btn" :class="currentIndex === 1 ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :hover-class="currentIndex === 1 ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-stay-time="70" @click="clickLeft">
4+
<template v-if="showIcon===true || showIcon === 'true'">
5+
<uni-icons color="#000" size="20" type="arrowleft" />
6+
</template>
7+
<template v-else><text class="uni-pagination__child-btn">{{ prevText }}</text></template>
168
</view>
179
<view class="uni-pagination__num">
1810
<view class="uni-pagination__num-current">
1911
<text class="uni-pagination__num-current-text" style="color:#007aff">{{ currentIndex }}</text><text class="uni-pagination__num-current-text">/{{ maxPage || 0 }}</text>
2012
</view>
2113
</view>
14+
<view class="uni-pagination__btn" :class="currentIndex === maxPage ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :hover-class="currentIndex === maxPage ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-stay-time="70" @click="clickRight">
15+
<template v-if="showIcon===true || showIcon === 'true'">
16+
<uni-icons color="#000" size="20" type="arrowright" />
17+
</template>
18+
<template v-else><text class="uni-pagination__child-btn">{{ nextText }}</text></template>
19+
</view>
2220
</view>
2321
</template>
2422

@@ -109,27 +107,13 @@
109107
/* #ifndef APP-NVUE */
110108
display: flex;
111109
/* #endif */
112-
/* #ifdef APP-NVUE */
113-
padding: 0 20px;
114-
/* #endif */
115-
width: 350px;
116110
position: relative;
117111
overflow: hidden;
118112
flex-direction: row;
119113
justify-content: center;
120114
align-items: center;
121115
}
122116
123-
.uni-pagination__btns {
124-
/* #ifndef APP-NVUE */
125-
display: flex;
126-
/* #endif */
127-
flex: 1;
128-
justify-content: space-between;
129-
align-items: center;
130-
flex-direction: row;
131-
}
132-
133117
.uni-pagination__btn {
134118
/* #ifndef APP-NVUE */
135119
display: flex;
@@ -165,13 +149,10 @@
165149
/* #ifndef APP-NVUE */
166150
display: flex;
167151
/* #endif */
168-
position: absolute;
169-
left: 150px;
170-
top: 0;
152+
flex: 1;
171153
flex-direction: row;
172154
justify-content: center;
173155
align-items: center;
174-
width: 50px;
175156
height: 30px;
176157
line-height: 30px;
177158
font-size: 28rpx;

‎components/uni-tag/uni-tag.vue‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@
3232
},
3333
disabled: {
3434
// 是否为禁用状态
35-
type: [String, Boolean],
35+
type: [Boolean, String],
3636
defalut: false
3737
},
3838
inverted: {
3939
// 是否为空心
40-
type: [String, Boolean],
40+
type: [Boolean, String],
4141
defalut: false
4242
},
4343
circle: {
4444
// 是否为圆角样式
45-
type: [String, Boolean],
45+
type: [Boolean, String],
4646
defalut: false
4747
},
4848
mark: {
4949
// 是否为标记样式
50-
type: [String, Boolean],
50+
type: [Boolean, String],
5151
defalut: false
5252
}
5353
},

0 commit comments

Comments
 (0)