Skip to content

Commit 92669cb

Browse files
committed
1. 优化样式,避免在nvue报错
2. 修复popup在头条小程序上底部有缺失的问题,同时连带使用了popup的keyborad和picker,calendar等组件的问题 3. 修复form组件在头条小程序上的报错问题
1 parent a2acf7e commit 92669cb

File tree

39 files changed

+223
-98
lines changed

39 files changed

+223
-98
lines changed

manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@
120120
"appid" : "17597421"
121121
},
122122
"mp-toutiao" : {
123-
"usingComponents" : true
123+
"usingComponents" : true,
124+
"appid" : "tt2bc55d78b4ff50bf"
124125
},
125126
"h5" : {
126127
"template" : "template.h5.html",

pages.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -846,20 +846,20 @@
846846
"borderStyle": "black",
847847
"list": [{
848848
"pagePath": "pages/example/components",
849-
// "iconPath": "static/uview/example/component.png",
850-
// "selectedIconPath": "static/uview/example/component_select.png",
849+
"iconPath": "static/uview/example/component.png",
850+
"selectedIconPath": "static/uview/example/component_select.png",
851851
"text": "组件"
852852
},
853853
{
854854
"pagePath": "pages/example/js",
855-
// "iconPath": "static/uview/example/js.png",
856-
// "selectedIconPath": "static/uview/example/js_select.png",
855+
"iconPath": "static/uview/example/js.png",
856+
"selectedIconPath": "static/uview/example/js_select.png",
857857
"text": "工具"
858858
},
859859
{
860860
"pagePath": "pages/example/template",
861-
// "iconPath": "static/uview/example/template.png",
862-
// "selectedIconPath": "static/uview/example/template_select.png",
861+
"iconPath": "static/uview/example/template.png",
862+
"selectedIconPath": "static/uview/example/template_select.png",
863863
"text": "模板"
864864
}
865865
]

pages/example/components.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</u-cell-group>
1111
</view>
1212
<u-gap height="70"></u-gap>
13-
<u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar>
13+
<!-- <u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar> -->
1414
</view>
1515
</template>
1616

pages/example/js.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</u-cell-group>
1111
</view>
1212
<u-gap height="70"></u-gap>
13-
<u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar>
13+
<!-- <u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar> -->
1414
</view>
1515
</template>
1616

pages/example/template.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</u-cell-group>
1111
</view>
1212
<u-gap height="70"></u-gap>
13-
<u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar>
13+
<!-- <u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar> -->
1414
</view>
1515
</template>
1616

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@
182182
@import "../../libs/css/style.components.scss";
183183
184184
.u-avatar {
185-
display: inline-flex;
185+
/* #ifndef APP-NVUE */
186+
display: inline-flex;
187+
/* #endif */
186188
align-items: center;
187189
justify-content: center;
188190
font-size: 28rpx;

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

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
'u-btn--' + type,
1212
disabled ? `u-btn--${type}--disabled` : '',
1313
]"
14+
:hover-start-time="Number(hoverStartTime)"
15+
:hover-stay-time="Number(hoverStayTime)"
1416
:disabled="disabled"
1517
:form-type="formType"
1618
:open-type="openType"
@@ -211,7 +213,17 @@ export default {
211213
throttleTime: {
212214
type: [String, Number],
213215
default: 1000
214-
}
216+
},
217+
// 按住后多久出现点击态,单位毫秒
218+
hoverStartTime: {
219+
type: [String, Number],
220+
default: 20
221+
},
222+
// 手指松开后点击态保留时间,单位毫秒
223+
hoverStayTime: {
224+
type: [String, Number],
225+
default: 150
226+
},
215227
},
216228
computed: {
217229
// 当没有传bgColor变量时,按钮按下去的颜色类名
@@ -339,7 +351,9 @@ export default {
339351
position: relative;
340352
border: 0;
341353
//border-radius: 10rpx;
342-
display: inline-block;
354+
/* #ifndef APP-NVUE */
355+
display: inline-flex;
356+
/* #endif */
343357
// 避免边框某些场景可能被“裁剪”,不能设置为hidden
344358
overflow: visible;
345359
line-height: 1;
@@ -497,7 +511,9 @@ export default {
497511
}
498512
499513
.u-size-medium {
500-
display: inline-flex;
514+
/* #ifndef APP-NVUE */
515+
display: inline-flex;
516+
/* #endif */
501517
width: auto;
502518
font-size: 26rpx;
503519
height: 70rpx;
@@ -506,7 +522,9 @@ export default {
506522
}
507523
508524
.u-size-mini {
509-
display: inline-flex;
525+
/* #ifndef APP-NVUE */
526+
display: inline-flex;
527+
/* #endif */
510528
width: auto;
511529
font-size: 22rpx;
512530
padding-top: 1px;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,6 @@
568568
569569
&__inner {
570570
height: 84rpx;
571-
display: -webkit-box;
572-
display: -webkit-flex;
573571
@include vue-flex;
574572
align-items: center;
575573
justify-content: center;

uview-ui/components/u-car-keyboard/u-car-keyboard.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@
186186
width: 62rpx;
187187
flex: 0 0 64rpx;
188188
height: 80rpx;
189-
display: inline-block;
189+
/* #ifndef APP-NVUE */
190+
display: inline-flex;
191+
/* #endif */
190192
font-size: 36rpx;
191193
text-align: center;
192194
line-height: 80rpx;

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<block class="u-cell__value" v-if="value">{{ value }}</block>
3636
<slot v-else></slot>
3737
</view>
38-
<view class="u-flex" v-if="$slots['right-icon']">
38+
<view class="u-flex u-cell_right" v-if="$slots['right-icon']">
3939
<slot name="right-icon"></slot>
4040
</view>
4141
<u-icon v-if="arrow" name="arrow-right" :style="[arrowStyle]" class="u-icon-wrap u-cell__right-icon-wrap"></u-icon>
@@ -249,7 +249,7 @@ export default {
249249
}
250250
251251
.u-cell-border:after {
252-
position: absolute;
252+
position: absolute;
253253
/* #ifndef APP-NVUE */
254254
box-sizing: border-box;
255255
content: ' ';
@@ -301,12 +301,16 @@ export default {
301301
302302
.u-cell--required:before {
303303
position: absolute;
304-
/* #ifndef APP-PLUS */
304+
/* #ifndef APP-NVUE */
305305
content: '*';
306306
/* #endif */
307307
left: 8px;
308308
margin-top: 4rpx;
309309
font-size: 14px;
310310
color: $u-type-error;
311311
}
312+
313+
.u-cell_right {
314+
line-height: 1;
315+
}
312316
</style>

0 commit comments

Comments
 (0)